Sandia Home Sandia Home
Main Page | Publications | Downloads | Configuration | Running the Code | Solver Parameters | FAQ | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

APPSPACK::Point Class Reference

#include <APPSPACK_Point.hpp>

Collaboration diagram for APPSPACK::Point:

Collaboration graph
[legend]
List of all members.

Detailed Description

A trial point.

A trial point contains an x-vector either waiting to be evaluated or that is already evaluated. Each Point is unique and has an associated unique tag. Copying is disallowed.

Definition at line 54 of file APPSPACK_Point.hpp.

Public Types

enum  State {
  Infeasible, Unevaluated, CachedInsufficientDecrease, Cached,
  EvaluatedInsufficientDecrease, Evaluated
}
 The evaluation state of the trial point. More...

Public Member Functions

Constructors
 Point (const Vector &x_in, const Vector &f_in, double step_in, double alpha_in, Combiner::Generic &combiner_in)
 Point (const Vector &x_in, double step_in, const Point &parent, int idx_in)
Destructors
 ~Point ()
Accessors
const VectorgetX () const
double getF () const
const VectorgetVecF () const
int getTag () const
int getParentTag () const
int getIndex () const
double getStep () const
Manipulators
void setCachedFunctionValue (const Vector &f_in, const string &msg_in)
void setEvaluatedFunctionValue (const Vector &f_in, const string &msg_in)
void setInfeasible ()
Comparisons
bool operator< (const Point &other) const
bool lessThan (const Vector &value) const
 Returns true if combiner(f) < combiner(other).
bool greaterThan (const Vector &value) const
 Returns trure if combiner(f) > combiner(other).
Printing
ostream & leftshift (ostream &stream) const
 Print out the point to the given stream.

Private Member Functions

void operator= (const Point &source)
 Disallowed.
 Point (const Point &source)
 Disallow copy constructor.
bool isSufficientDecrease () const
 Check for sufficient decrease as compared to the parent's function value.

Private Attributes

Combiner::Genericcombiner
 Combines vector values stored in class Values.
const Vector x
 The x vector.
Vector f
 The function value (which may be a vector of values), f(x).
const int tag
 Integer tag value.
const double step
 The step that was used to create this point.
string msg
 Message string.
const int parentTag
 Integer tag of parent.
const int idx
 Index of corresponding direction.
const double parentF
 Parent function value.
const double alpha
 Value of the sufficient decrease parameter.
const double rho
 Value of $\rho$ used in sufficient decrease calculation.
State state
 Trial point state.

Static Private Attributes

int staticCount = 0
 Static counter used to generate unique tags.


Member Enumeration Documentation

enum APPSPACK::Point::State
 

The evaluation state of the trial point.

Enumeration values:
Infeasible  Trial point violates constraints.
Unevaluated  Trial point has not yet been evaluated.
CachedInsufficientDecrease  Trial point function value has been retrieved from the cache, but there is insufficient decrease.
Cached  Trial point function value has been retrieved from the cache.
EvaluatedInsufficientDecrease  Trial point has been evaluated successfully, but there is insufficient decrease.
Evaluated  Trial point has been evaluated successfully, and there is sufficient decrease.

Definition at line 59 of file APPSPACK_Point.hpp.


Constructor & Destructor Documentation

APPSPACK::Point::Point const Vector x_in,
const Vector f_in,
double  step_in,
double  alpha_in,
Combiner::Generic combiner_in
 

Construct a trial point with no parent. This constructor is only used for the initial guess.

Parameters:
x_in - The x-vector.
f_in - The function value (which may be unknown).
step_in - The step length.
alpha_in - The value of alpha to be used by all points.
combiner_in - Object which combines the components stored in f_in to create a scalar objective value.

Definition at line 44 of file APPSPACK_Point.cpp.

References APPSPACK::dne(), and staticCount.

APPSPACK::Point::Point const Vector x_in,
double  step_in,
const Point parent,
int  idx_in
 

Construct a trial point with a parent.

Parameters:
x_in - The x-vector to be evaluated.
step_in - The step length. This is saved as step and also used in the calculation of rho.
parent - The parent of this trial point. The tag of this point is saved as parentTag for later use in processing the resulting function evaluation. Also, the function value is saved as #parentValue to save for the sufficient decrease comparison. Finally, alpha is copied.
idx_in - The index of direction used to generate this trial point, saved as idx. This is used in processing the resulting function value.

