class MultiCompassSearch : public CompassSearch

MultiCompassSearch is based on the class CompassSearch, derived from Class PatternSearch

Inheritance:


Protected Fields

long NumSearches
The number of searches you want to do
long IterationCap
Your maximum number of allowed function calls for each search in the series
long stream
the random number stream, for rngs
Vector <double> * random_start_pt
a random startig point
Bounds bds
this is a struct of type Bounds

Inherited from CompassSearch:


Inherited from PatternSearch:

Public

Constructors & Destructor

PatternSearch(long dim, Vector<double> &startPoint)
Constructor for class PatternSearch
PatternSearch(const PatternSearch & Original)
Deep copy constructor for class PatternSearch
PatternSearch(long dim, Vector<double> &startPoint, double startStep, double stopStep, void (*objective)(long vars, Vector<double> &x, double & func, bool& flag, void* an_obj), void * input_obj)
Special constructor using void function and object pointers
virtual ~PatternSearch()
Destructor

Other Initialization Methods

virtual PatternSearch& operator=(const PatternSearch& A)
Overloaded assignment operator
virtual void CleanSlate(long dim, Vector<double> &startpoint)
Reinitializes values in order to reuse the same search object
virtual void CleanSlate(long dim, Vector<double> &startpoint, double startStep, double stopStep, void (*objective)(long vars, Vector<double> &x, double & func, bool& flag, void* an_obj), void * input_obj)
overloaded version of CleanSlate using void function and object pointers
void InitializeDesign(long patternSize, const Matrix<double> * designPtr)
Deletes any existing pattern and replaces it with the one pointed to by designPtr
void ReadInFile(istream & fp)
Reads the design in from a file
void PrintDesign() const
Prints out useful information about the search

Search method

virtual void BeginSearch()
BeginSearch() is an unimplemented virtual void method in the abstract base classes

Accessors

void GetPatternLength(long & pattern) const
Returns the number of "columns" of the pattern matrix
double GetDelta() const
Returns delta, the lattice step length
void GetInitialStepLength(double & stepLen)
Returns initialStepLength, the initial value of delta
void SetInitialStepLength(double & stepLen)
Assigns the value of steplen to initialStepLength

Protected Fields

long patternLength
double delta
double initialStepLength

Protected Methods

virtual bool Stop()
virtual void ExploratoryMoves()
virtual void CopySearch(const PatternSearch & Original)
virtual void NextPoint(long index, const Vector<double> & currentPoint, Vector<double> & nextPoint)
virtual void ReplaceMinimum(Vector<double> & newPoint, double newValue)
virtual void ScalePattern(double scalar)

Inherited from DirectSearch:

Public Fields

static const long NO_MAX

Public

Constructors and destructor

DirectSearch(long dim, Vector<double> &startPoint)
Constructor
DirectSearch(const DirectSearch & Original)
Copy constructor
DirectSearch(long dim, Vector<double> &startPoint, double stopStep, void (*objective)(long vars, Vector<double> &x, double &func, bool &flag, void* an_obj), void * input_obj)
special constructor using void function and object pointers
virtual ~DirectSearch()
Destructor
DirectSearch& operator=(const DirectSearch& A)
Overloaded assignment operator

Other initialization methods

virtual void ReadInFile(istream & fp)
Reads the design in from a file supplied by the user
virtual void CleanSlate(long dim, Vector<double> & startPoint)
Reinitializes values in order to reuse the same search object
virtual void CleanSlate(long dim, Vector<double> &startPoint, double stopStep, void (*objective)(long vars, Vector<double> &x, double &func, bool &flag, void* an_obj), void * input_obj)
overloaded version of CleanSlate using void function and object pointers
void InitializeDesign(const Matrix<double> *designPtr)
Deletes any existing pattern and replaces it with the one pointed to by designPtr
virtual void PrintDesign() const
Prints out search information

Accessors and Mutators

