scsolver::numeric Namespace Reference


Classes

class  BaseLineSearch
class  BisectionSearch
class  CellFuncObj
class  FuncObjectNotSet
class  NumericalDiffer
class  Exception
class  ConstraintError
class  AssertionWrong
class  ModelInfeasible
class  MaxIterationReached
class  IterationTimedOut
class  UnboundedException
class  VarSizeException
class  BaseFuncObj
class  SingleVarFuncObj
class  BadIndex
class  MatrixSizeMismatch
class  MatrixNotDiagonal
class  OperationOnEmptyMatrix
class  SingularMatrix
class  NonSquareMatrix
class  Matrix
class  NotEnoughDataPoints
struct  DataPoint
class  PolyEqnSolver
class  QuadFitLineSearch
struct  CellFuncObjImpl
class  BaseFuncSingleObjImpl
class  BaseFuncRatioObjImpl
class  StepCalculationFailed
class  InitialPointsNotFound
struct  QuadFitSearchData
class  PrefixedSingleVarFuncObj

Namespaces

namespace  lp
namespace  mxhelper
namespace  nlp

Enumerations

enum  EqualityType { GREATER_EQUAL, EQUAL, LESS_EQUAL }
enum  BoundType { BOUND_UPPER, BOUND_LOWER }
enum  GoalType { GOAL_MINIMIZE, GOAL_MAXIMIZE, GOAL_UNKNOWN }
enum  ArmijoCheckStatus { Armijo_Unknown, Armijo_InitialCheckFailed, Armijo_AlphaCheckFailed, Armijo_Success }

Functions

const Matrix operator+ (const Matrix &mx, double scalar)
const Matrix operator+ (double scalar, const Matrix &mx)
const Matrix operator * (double scalar, const Matrix &mx)
void getQuadraticPeak (double &x, double &y, const Matrix &coef)
static ArmijoCheckStatus satisfiesArmijosRule (QuadFitSearchData &rData, double step, const double e, const double alpha, const double f0, const double ff0, const double xoffset=0.0, bool debug=false)
static double findLargestStep (QuadFitSearchData &rData, double step, const double e, const double alpha, const double f0, const double ff0, const double xoffset)
static void printArmijoStatus (ArmijoCheckStatus status)
static void calcStepLength (QuadFitSearchData &rData, bool debug)
static void findInitialPoints (QuadFitSearchData &data, bool debug)


Enumeration Type Documentation

enum scsolver::numeric::ArmijoCheckStatus

Enumerator:
Armijo_Unknown  unknown status
Armijo_InitialCheckFailed  initial check of f(step) <= f(0) + step*e*ff(0) failed, which means f(step) > f(0) + step*e*ff(0).
Armijo_AlphaCheckFailed  alpha check of f(step*alpha) <= f(0) + step*alphae*ff(0) failed.
Armijo_Success  all conditions are met.

Definition at line 90 of file quadfitlinesearch.cxx.

enum scsolver::numeric::BoundType

Upper or lower boundary for a decision variable.

Enumerator:
BOUND_UPPER 
BOUND_LOWER 

Definition at line 50 of file type.hxx.

enum scsolver::numeric::EqualityType

Enumerator:
GREATER_EQUAL  [constraint] >= [rhs]
EQUAL  [constraint] = [rhs]
LESS_EQUAL  [constraint] <= [rhs]

Definition at line 34 of file type.hxx.

enum scsolver::numeric::GoalType

Goal of an optimization model.

Enumerator:
GOAL_MINIMIZE 
GOAL_MAXIMIZE 
GOAL_UNKNOWN 

Definition at line 59 of file type.hxx.


Function Documentation

static void scsolver::numeric::calcStepLength ( QuadFitSearchData &  rData,
bool  debug 
) [static]

Definition at line 249 of file quadfitlinesearch.cxx.

References Armijo_InitialCheckFailed, Armijo_Success, Armijo_Unknown, scsolver::numeric::SingleVarFuncObj::eval(), findLargestStep(), scsolver::numeric::QuadFitSearchData::pFunc, printArmijoStatus(), scsolver::numeric::NumericalDiffer::run(), satisfiesArmijosRule(), scsolver::numeric::NumericalDiffer::setFuncObject(), scsolver::numeric::NumericalDiffer::setPrecision(), scsolver::numeric::SingleVarFuncObj::setVar(), scsolver::numeric::NumericalDiffer::setVariable(), scsolver::numeric::QuadFitSearchData::StepLength, and scsolver::numeric::QuadFitSearchData::XOffset.

