PPL Logo

simplexScheme Class Reference
[Automatic Performance Tuning and Steering Framework]

A class that implements the Nelder Mead Simplex Optimization Algorithm. More...

#include <controlPoints.h>

Collaboration diagram for simplexScheme:

Collaboration graph
[legend]

Public Member Functions

 simplexScheme ()
void adapt (std::map< std::string, std::pair< int, int > > &controlPointSpace, std::map< std::string, int > &newControlPoints, const int phase_id, instrumentedData &allData)
 Inform the control point framework that a named control point affects the priorities of some array.

Private Types

enum  simplexStateEnumT {
  beginning, reflecting, expanding, contracting,
  doneExpanding, stillContracting
}
 The states used by the Nelder Mead Simplex Algorithm. More...
typedef enum
simplexScheme::simplexStateEnumT 
simplexStateT

Private Member Functions

void computeCentroidBestWorst (std::map< std::string, std::pair< int, int > > &controlPointSpace, std::map< std::string, int > &newControlPoints, const int phase_id, instrumentedData &allData)
void doReflection (std::map< std::string, std::pair< int, int > > &controlPointSpace, std::map< std::string, int > &newControlPoints, const int phase_id, instrumentedData &allData)
 Replace the worst point with its reflection across the centroid.
void doExpansion (std::map< std::string, std::pair< int, int > > &controlPointSpace, std::map< std::string, int > &newControlPoints, const int phase_id, instrumentedData &allData)
 Replace the newly tested reflection with a further expanded version of itself.
void doContraction (std::map< std::string, std::pair< int, int > > &controlPointSpace, std::map< std::string, int > &newControlPoints, const int phase_id, instrumentedData &allData)
 Replace the newly tested reflection with a further expanded version of itself.
std::vector< double > pointCoords (instrumentedData &allData, int i)
int keepInRange (int v, int lb, int ub)
void printSimplex (instrumentedData &allData)

Private Attributes

std::set< intsimplexIndices
 The indices into the allData->phases that correspond to the current simplex used one of the tuning schemes.
simplexStateT simplexState
double alpha
 Reflection coefficient.
double beta
double gamma
int firstSimplexPhase
 The first phase that was used by the this scheme. This helps us ignore a few startup phases that are out of our control.
int worstPhase
double worstTime
std::vector< double > worst
std::vector< double > centroid
int bestPhase
double bestTime
std::vector< double > best
std::vector< double > P
int pPhase
std::vector< double > P2
int p2Phase
std::set< intstillMustContractList
bool useBestKnown

Detailed Description

A class that implements the Nelder Mead Simplex Optimization Algorithm.

Definition at line 599 of file controlPoints.h.


Member Typedef Documentation


Member Enumeration Documentation

The states used by the Nelder Mead Simplex Algorithm.

The transitions between these states are displayed in the NelderMeadStateDiagram.pdf diagram.

Enumerator:
beginning 
reflecting 
expanding 
contracting 
doneExpanding 
stillContracting 

Definition at line 604 of file controlPoints.h.


Constructor & Destructor Documentation

simplexScheme::simplexScheme (  )  [inline]

Definition at line 681 of file controlPoints.h.

References alpha, beta, and gamma.


Member Function Documentation

int simplexScheme::keepInRange ( int  v,
int  lb,
int  ub 
) [inline, private]

Definition at line 656 of file controlPoints.h.

Referenced by adapt(), doContraction(), doExpansion(), and doReflection().

Here is the caller graph for this function:

void simplexScheme::printSimplex ( instrumentedData allData  )  [inline, private]

Definition at line 664 of file controlPoints.h.

References instrumentedData::phases, PUP::s, and simplexIndices.

Referenced by doContraction(), doExpansion(), and doReflection().

Here is the caller graph for this function:


Field Documentation

std::set<int> simplexScheme::simplexIndices [private]

The indices into the allData->phases that correspond to the current simplex used one of the tuning schemes.

Definition at line 607 of file controlPoints.h.

Referenced by adapt(), computeCentroidBestWorst(), and printSimplex().

Definition at line 608 of file controlPoints.h.

Referenced by adapt(), doContraction(), doExpansion(), and doReflection().

double simplexScheme::alpha [private]

Reflection coefficient.

Definition at line 611 of file controlPoints.h.

Referenced by doReflection(), and simplexScheme().

double simplexScheme::beta [private]

Definition at line 613 of file controlPoints.h.

Referenced by doContraction(), and simplexScheme().

double simplexScheme::gamma [private]

Definition at line 615 of file controlPoints.h.

Referenced by doExpansion(), and simplexScheme().

The first phase that was used by the this scheme. This helps us ignore a few startup phases that are out of our control.

Definition at line 619 of file controlPoints.h.

Referenced by adapt().

double simplexScheme::worstTime [private]

Definition at line 623 of file controlPoints.h.

Referenced by adapt(), and computeCentroidBestWorst().

std::vector<double> simplexScheme::worst [private]

Definition at line 624 of file controlPoints.h.

Referenced by adapt(), computeCentroidBestWorst(), doContraction(), and doReflection().

std::vector<double> simplexScheme::centroid [private]

Definition at line 630 of file controlPoints.h.

Referenced by computeCentroidBestWorst().

double simplexScheme::bestTime [private]

Definition at line 631 of file controlPoints.h.

Referenced by adapt(), and computeCentroidBestWorst().

std::vector<double> simplexScheme::best [private]

Definition at line 632 of file controlPoints.h.

Referenced by adapt(), computeCentroidBestWorst(), and doReflection().

std::vector<double> simplexScheme::P [private]

Definition at line 635 of file controlPoints.h.

Referenced by adapt(), doContraction(), doExpansion(), and doReflection().

Definition at line 636 of file controlPoints.h.

Referenced by adapt(), and doReflection().

std::vector<double> simplexScheme::P2 [private]

Definition at line 639 of file controlPoints.h.

Referenced by doContraction(), and doExpansion().

Definition at line 640 of file controlPoints.h.

Referenced by adapt(), doContraction(), and doExpansion().

Definition at line 643 of file controlPoints.h.

Referenced by adapt().

Definition at line 645 of file controlPoints.h.

Referenced by adapt(), and doReflection().


The documentation for this class was generated from the following files:

Generated on Mon Sep 21 08:29:55 2020 for Charm++ by  doxygen 1.5.5