long GetFunctionCalls() const
Returns number of objective function evaluations so far
void SetFunctionCalls(long newCalls)
Sets number of function calls already used--useful for times when you are using multiple searches for the same optimization; for example, if you wanted to do 100 function calls worth of SMDSearch followed by 100 calls (max) of HJSearch
int GetID() const
Returns the ID Number of the search
void GetMinPoint(Vector<double> & minimum) const
Retrieves the minimum point and assigns it to minimum The vector minimum should be of the correct dimension
void SetMinPoint(Vector<double> & minimum) const
Resets minPoint to the point represented by the input parameter minimum
void GetMinVal(double & value) const
Retrieves the best objective function value found thus far
void SetMinVal(double & value)
Resets the minimum value to the value of the input parameter
long GetDimension() const
Returns the dimension of the problem
long GetMaxCalls() const
Returns the number of function calls in the budget; if the value is equal to NO_MAX, will terminate based only on refinement of the design
void SetMaxCalls(long calls)
Use to set a function call budget; by default set to the value of NO_MAX, which indicates no budget, in which case the search will terminate based only upon grid refinement
void SetMaxCallsExact(long calls)
Sets maxCalls to the value of calls, and sets exact_count to true, so search will terminate precisely when the call budget runs out
Matrix <double> * GetDesign()
Returns a pointer to a matrix initialized from the design matrix
void CopyDesign(Matrix<double>* &designPtr) const
Deep copy of the pattern to a Matrix pointer
double GetStoppingStepLength() const
Returns stoppingStepLength, the smallest step length allowed in the search
void SetStoppingStepLength(double len)
Sets stoppingStepLength, the smallest step length allowed in the search, to the value of the input parameter
virtual void SetExact()
Allows the user to specify that the search will terminate precicely upon completion of maxCalls number of function calls
virtual void SetInexact()
Allows the user to specify that the search will terminate upon completion of roughly maxCalls number of function calls, but only after a pattern decrease or "shrink" step
virtual bool IsExact()
Returns the value of exact_count(q

Protected Fields

Matrix <double> * design
long dimension
Vector <double> * minPoint
double minValue
long functionCalls
long maxCalls
double stoppingStepLength
void* some_object
bool exact_count
int IDnumber

Protected Methods

void fcnCall(long n, Vector<double> &x, double & f, bool& flag, void * nothing)
bool BreakOnExact()
void (*fcn_name)(long dim, Vector<double> &x, double & function, bool & success, void* an_object)

Documentation

MultiCompassSearch is based on the class CompassSearch, derived from Class PatternSearch. the MultiCompassSearch is a multi-start version. This is, of course, MAPS compatable. Chris Siefert, College of William and Mary 6/23/00
Constructors and Destructor

MultiCompassSearch(int numberOfVariables, Vector<double> & startPoint)
Constructor for class MultiCompassSearch. after it calls its parent class constructor, it sets the following:
    random_start_pt=NULL
    NumSearches=1
    IterationCap=-1
    stream=0
Parameters:
numberOfVariables - is the dimension of the problem
startPoint - is the starting point for the search

MultiCompassSearch(long dim, Vector<double>& startPoint, double startStep, double stopStep, void (*objective)(long vars, Vector<double>&x, double & func, bool & flag, void * an_obj), void *input_obj)
Another constructor. This is equivalent to the CompassSearch constructor with the same signature.

~MultiCompassSearch()
Destructor

MultiCompassSearch& operator=(const MultiCompassSearch &A)
overloaded assignment operator

Other public methods

virtual void ResetParams(long NS, long IC, long str, const Bounds &b)
Resets the private fields. INPUT: The number of different searches to run, the number of iterations to cap each search at, and the random stream number.
Returns:
void
Parameters:
NS - the new number of searches
IC - the new iteration cap
str - is the new random number stream
b - is a reference to a struct containing the new bounds

void BeginSearch()
This MultiStarts a bunch of CompassSearches, and reports the best result
Returns:
void

long NumSearches
The number of searches you want to do

long IterationCap
Your maximum number of allowed function calls for each search in the series

long stream
the random number stream, for rngs

Vector <double> * random_start_pt
a random startig point

Bounds bds
this is a struct of type Bounds. See maps_general.h for declaration.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de