class NLessSearch : public PatternSearch

NlessSearch is derived from PatternSearch

Inheritance:



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

NlessSearch is derived from PatternSearch. It searches using a search lattice based on a simplex.

NLessSearch(long numberOfVariables, Vector<double> &startPoint)
Constructor for NLessSearch. This constructor has two parameters. All it does is call the PatternSearch constructor with the same signature, then change the IDnumber to 2500.

Parameters:
dim - the dimension of the problem
startpoint - the start point for the search
See Also:
PatternSearch::PatternSearch(long dim, Vector &startPoint)

NLessSearch(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 NLessSearch constructor using void function and object pointers. This constructor merely calls the PatternSearch constructor with the same signature, then changes the IDnumber to 2500. This constructor takes six input parameters.
Parameters:
dim - the dimension of the problem
startPoint - a Vector of doubles, the starting point for the search
startStep - the beginning delta, or lattice step length
stopStep - the stopping step length for the search
objective - a pointer to the function to be minimized
input_obj - used to send additional data as needed--will normally be set to NULL.
See Also:
PatternSearch(long dim, Vector &startPoint, double startStep, double stopStep, void (*objective)(long vars, Vector &x, double & func, bool& flag, void* an_obj), void * input_obj)

~NLessSearch()
Destructor

void BeginSearch()
BeginSearch will call the methods that implement the actual NLessSearch algorithm.
Returns:
void

void ExploratoryMoves()
Exploratory Moves does the main work of the algorithm
Returns:
void

void CreatePattern()
CreatePattern() builds a regular simplex
Returns:
void

void UpdatePattern()
Calls the PatternSearch method ScalePattern to scale the trial steps by half
Returns:
void

void SizePattern(long dimens, Matrix<double> & pat, double size)
Rescales the simplex to the desired size
Returns:
void
Parameters:
dimens - the dimension of the matrix
pat - a reference to a design Matrix.
size - the desired size


This class has no child classes.
Author:
Elizabeth Dolan, modified by P.L.(Anne) Shepherd, 2000-2001

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