Definition at line 63 of file APPSPACK_Point.cpp.

References staticCount.

APPSPACK::Point::~Point  ) 
 

Destructor

Definition at line 81 of file APPSPACK_Point.cpp.

APPSPACK::Point::Point const Point source  )  [private]
 

Disallow copy constructor.


Member Function Documentation

const APPSPACK::Vector & APPSPACK::Point::getX  )  const
 

Return x. Needed for extracting points to send to user function evaluator.

Definition at line 85 of file APPSPACK_Point.cpp.

Referenced by APPSPACK::Directions::computeNewDirections(), APPSPACK::Conveyor::exchange(), APPSPACK::Solver::generateTrialPoints(), APPSPACK::Solver::getBestX(), and APPSPACK::Solver::writeSolutionFile().

double APPSPACK::Point::getF  )  const
 

Return single function value

Definition at line 90 of file APPSPACK_Point.cpp.

References combiner, and f.

Referenced by APPSPACK::Solver::getBestF(), and APPSPACK::Solver::processNewBestPoint().

const APPSPACK::Vector & APPSPACK::Point::getVecF  )  const
 

Return vector of function values

Definition at line 95 of file APPSPACK_Point.cpp.

Referenced by APPSPACK::Solver::getBestVecF(), and APPSPACK::Solver::writeSolutionFile().

int APPSPACK::Point::getTag  )  const
 

Get the tag of this trial point.

Definition at line 100 of file APPSPACK_Point.cpp.

Referenced by APPSPACK::Conveyor::exchange(), APPSPACK::Solver::generateTrialPoints(), and APPSPACK::Solver::processEvaluatedTrialPoints().

int APPSPACK::Point::getParentTag  )  const
 

Get parent's tag.

Definition at line 105 of file APPSPACK_Point.cpp.

Referenced by APPSPACK::Solver::processEvaluatedTrialPoints().

int APPSPACK::Point::getIndex  )  const
 

Get index of direction the generated this trial point.

Definition at line 110 of file APPSPACK_Point.cpp.

Referenced by APPSPACK::Solver::processEvaluatedTrialPoints().

double APPSPACK::Point::getStep  )  const
 

Return the step associated with this trial point.

Definition at line 115 of file APPSPACK_Point.cpp.

Referenced by APPSPACK::Directions::computeNewDirections().

void APPSPACK::Point::setCachedFunctionValue const Vector f_in,
const string &  msg_in
 

Store the cached function value in f. Automatically checks for sufficient decrease and sets state appropriately.

Definition at line 120 of file APPSPACK_Point.cpp.

References Cached, f, isSufficientDecrease(), msg, and state.

Referenced by APPSPACK::Conveyor::exchange().

void APPSPACK::Point::setEvaluatedFunctionValue const Vector f_in,
const string &  msg_in
 

Store the evaluated function value in f. Automatically checks for sufficient decrease and sets state appropriately.

Definition at line 127 of file APPSPACK_Point.cpp.

References Evaluated, f, isSufficientDecrease(), msg, and state.

Referenced by APPSPACK::Conveyor::exchange().

void APPSPACK::Point::setInfeasible  ) 
 

The trial point is infeasible. Set state appropriately.

Definition at line 134 of file APPSPACK_Point.cpp.

References state.

bool APPSPACK::Point::operator< const Point other  )  const
 

Basically, the evaluation is based on comparing the two function values. To complicate matters, however, we may not have to valid function values, which leads to all sorts of special cases. Further, if two different points have equal function values, we break ties based on the tag.

We apply the following logic, in order, to determine if this point is less than the other.

  • Case I: Tags are equal (i.e., comparing this point to itself. Return false.

  • Case II: This point does not have a valid function value. Return false.

  • Case III: The other point does not have a valid function value. Return true.

  • Case IV: This function value is less than the other. Return true.

  • Case V: The other function value is less than this one. Return false.

  • Case VI: This tag is less than the other tag. Return true.

  • Case VII: Default. Return false.

Definition at line 139 of file APPSPACK_Point.cpp.

References f, greaterThan(), lessThan(), state, and tag.

bool APPSPACK::Point::lessThan const Vector value  )  const
 

Returns true if combiner(f) < combiner(other).

