#include <NLP0.h>
Inheritance diagram for OPTPP::NLP0:
Public Member Functions | |
NLP0 () | |
NLP0 (int ndim) | |
NLP0 (int ndim, int nlncons) | |
NLP0 (int ndim, CompoundConstraint *constraint) | |
NLP0 () | |
NLP0 (int ndim) | |
NLP0 (int ndim, int nlncons) | |
NLP0 (int ndim, CompoundConstraint *constraint) | |
virtual void | setX (const int i, const real &x) |
Functions for setting various properties of this NLP problem. | |
virtual void | setX (const NEWMAT::ColumnVector &x) |
virtual void | setF (const real &fx) |
virtual void | setIsExpensive (const int e) |
virtual void | setFcnAccrcy (const int i, const real &accrcy) |
virtual void | setFcnAccrcy (const NEWMAT::ColumnVector &accrcy) |
virtual int | getDim () const |
virtual int | getFevals () const |
virtual int | getIsExpensive () const |
virtual void | setModeOverride (bool override_mode) |
virtual bool | getModeOverride () const |
virtual real | getF () const |
virtual NEWMAT::ColumnVector | getFcnAccrcy () const |
virtual NEWMAT::ColumnVector | getXc () const |
virtual real | getFcnTime () const |
virtual void | setDebug () |
virtual bool | getDebug () const |
void | setDerivOption (DerivOption d) |
DerivOption | getDerivOption () const |
void | setSpecOption (SpecOption SpecEval) |
SpecOption | getSpecOption () const |
virtual void | reset ()=0 |
virtual void | initFcn ()=0 |
virtual void | eval ()=0 |
virtual real | evalF ()=0 |
virtual real | evalF (const NEWMAT::ColumnVector &x)=0 |
int | getNumOfCons () const |
int | getNumOfNLCons () const |
NEWMAT::ColumnVector | getConstraintValue () const |
void | setConstraintValue (const NEWMAT::ColumnVector &cfx) |
Set the constraint value. | |
bool | hasConstraints () |
void | printConstraints () |
CompoundConstraint * | getConstraints () |
void | setConstraints (CompoundConstraint *constraintSet) |
Set a pointer to a CompoundConstraint object. | |
virtual | ~NLP0 () |
Destructor. | |
NEWMAT::ColumnVector | FDGrad (const NEWMAT::ColumnVector &, const NEWMAT::ColumnVector &, double &, NEWMAT::ColumnVector &) |
Finite-difference gradient and Hessian. | |
NEWMAT::ColumnVector | BDGrad (const NEWMAT::ColumnVector &, const NEWMAT::ColumnVector &, double &, NEWMAT::ColumnVector &) |
NEWMAT::ColumnVector | CDGrad (const NEWMAT::ColumnVector &, const NEWMAT::ColumnVector &, double &, NEWMAT::ColumnVector &) |
NEWMAT::SymmetricMatrix | FD2Hessian (NEWMAT::ColumnVector &) |
NEWMAT::Matrix | CONFDGrad (const NEWMAT::ColumnVector &) |
Finite-difference gradient and Hessian of nonlinear constraints. | |
NEWMAT::Matrix | CONBDGrad (const NEWMAT::ColumnVector &) |
NEWMAT::Matrix | CONCDGrad (const NEWMAT::ColumnVector &) |
virtual NEWMAT::ColumnVector | evalG ()=0 |
Evaluate a finite-difference gradient and Hessian. | |
virtual NEWMAT::ColumnVector | evalG (const NEWMAT::ColumnVector &x)=0 |
virtual NEWMAT::SymmetricMatrix | evalH ()=0 |
virtual NEWMAT::SymmetricMatrix | evalH (NEWMAT::ColumnVector &x)=0 |
virtual real | evalLagrangian (const NEWMAT::ColumnVector &x, NEWMAT::ColumnVector &mult, const NEWMAT::ColumnVector &type)=0 |
Evaluate the Lagrangian. | |
virtual NEWMAT::ColumnVector | evalLagrangianGradient (const NEWMAT::ColumnVector &x, const NEWMAT::ColumnVector &mult, const NEWMAT::ColumnVector &type)=0 |
Evaluate the Lagrangian gradient. | |
virtual NEWMAT::ColumnVector | evalCF (const NEWMAT::ColumnVector &x)=0 |
Evaluate the constraint at x. | |
virtual NEWMAT::Matrix | evalCG (const NEWMAT::ColumnVector &x)=0 |
Evaluate the constraint gradient at x. | |
virtual NEWMAT::SymmetricMatrix | evalCH (NEWMAT::ColumnVector &x)=0 |
virtual OptppArray< NEWMAT::SymmetricMatrix > | evalCH (NEWMAT::ColumnVector &x, int darg)=0 |
Evaluate the constraint Hessian at x. | |
virtual void | evalC (const NEWMAT::ColumnVector &x)=0 |
virtual void | printState (char *) |
Print the function. | |
virtual void | fPrintState (ostream *, char *) |
Print state of the function to a file. | |
void | saveState () |
Save current state of the function. | |
Protected Attributes | |
int | dim |
Dimension of the problem. | |
NEWMAT::ColumnVector | mem_xc |
Current point. | |
real | fvalue |
Objective function value at mem_xc. | |
char | nlp_name [80] |
Optional identifying name. | |
NEWMAT::ColumnVector | mem_fcn_accrcy |
Accuracy available from function. | |
int | nfevals |
Number of function evaluations. | |
int | is_expensive |
Is this an expensive function? | |
bool | debug_ |
Print debug statements. | |
bool | modeOverride |
double | function_time |
Function compute time. | |
CompoundConstraint * | constraint_ |
Pointer to constraints. | |
NEWMAT::ColumnVector | constraint_value |
Constraint residual. | |
int | ncnln |
Number of nonlinear constraints. | |
Appl_Data | application |
DerivOption | finitediff |
User-specified derivative option. | |
SpecOption | SpecFlag |
Speculative gradient information. | |
NEWMAT::ColumnVector | partial_grad |
double | specF |
OPTPP::NLP0::NLP0 | ( | ) | [inline] |
Default Constructor
OPTPP::NLP0::NLP0 | ( | int | ndim | ) | [inline] |
ndim | an int |
OPTPP::NLP0::NLP0 | ( | int | ndim, | |
int | nlncons | |||
) | [inline] |
ndim | an int | |
nlncons | an int |
OPTPP::NLP0::NLP0 | ( | int | ndim, | |
CompoundConstraint * | constraint | |||
) | [inline] |
ndim | an int | |
constraint | pointer to a CompoundConstraint |
OPTPP::NLP0::NLP0 | ( | ) | [inline] |
Default Constructor
OPTPP::NLP0::NLP0 | ( | int | ndim | ) | [inline] |
ndim | an int |
OPTPP::NLP0::NLP0 | ( | int | ndim, | |
int | nlncons | |||
) | [inline] |
ndim | an int | |
nlncons | an int |
OPTPP::NLP0::NLP0 | ( | int | ndim, | |
CompoundConstraint * | constraint | |||
) | [inline] |
ndim | an int | |
constraint | pointer to a CompoundConstraint |
virtual OPTPP::NLP0::~NLP0 | ( | ) | [inline, virtual] |
Destructor.
NEWMAT::ColumnVector OPTPP::NLP0::BDGrad | ( | const NEWMAT::ColumnVector & | , | |
const NEWMAT::ColumnVector & | , | |||
double & | , | |||
NEWMAT::ColumnVector & | ||||
) |
NEWMAT::ColumnVector OPTPP::NLP0::CDGrad | ( | const NEWMAT::ColumnVector & | , | |
const NEWMAT::ColumnVector & | , | |||
double & | , | |||
NEWMAT::ColumnVector & | ||||
) |
NEWMAT::Matrix OPTPP::NLP0::CONBDGrad | ( | const NEWMAT::ColumnVector & | ) |
NEWMAT::Matrix OPTPP::NLP0::CONCDGrad | ( | const NEWMAT::ColumnVector & | ) |
NEWMAT::Matrix OPTPP::NLP0::CONFDGrad | ( | const NEWMAT::ColumnVector & | ) |
Finite-difference gradient and Hessian of nonlinear constraints.
virtual void OPTPP::NLP0::eval | ( | ) | [pure virtual] |
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual void OPTPP::NLP0::evalC | ( | const NEWMAT::ColumnVector & | x | ) | [pure virtual] |
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual NEWMAT::ColumnVector OPTPP::NLP0::evalCF | ( | const NEWMAT::ColumnVector & | x | ) | [pure virtual] |
Evaluate the constraint at x.
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual NEWMAT::Matrix OPTPP::NLP0::evalCG | ( | const NEWMAT::ColumnVector & | x | ) | [pure virtual] |
Evaluate the constraint gradient at x.
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual OptppArray<NEWMAT::SymmetricMatrix> OPTPP::NLP0::evalCH | ( | NEWMAT::ColumnVector & | x, | |
int | darg | |||
) | [pure virtual] |
Evaluate the constraint Hessian at x.
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual NEWMAT::SymmetricMatrix OPTPP::NLP0::evalCH | ( | NEWMAT::ColumnVector & | x | ) | [pure virtual] |
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual real OPTPP::NLP0::evalF | ( | const NEWMAT::ColumnVector & | x | ) | [pure virtual] |
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual real OPTPP::NLP0::evalF | ( | ) | [pure virtual] |
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual NEWMAT::ColumnVector OPTPP::NLP0::evalG | ( | const NEWMAT::ColumnVector & | x | ) | [pure virtual] |
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual NEWMAT::ColumnVector OPTPP::NLP0::evalG | ( | ) | [pure virtual] |
Evaluate a finite-difference gradient and Hessian.
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual NEWMAT::SymmetricMatrix OPTPP::NLP0::evalH | ( | NEWMAT::ColumnVector & | x | ) | [pure virtual] |
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual NEWMAT::SymmetricMatrix OPTPP::NLP0::evalH | ( | ) | [pure virtual] |
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual real OPTPP::NLP0::evalLagrangian | ( | const NEWMAT::ColumnVector & | x, | |
NEWMAT::ColumnVector & | mult, | |||
const NEWMAT::ColumnVector & | type | |||
) | [pure virtual] |
Evaluate the Lagrangian.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual NEWMAT::ColumnVector OPTPP::NLP0::evalLagrangianGradient | ( | const NEWMAT::ColumnVector & | x, | |
const NEWMAT::ColumnVector & | mult, | |||
const NEWMAT::ColumnVector & | type | |||
) | [pure virtual] |
Evaluate the Lagrangian gradient.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
NEWMAT::SymmetricMatrix OPTPP::NLP0::FD2Hessian | ( | NEWMAT::ColumnVector & | ) |
NEWMAT::ColumnVector OPTPP::NLP0::FDGrad | ( | const NEWMAT::ColumnVector & | , | |
const NEWMAT::ColumnVector & | , | |||
double & | , | |||
NEWMAT::ColumnVector & | ||||
) |
Finite-difference gradient and Hessian.
void OPTPP::NLP0::fPrintState | ( | ostream * | , | |
char * | ||||
) | [virtual] |
Print state of the function to a file.
Implements OPTPP::NLPBase.
Reimplemented in OPTPP::FDNLF1, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
CompoundConstraint* OPTPP::NLP0::getConstraints | ( | ) | [inline] |
NEWMAT::ColumnVector OPTPP::NLP0::getConstraintValue | ( | ) | const [inline] |
virtual bool OPTPP::NLP0::getDebug | ( | ) | const [inline, virtual] |
Implements OPTPP::NLPBase.
DerivOption OPTPP::NLP0::getDerivOption | ( | ) | const [inline] |
virtual int OPTPP::NLP0::getDim | ( | ) | const [inline, virtual] |
virtual real OPTPP::NLP0::getF | ( | ) | const [inline, virtual] |
virtual NEWMAT::ColumnVector OPTPP::NLP0::getFcnAccrcy | ( | ) | const [inline, virtual] |
Implements OPTPP::NLPBase.
virtual real OPTPP::NLP0::getFcnTime | ( | ) | const [inline, virtual] |
virtual int OPTPP::NLP0::getFevals | ( | ) | const [inline, virtual] |
virtual int OPTPP::NLP0::getIsExpensive | ( | ) | const [inline, virtual] |
virtual bool OPTPP::NLP0::getModeOverride | ( | ) | const [inline, virtual] |
int OPTPP::NLP0::getNumOfCons | ( | ) | const [inline, virtual] |
int OPTPP::NLP0::getNumOfNLCons | ( | ) | const [inline, virtual] |
SpecOption OPTPP::NLP0::getSpecOption | ( | ) | const [inline] |
virtual NEWMAT::ColumnVector OPTPP::NLP0::getXc | ( | ) | const [inline, virtual] |
bool OPTPP::NLP0::hasConstraints | ( | ) | [virtual] |
virtual void OPTPP::NLP0::initFcn | ( | ) | [pure virtual] |
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
void OPTPP::NLP0::printConstraints | ( | ) | [virtual] |
Print constraints to standard output
Implements OPTPP::NLPBase.
void OPTPP::NLP0::printState | ( | char * | ) | [virtual] |
Print the function.
Implements OPTPP::NLPBase.
Reimplemented in OPTPP::FDNLF1, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
virtual void OPTPP::NLP0::reset | ( | ) | [pure virtual] |
Implements OPTPP::NLPBase.
Implemented in OPTPP::LSQNLF, OPTPP::NLF0, OPTPP::NLF1, OPTPP::NLF2, OPTPP::FDNLF1, OPTPP::NLF0APP, OPTPP::FDNLF1APP, OPTPP::NLP1, and OPTPP::NLP2.
void OPTPP::NLP0::saveState | ( | ) |
Save current state of the function.
void OPTPP::NLP0::setConstraints | ( | CompoundConstraint * | constraintSet | ) | [inline] |
Set a pointer to a CompoundConstraint object.
void OPTPP::NLP0::setConstraintValue | ( | const NEWMAT::ColumnVector & | cfx | ) | [inline] |
Set the constraint value.
virtual void OPTPP::NLP0::setDebug | ( | ) | [inline, virtual] |
Implements OPTPP::NLPBase.
void OPTPP::NLP0::setDerivOption | ( | DerivOption | d | ) | [inline] |
virtual void OPTPP::NLP0::setF | ( | const real & | fx | ) | [inline, virtual] |
Implements OPTPP::NLPBase.
virtual void OPTPP::NLP0::setFcnAccrcy | ( | const NEWMAT::ColumnVector & | accrcy | ) | [inline, virtual] |
Implements OPTPP::NLPBase.
virtual void OPTPP::NLP0::setFcnAccrcy | ( | const int | i, | |
const real & | accrcy | |||
) | [inline, virtual] |
Implements OPTPP::NLPBase.
virtual void OPTPP::NLP0::setIsExpensive | ( | const int | e | ) | [inline, virtual] |
Implements OPTPP::NLPBase.
virtual void OPTPP::NLP0::setModeOverride | ( | bool | override_mode | ) | [inline, virtual] |
void OPTPP::NLP0::setSpecOption | ( | SpecOption | SpecEval | ) | [inline] |
virtual void OPTPP::NLP0::setX | ( | const NEWMAT::ColumnVector & | x | ) | [inline, virtual] |
Implements OPTPP::NLPBase.
virtual void OPTPP::NLP0::setX | ( | const int | i, | |
const real & | x | |||
) | [inline, virtual] |
Appl_Data OPTPP::NLP0::application [protected] |
CompoundConstraint* OPTPP::NLP0::constraint_ [protected] |
Pointer to constraints.
NEWMAT::ColumnVector OPTPP::NLP0::constraint_value [protected] |
Constraint residual.
bool OPTPP::NLP0::debug_ [protected] |
Print debug statements.
int OPTPP::NLP0::dim [protected] |
Dimension of the problem.
DerivOption OPTPP::NLP0::finitediff [protected] |
User-specified derivative option.
double OPTPP::NLP0::function_time [protected] |
Function compute time.
real OPTPP::NLP0::fvalue [protected] |
Objective function value at mem_xc.
int OPTPP::NLP0::is_expensive [protected] |
Is this an expensive function?
NEWMAT::ColumnVector OPTPP::NLP0::mem_fcn_accrcy [protected] |
Accuracy available from function.
NEWMAT::ColumnVector OPTPP::NLP0::mem_xc [protected] |
Current point.
bool OPTPP::NLP0::modeOverride [protected] |
int OPTPP::NLP0::ncnln [protected] |
Number of nonlinear constraints.
int OPTPP::NLP0::nfevals [protected] |
Number of function evaluations.
char OPTPP::NLP0::nlp_name[80] [protected] |
Optional identifying name.
NEWMAT::ColumnVector OPTPP::NLP0::partial_grad [protected] |
double OPTPP::NLP0::specF [protected] |
SpecOption OPTPP::NLP0::SpecFlag [protected] |
Speculative gradient information.