#include <APPSPACK_Directions.hpp>
Collaboration diagram for APPSPACK::Directions:
The job of this object is to generate an appropriate set of search directions for given point, and then to track and update the associated step lengths.
For each direction, we track the desired step length, the true step length (if the desired step length takes us outside the feasible region we instead substitute a step length that keeps us feasible), and the associated trial point tag.
The true step and tag are actually calculated by Solver::generateTrialPoints and just stored in this object for information purposes.
Parameters
These parameters are are stored in the Parameter::List that is passed to the Solver constructor. See Solver Parameters for full details on these parameters.
Definition at line 76 of file APPSPACK_Directions.hpp.
Public Member Functions | |
Directions (Parameter::List ¶ms, const Constraints::Interface &constraints_in) | |
Constructor. | |
~Directions () | |
Destructor. | |
Accessors | |
const vector< int > & | getDirectionIndices () const |
Returns the indices of directions that are ready for new trial points. | |
const Vector & | getDirection (int i) const |
Returns the i-th search direction. | |
double | getStep (int i) const |
Returns the i-th step. | |
bool | isStepConverged () const |
Returns true if every step length is less than the step convergence tolerance. | |
Manipulators | |
void | computeNewDirections (const Point &newPoint) |
Computes a new set of search directions based on a new best point. | |
void | setTrueStepAndTag (int i, double trueStep_in, int tag_in) |
Set the true step and tag for the trial point corresponding to direction i. | |
void | reduceStep (int i) |
Reduce the step corresponding to direction i. | |
Printing | |
void | print (const string label) const |
Print the directions, preceeded by the given label | |
Private Attributes | |
const Constraints::Interface & | constraints |
The constraints object. | |
const int | nDimensions |
The number of dimensions. | |
const Vector | zero |
The vector of all zeros. | |
const double | stepTolerance |
The step tolerance used to test convergence, etc. | |
const double | minStep |
Minimum size of the step after a new minimum is found. | |
const double | theta |
Constraction parameter. | |
int | nDirections |
The current number of search directions. | |
vector< Vector > | direction |
The search directions. | |
Vector | step |
The steps associated with each search direction. | |
Vector | trueStep |
The actual step associated with each search direction. | |
vector< int > | tag |
The trial point tags corresponding to the search directions. | |
Vector | tmpVector |
A temporary vector. | |
vector< int > | idxVector |
A temporary integer vector. |
|
Constructor. Reads the "Step Tolerance", "Minimum Step", and "Contraction Factor" from the parameter list. Definition at line 42 of file APPSPACK_Directions.cpp. References APPSPACK::createZeroVector(), direction, minStep, nDimensions, nDirections, step, stepTolerance, tag, and trueStep. |
|
Destructor. Definition at line 78 of file APPSPACK_Directions.cpp. |
|
Returns the indices of directions that are ready for new trial points. A direction is ready for a new trial point if its associated step length is greater than or equal to the convergence tolerance and it doesn't already have an active trial point. Definition at line 92 of file APPSPACK_Directions.cpp. References idxVector, nDirections, step, stepTolerance, and tag. Referenced by APPSPACK::Solver::generateTrialPoints(). |
|
Returns the i-th search direction. Definition at line 82 of file APPSPACK_Directions.cpp. References direction, and APPSPACK::Vector. Referenced by APPSPACK::Solver::generateTrialPoints(). |
|
Returns the i-th step. Definition at line 87 of file APPSPACK_Directions.cpp. References step. Referenced by APPSPACK::Solver::generateTrialPoints(). |
|
Returns true if every step length is less than the step convergence tolerance. The steps are stored in the step vector. The convergence tolerance is stored in stepTolerance. Definition at line 181 of file APPSPACK_Directions.cpp. References nDirections, step, and stepTolerance. Referenced by APPSPACK::Solver::processEvaluatedTrialPoints(). |
|
Computes a new set of search directions based on a new best point. Also resets the step information. The initial step (which is the same for all directions) is calculated as
Here, References constraints, direction, APPSPACK::Constraints::Interface::getIsLower(), APPSPACK::Constraints::Interface::getIsUpper(), APPSPACK::Constraints::Interface::getLower(), APPSPACK::Constraints::Interface::getScaling(), APPSPACK::Point::getStep(), APPSPACK::Constraints::Interface::getUpper(), APPSPACK::Point::getX(), minStep, nDimensions, nDirections, step, tag, tmpVector, trueStep, APPSPACK::Vector, and zero. Referenced by APPSPACK::Solver::processNewBestPoint(). |
|
Set the true step and tag for the trial point corresponding to direction i. Definition at line 151 of file APPSPACK_Directions.cpp. Referenced by APPSPACK::Solver::generateTrialPoints(). |
|
Reduce the step corresponding to direction i. The new step is calculated as
Also resets the corresponding trueStep and tag. Definition at line 193 of file APPSPACK_Directions.cpp. References step, tag, theta, and trueStep. Referenced by APPSPACK::Solver::processEvaluatedTrialPoints(). |
|
Print the directions, preceeded by the given label Definition at line 158 of file APPSPACK_Directions.cpp. References direction, nDirections, step, tag, and trueStep. Referenced by APPSPACK::Solver::generateTrialPoints(), APPSPACK::Solver::processNewBestPoint(), and APPSPACK::Solver::solve(). |
|
The constraints object. Definition at line 155 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(). |
|
The number of dimensions. Definition at line 158 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(), and Directions(). |
|
The vector of all zeros. Definition at line 161 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(). |
|
The step tolerance used to test convergence, etc. Definition at line 164 of file APPSPACK_Directions.hpp. Referenced by Directions(), getDirectionIndices(), and isStepConverged(). |
|
Minimum size of the step after a new minimum is found. Definition at line 167 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(), and Directions(). |
|
Constraction parameter. Definition at line 170 of file APPSPACK_Directions.hpp. Referenced by reduceStep(). |
|
The current number of search directions. Definition at line 173 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(), Directions(), getDirectionIndices(), isStepConverged(), and print(). |
|
The search directions. Definition at line 176 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(), Directions(), getDirection(), and print(). |
|
The steps associated with each search direction. Definition at line 179 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(), Directions(), getDirectionIndices(), getStep(), isStepConverged(), print(), and reduceStep(). |
|
The actual step associated with each search direction. The step represents the longest feasible step that is less than or equal to the corresponding delta. Definition at line 185 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(), Directions(), print(), reduceStep(), and setTrueStepAndTag(). |
|
The trial point tags corresponding to the search directions. A value of -1 means that there is no trial point associated with the given direction. Definition at line 191 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(), Directions(), getDirectionIndices(), print(), reduceStep(), and setTrueStepAndTag(). |
|
A temporary vector. Definition at line 194 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(). |
|
A temporary integer vector. Definition at line 197 of file APPSPACK_Directions.hpp. Referenced by getDirectionIndices(). |
© Sandia Corporation | Site Contact | Privacy and Security
Generated on Wed Dec 14 18:41:05 2005 for APPSPACK 4.0.2 by
1.3.8 written by Dimitri van Heesch,
© 1997-2002