Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# APPSPACK::Directions Class Reference

`#include <APPSPACK_Directions.hpp>`

Collaboration diagram for APPSPACK::Directions:

[legend]
List of all members.

## Detailed Description

The search directions and associated information.

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.

- "Step Tolerance"
- "Minimum Step"
- "Contraction Factor"

Definition at line 76 of file APPSPACK_Directions.hpp.

## Public Member Functions
| Directions (Parameter::List &params, 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 & Destructor Documentation

APPSPACK::Directions::Directions | ( | Parameter::List & | params,
|  | const Constraints::Interface & | constraints_in
| ) |

| 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.

APPSPACK::Directions::~Directions | ( |  | ) |

| Destructor. Definition at line 78 of file APPSPACK_Directions.cpp.

## Member Function Documentation

const vector< int > & APPSPACK::Directions::getDirectionIndices | ( |  | ) | const

| 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().

const APPSPACK::Vector & APPSPACK::Directions::getDirection | ( | int | i | ) | const

| 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().

double APPSPACK::Directions::getStep | ( | int | i | ) | const

| Returns the i-th step. Definition at line 87 of file APPSPACK_Directions.cpp. References step. Referenced by APPSPACK::Solver::generateTrialPoints().

bool APPSPACK::Directions::isStepConverged | ( |  | ) | const

| 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().

void APPSPACK::Directions::computeNewDirections | ( | const Point & | newPoint | ) |

| 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, is minStep. Definition at line 101 of file APPSPACK_Directions.cpp. 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().

void APPSPACK::Directions::setTrueStepAndTag | ( | int | i,
|  | double | trueStep_in,
|  | int | tag_in
| ) |

| Set the true step and tag for the trial point corresponding to direction i. Definition at line 151 of file APPSPACK_Directions.cpp. References tag, and trueStep. Referenced by APPSPACK::Solver::generateTrialPoints().

void APPSPACK::Directions::reduceStep | ( | int | i | ) |

| 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().

void APPSPACK::Directions::print | ( | const string | label | ) | const

| 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().

## Member Data Documentation

const Constraints::Interface& APPSPACK::Directions::constraints`[private]`

| The constraints object. Definition at line 155 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections().

const int APPSPACK::Directions::nDimensions`[private]`

| The number of dimensions. Definition at line 158 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(), and Directions().

const Vector APPSPACK::Directions::zero`[private]`

| The vector of all zeros. Definition at line 161 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections().

const double APPSPACK::Directions::stepTolerance`[private]`

| The step tolerance used to test convergence, etc. Definition at line 164 of file APPSPACK_Directions.hpp. Referenced by Directions(), getDirectionIndices(), and isStepConverged().

const double APPSPACK::Directions::minStep`[private]`

| 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().

const double APPSPACK::Directions::theta`[private]`

| Constraction parameter. Definition at line 170 of file APPSPACK_Directions.hpp. Referenced by reduceStep().

int APPSPACK::Directions::nDirections`[private]`

| The current number of search directions. Definition at line 173 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(), Directions(), getDirectionIndices(), isStepConverged(), and print().

vector< Vector > APPSPACK::Directions::direction`[private]`

| The search directions. Definition at line 176 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections(), Directions(), getDirection(), and print().

Vector APPSPACK::Directions::step`[private]`

| 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().

Vector APPSPACK::Directions::trueStep`[private]`

| 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().

vector<int> APPSPACK::Directions::tag`[private]`

| 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().

Vector APPSPACK::Directions::tmpVector`[private]`

| A temporary vector. Definition at line 194 of file APPSPACK_Directions.hpp. Referenced by computeNewDirections().

vector<int> APPSPACK::Directions::idxVector`[mutable, private]`

| A temporary integer vector. Definition at line 197 of file APPSPACK_Directions.hpp. Referenced by getDirectionIndices().

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

- APPSPACK_Directions.hpp
- APPSPACK_Directions.cpp

© 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