Definition at line 165 of file APPSPACK_Point.cpp.

References combiner, APPSPACK::exists(), and f.

Referenced by operator<().

bool APPSPACK::Point::greaterThan const Vector value  )  const
 

Returns trure if combiner(f) > combiner(other).

Definition at line 182 of file APPSPACK_Point.cpp.

References combiner, APPSPACK::exists(), and f.

Referenced by operator<().

ostream & APPSPACK::Point::leftshift ostream &  stream  )  const
 

Print out the point to the given stream.

Definition at line 221 of file APPSPACK_Point.cpp.

References combiner, f, APPSPACK::Print::formatPositiveDouble(), and step.

Referenced by operator<<().

void APPSPACK::Point::operator= const Point source  )  [private]
 

Disallowed.

bool APPSPACK::Point::isSufficientDecrease  )  const [private]
 

Check for sufficient decrease as compared to the parent's function value.

Definition at line 200 of file APPSPACK_Point.cpp.

References combiner, APPSPACK::exists(), f, parentF, and rho.

Referenced by setCachedFunctionValue(), and setEvaluatedFunctionValue().


Member Data Documentation

int APPSPACK::Point::staticCount = 0 [static, private]
 

Static counter used to generate unique tags.

Definition at line 42 of file APPSPACK_Point.cpp.

Referenced by Point().

Combiner::Generic& APPSPACK::Point::combiner [private]
 

Combines vector values stored in class Values.

Definition at line 239 of file APPSPACK_Point.hpp.

Referenced by getF(), greaterThan(), isSufficientDecrease(), leftshift(), and lessThan().

const Vector APPSPACK::Point::x [private]
 

The x vector.

Definition at line 242 of file APPSPACK_Point.hpp.

Vector APPSPACK::Point::f [private]
 

The function value (which may be a vector of values), f(x).

Definition at line 245 of file APPSPACK_Point.hpp.

Referenced by getF(), greaterThan(), isSufficientDecrease(), leftshift(), lessThan(), operator<(), setCachedFunctionValue(), and setEvaluatedFunctionValue().

const int APPSPACK::Point::tag [private]
 

Integer tag value.

Definition at line 248 of file APPSPACK_Point.hpp.

Referenced by operator<().

const double APPSPACK::Point::step [private]
 

The step that was used to create this point.

Definition at line 251 of file APPSPACK_Point.hpp.

Referenced by leftshift().

string APPSPACK::Point::msg [private]
 

Message string.

Definition at line 254 of file APPSPACK_Point.hpp.

Referenced by setCachedFunctionValue(), and setEvaluatedFunctionValue().

const int APPSPACK::Point::parentTag [private]
 

Integer tag of parent.

Note:
If there is no parent, then the tag is -1

Definition at line 258 of file APPSPACK_Point.hpp.

const int APPSPACK::Point::idx [private]
 

Index of corresponding direction.

Definition at line 261 of file APPSPACK_Point.hpp.

const double APPSPACK::Point::parentF [private]
 

Parent function value.

Definition at line 264 of file APPSPACK_Point.hpp.

Referenced by isSufficientDecrease().

const double APPSPACK::Point::alpha [private]
 

Value of the sufficient decrease parameter.

This is used in the calculation of rho.

This value is set in the Point constructors. A user specified value may be provided by specifying the the "Sufficient Decrease Factor" parameter in the Parameter::List passed to APPSPACK::Solver::Solver(); see Solver Parameters.

Definition at line 275 of file APPSPACK_Point.hpp.

const double APPSPACK::Point::rho [private]
 

Value of $\rho$ used in sufficient decrease calculation.

The amount of decrease required is given by,

\[ \rho = \alpha \Delta^2 \]

Here $\alpha$ is alpha, and $\Delta$ is step.

Definition at line 285 of file APPSPACK_Point.hpp.

Referenced by isSufficientDecrease().

State APPSPACK::Point::state [private]
 

Trial point state.

Definition at line 288 of file APPSPACK_Point.hpp.

Referenced by operator<(), setCachedFunctionValue(), setEvaluatedFunctionValue(), and setInfeasible().


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

 

© Sandia Corporation | Site Contact | Privacy and Security

Generated on Fri Feb 16 10:33:36 2007 for APPSPACK 5.0.1 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2002