Referenced by findInitialPoints().

static void scsolver::numeric::findInitialPoints ( QuadFitSearchData &  data,
bool  debug 
) [static]

Find an initial set of points (P1, P2 and P3 in this order from left to right) such that P1 > P2 and P2 < P3.

Parameters:
data 
Returns:
bool true if successful, or false otherwise.

Definition at line 329 of file quadfitlinesearch.cxx.

References calcStepLength(), scsolver::numeric::QuadFitSearchData::P1, scsolver::numeric::QuadFitSearchData::P2, scsolver::numeric::QuadFitSearchData::P3, scsolver::numeric::QuadFitSearchData::pFunc, scsolver::numeric::QuadFitSearchData::StepLength, and scsolver::numeric::QuadFitSearchData::XOffset.

Referenced by scsolver::numeric::QuadFitLineSearch::solve().

static double scsolver::numeric::findLargestStep ( QuadFitSearchData &  rData,
double  step,
const double  e,
const double  alpha,
const double  f0,
const double  ff0,
const double  xoffset 
) [static]

Find the largest step length that satisfies

f(step) <= f(0) + step * e * ff(0)

Author:
kyoshida
Parameters:
pFunc 
step 
e 
alpha 
f0 
ff0 
Returns:
largest step length that satisfies the above condition.

Definition at line 136 of file quadfitlinesearch.cxx.

References Armijo_Success, scsolver::numeric::SingleVarFuncObj::eval(), scsolver::numeric::QuadFitSearchData::pFunc, satisfiesArmijosRule(), and scsolver::numeric::SingleVarFuncObj::setVar().

Referenced by calcStepLength().

void scsolver::numeric::getQuadraticPeak ( double &  x,
double &  y,
const Matrix &  coef 
)

Calculate the peak position of a quadratic equation. The quadratic equation must be specified in terms of a set of three coefficients: A, B and C as in f(x) = Ax^2 + Bx + C, and they must be given as a column matrix of (C, B, A) (note the reverse order).

Parameters:
x the x position of the quadratic peak
y the y value at the quadratic peak
coef = (C, B, A) as in f(x) = Ax^2 + Bx + C. Note that the order of the coefficients are from the x^0 term toward x^2.

Definition at line 97 of file polyeqnsolver.cxx.

Referenced by QuadPeakTest::set(), and scsolver::numeric::QuadFitLineSearch::solve().

const Matrix scsolver::numeric::operator * ( double  scalar,
const Matrix &  mx 
)

Definition at line 1008 of file matrix.cxx.

const Matrix scsolver::numeric::operator+ ( double  scalar,
const Matrix &  mx 
)

Definition at line 1003 of file matrix.cxx.

const Matrix scsolver::numeric::operator+ ( const Matrix &  mx,
double  scalar 
)

Definition at line 998 of file matrix.cxx.

static void scsolver::numeric::printArmijoStatus ( ArmijoCheckStatus  status  )  [static]

Definition at line 228 of file quadfitlinesearch.cxx.

References Armijo_AlphaCheckFailed, Armijo_InitialCheckFailed, Armijo_Success, and Armijo_Unknown.

Referenced by calcStepLength().

static ArmijoCheckStatus scsolver::numeric::satisfiesArmijosRule ( QuadFitSearchData &  rData,
double  step,
const double  e,
const double  alpha,
const double  f0,
const double  ff0,
const double  xoffset,
bool  debug 
) [static]

Check if the step value satisfies Armijo's rule.

Author:
kyoshida
Parameters:
pFunc 
step 
e 
alpha 
f0 
ff0 
Returns:
true if the step value satisfies Armijo's rule, false otherwise.

Definition at line 186 of file quadfitlinesearch.cxx.

References Armijo_AlphaCheckFailed, Armijo_InitialCheckFailed, Armijo_Success, scsolver::numeric::SingleVarFuncObj::eval(), scsolver::numeric::QuadFitSearchData::pFunc, and scsolver::numeric::SingleVarFuncObj::setVar().

Referenced by calcStepLength(), and findLargestStep().


Generated on Mon Jul 28 09:13:49 2008 for scsolver by  doxygen 1.5.3