OPTPP::OptimizeClass Class Reference

#include <Opt.h>

Inheritance diagram for OPTPP::OptimizeClass:

OPTPP::OptBCEllipsoid OPTPP::OptBCNewtonLike OPTPP::OptCGLike OPTPP::OptConstrNewtonLike OPTPP::OptDirect OPTPP::OptDirect OPTPP::OptLBFGSLike OPTPP::OptNewtonLike OPTPP::OptNPSOL List of all members.

Public Member Functions

 OptimizeClass ()
 OptimizeClass (int n)
 OptimizeClass (TOLS t)
 OptimizeClass (int n, TOLS t)
virtual ~OptimizeClass ()
void cleanup ()
void setMesg (const char *s)
 Set message.
void setMethod (const char *s)
 Set method of choice.
void setMaxStep (real x)
 Set maximum steplength.
void setMinStep (real x)
 Set minimum steplength.
void setStepTol (real x)
 Set step tolerance.
void setFcnTol (real x)
 Set function tolerance.
void setConTol (real x)
 Set constraint tolerance.
void setGradTol (real x)
 Set gradient tolerance.
void setLineSearchTol (real x)
 Set linesearch tolerance.
void setMaxIter (int k)
 Set maximum outer iterations.
void setMaxBacktrackIter (int k)
 Set maximum backtrack iterations.
void setMaxFeval (int k)
 Set maximum fcn evaluations.
void setUpdateModel (UPDATEFCN u)
 Set update model.
void setXScale (NEWMAT::ColumnVector x)
 Set step scale.
void setFcnScale (NEWMAT::ColumnVector x)
 Set function scale.
void setFcnScale (NEWMAT::Real x)
 Set function scale.
void setReturnCode (int val)
 Set return code.
int getDim () const
int getIter () const
int getReturnCode () const
char * getMesg ()
NEWMAT::ColumnVector getXPrev () const
NEWMAT::ColumnVector getXScale () const
NEWMAT::ColumnVector getFcnScale () const
ostream * getOutputFile ()
int setOutputFile (const char *filename, int append)
int setOutputFile (int FileDescriptor)
int setOutputFile (ostream &fout)
void setDebug ()
 Set debug flag to true.
bool Debug ()
virtual void acceptStep (int, int)=0
virtual int checkConvg ()=0
virtual NEWMAT::ColumnVector computeSearch (NEWMAT::SymmetricMatrix &)=0
virtual void optimize ()=0
virtual void reset ()=0
virtual void readOptInput ()=0
virtual void printStatus (char *)=0
virtual void updateModel (int, int, NEWMAT::ColumnVector)=0

Protected Member Functions

virtual real stepTolNorm () const
virtual void defaultReset (int n)
virtual void defaultAcceptStep (int, int)
virtual void defaultUpdateModel (int k, int ndim, NEWMAT::ColumnVector x)
void copyright ()

Protected Attributes

int dim
 Dimension of the problem.
TOLS tol
 Various tolerances assoc. with the problem.
NEWMAT::ColumnVector sx
 Diagonal Scaling Matrix for x.
NEWMAT::ColumnVector sfx
 Diagonal Scaling Matrix for f.
NEWMAT::ColumnVector xprev
 Previous iterate.
real fprev
 Objective function value at xprev.
NEWMAT::ColumnVector mem_step
 Current step direction.
real step_length
 Length of step direction.
char method [80]
 What method is being used.
char mesg [80]
 Optional message.
int ret_code
 Return code from Optimization class.
int iter_taken
 Number of iterations taken.
int fcn_evals
 Number of function evaluations taken.
int backtracks
 Number of bactracks in linesearch.
bool debug_
 Print debug statements.
int trace
double iter_time
 Compute time per iteration.
double total_time
 Total compute time.
UPDATEFCN update_fcn
 User defined function to call after each nonlinear iteration.
filebuf file_buffer
ostream * optout
 Output file.
int optout_fd
 Output file success.

Private Attributes

int x_optout_fd

Detailed Description

Opt is the Base Optimization Class All other Optimization classes are derived from this one


Constructor & Destructor Documentation

OPTPP::OptimizeClass::OptimizeClass (  )  [inline]

Default Constructor

See also:
OptimizeClass(int n)

OptimizeClass(TOLS t)

OptimizeClass(int n, TOLS t)

OPTPP::OptimizeClass::OptimizeClass ( int  n  )  [inline]

Parameters:
n an integer argument

OPTPP::OptimizeClass::OptimizeClass ( TOLS  t  )  [inline]

Parameters:
t a TOLS object

OPTPP::OptimizeClass::OptimizeClass ( int  n,
TOLS  t 
) [inline]

Parameters:
n an integer argument
t a TOLS object

virtual OPTPP::OptimizeClass::~OptimizeClass (  )  [inline, virtual]


Member Function Documentation

virtual void OPTPP::OptimizeClass::acceptStep ( int  ,
int   
) [pure virtual]

Note:
Pure virtual functions

Each derived class must define these functions for themselves

Implemented in OPTPP::OptBaNewton, OPTPP::OptBaQNewton, OPTPP::OptBCEllipsoid, OPTPP::OptBCNewtonLike, OPTPP::OptCGLike, OPTPP::OptCG, OPTPP::OptConstrNewtonLike, OPTPP::OptLBFGSLike, OPTPP::OptLBFGS, OPTPP::OptNewtonLike, OPTPP::OptNPSOL, and OPTPP::OptDirect.

virtual int OPTPP::OptimizeClass::checkConvg (  )  [pure virtual]

Implemented in OPTPP::OptBaNewton, OPTPP::OptBaQNewton, OPTPP::OptBCEllipsoid, OPTPP::OptBCNewton, OPTPP::OptBCNewtonLike, OPTPP::OptBCQNewton, OPTPP::OptCGLike, OPTPP::OptConstrNewtonLike, OPTPP::OptLBFGSLike, OPTPP::OptNewtonLike, OPTPP::OptNIPSLike, OPTPP::OptNPSOL, and OPTPP::OptDirect.

void OPTPP::OptimizeClass::cleanup (  )  [inline]

virtual NEWMAT::ColumnVector OPTPP::OptimizeClass::computeSearch ( NEWMAT::SymmetricMatrix &   )  [pure virtual]

Implemented in OPTPP::OptBCEllipsoid, OPTPP::OptBCNewton, OPTPP::OptBCNewtonLike, OPTPP::OptBCQNewton, OPTPP::OptCG, OPTPP::OptConstrNewtonLike, OPTPP::OptLBFGS, OPTPP::OptNewtonLike, and OPTPP::OptNPSOL.

void OPTPP::OptimizeClass::copyright (  )  [inline, protected]

Write copyright information to the screen

bool OPTPP::OptimizeClass::Debug (  )  [inline]

Returns:
Debug parameter

virtual void OPTPP::OptimizeClass::defaultAcceptStep ( int  ,
int   
) [inline, protected, virtual]

Provide default implementation of AcceptStep

Reimplemented in OPTPP::OptBCNewtonLike, OPTPP::OptConstrNewtonLike, and OPTPP::OptNewtonLike.

virtual void OPTPP::OptimizeClass::defaultReset ( int  n  )  [inline, protected, virtual]

Provide default implementation of reset

virtual void OPTPP::OptimizeClass::defaultUpdateModel ( int  k,
int  ndim,
NEWMAT::ColumnVector  x 
) [inline, protected, virtual]

Provide default implementation of UpdateModel

int OPTPP::OptimizeClass::getDim (  )  const [inline]

Returns:
Problem dimension

NEWMAT::ColumnVector OPTPP::OptimizeClass::getFcnScale (  )  const [inline]

Returns:
Scaling vector used for f(x)

int OPTPP::OptimizeClass::getIter (  )  const [inline]

Returns:
Iterations

char* OPTPP::OptimizeClass::getMesg (  )  [inline]

Returns:
Reason algorithm terminated

ostream* OPTPP::OptimizeClass::getOutputFile (  )  [inline]

Returns:
Output Filename

int OPTPP::OptimizeClass::getReturnCode (  )  const [inline]

Returns:
Return Code

NEWMAT::ColumnVector OPTPP::OptimizeClass::getXPrev (  )  const [inline]

Returns:
Previous iterate

NEWMAT::ColumnVector OPTPP::OptimizeClass::getXScale (  )  const [inline]

Returns:
Scaling vector used for x

virtual void OPTPP::OptimizeClass::optimize (  )  [pure virtual]

Implemented in OPTPP::OptBaNewton, OPTPP::OptBaQNewton, OPTPP::OptBCEllipsoid, OPTPP::OptBCNewtonLike, OPTPP::OptCGLike, OPTPP::OptCG, OPTPP::OptConstrNewtonLike, OPTPP::OptLBFGSLike, OPTPP::OptLBFGS, OPTPP::OptNewtonLike, OPTPP::OptNIPSLike, OPTPP::OptNPSOL, and OPTPP::OptDirect.

virtual void OPTPP::OptimizeClass::printStatus ( char *   )  [pure virtual]

Implemented in OPTPP::OptBCEllipsoid, OPTPP::OptBCNewton, OPTPP::OptBCNewtonLike, OPTPP::OptBCQNewton, OPTPP::OptCG, OPTPP::OptConstrNewton, OPTPP::OptConstrNewtonLike, OPTPP::OptDHNIPS, OPTPP::OptLBFGS, OPTPP::OptNewton, OPTPP::OptNewtonLike, OPTPP::OptNIPS, OPTPP::OptNIPSLike, and OPTPP::OptNPSOL.

virtual void OPTPP::OptimizeClass::readOptInput (  )  [pure virtual]

Implemented in OPTPP::OptBCEllipsoid, OPTPP::OptBCNewtonLike, OPTPP::OptCGLike, OPTPP::OptConstrNewtonLike, OPTPP::OptLBFGSLike, OPTPP::OptLBFGS, OPTPP::OptNewtonLike, OPTPP::OptNIPSLike, OPTPP::OptNPSOL, and OPTPP::OptDirect.

virtual void OPTPP::OptimizeClass::reset (  )  [pure virtual]

Implemented in OPTPP::OptBCEllipsoid, OPTPP::OptBCFDNewton, OPTPP::OptBCNewton, OPTPP::OptBCNewtonLike, OPTPP::OptBCQNewton, OPTPP::OptCG, OPTPP::OptConstrNewtonLike, OPTPP::OptDHNIPS, OPTPP::OptLBFGS, OPTPP::OptNewtonLike, OPTPP::OptNIPSLike, OPTPP::OptNPSOL, and OPTPP::OptDirect.

void OPTPP::OptimizeClass::setConTol ( real  x  )  [inline]

Set constraint tolerance.

void OPTPP::OptimizeClass::setDebug (  )  [inline]

Set debug flag to true.

void OPTPP::OptimizeClass::setFcnScale ( NEWMAT::Real  x  )  [inline]

Set function scale.

void OPTPP::OptimizeClass::setFcnScale ( NEWMAT::ColumnVector  x  )  [inline]

Set function scale.

void OPTPP::OptimizeClass::setFcnTol ( real  x  )  [inline]

Set function tolerance.

void OPTPP::OptimizeClass::setGradTol ( real  x  )  [inline]

Set gradient tolerance.

void OPTPP::OptimizeClass::setLineSearchTol ( real  x  )  [inline]

Set linesearch tolerance.

void OPTPP::OptimizeClass::setMaxBacktrackIter ( int  k  )  [inline]

Set maximum backtrack iterations.

void OPTPP::OptimizeClass::setMaxFeval ( int  k  )  [inline]

Set maximum fcn evaluations.

void OPTPP::OptimizeClass::setMaxIter ( int  k  )  [inline]

Set maximum outer iterations.

void OPTPP::OptimizeClass::setMaxStep ( real  x  )  [inline]

Set maximum steplength.

void OPTPP::OptimizeClass::setMesg ( const char *  s  )  [inline]

Set message.

void OPTPP::OptimizeClass::setMethod ( const char *  s  )  [inline]

Set method of choice.

void OPTPP::OptimizeClass::setMinStep ( real  x  )  [inline]

Set minimum steplength.

int OPTPP::OptimizeClass::setOutputFile ( ostream &  fout  )  [inline]

int OPTPP::OptimizeClass::setOutputFile ( int  FileDescriptor  )  [inline]

int OPTPP::OptimizeClass::setOutputFile ( const char *  filename,
int  append 
) [inline]

void OPTPP::OptimizeClass::setReturnCode ( int  val  )  [inline]

Set return code.

void OPTPP::OptimizeClass::setStepTol ( real  x  )  [inline]

Set step tolerance.

void OPTPP::OptimizeClass::setUpdateModel ( UPDATEFCN  u  )  [inline]

Set update model.

void OPTPP::OptimizeClass::setXScale ( NEWMAT::ColumnVector  x  )  [inline]

Set step scale.

virtual real OPTPP::OptimizeClass::stepTolNorm (  )  const [inline, protected, virtual]

Reimplemented in OPTPP::OptBCNewton, OPTPP::OptBCQNewton, OPTPP::OptCG, OPTPP::OptConstrNewton, OPTPP::OptLBFGS, and OPTPP::OptNewton.

virtual void OPTPP::OptimizeClass::updateModel ( int  ,
int  ,
NEWMAT::ColumnVector   
) [pure virtual]

Implemented in OPTPP::OptBCEllipsoid, OPTPP::OptBCNewtonLike, OPTPP::OptCGLike, OPTPP::OptCG, OPTPP::OptConstrNewtonLike, OPTPP::OptLBFGSLike, OPTPP::OptLBFGS, OPTPP::OptNewtonLike, OPTPP::OptNPSOL, and OPTPP::OptDirect.


Member Data Documentation

int OPTPP::OptimizeClass::backtracks [protected]

Number of bactracks in linesearch.

bool OPTPP::OptimizeClass::debug_ [protected]

Print debug statements.

int OPTPP::OptimizeClass::dim [protected]

Dimension of the problem.

int OPTPP::OptimizeClass::fcn_evals [protected]

Number of function evaluations taken.

filebuf OPTPP::OptimizeClass::file_buffer [protected]

real OPTPP::OptimizeClass::fprev [protected]

Objective function value at xprev.

int OPTPP::OptimizeClass::iter_taken [protected]

Number of iterations taken.

Reimplemented in OPTPP::OptNPSOL.

double OPTPP::OptimizeClass::iter_time [protected]

Compute time per iteration.

NEWMAT::ColumnVector OPTPP::OptimizeClass::mem_step [protected]

Current step direction.

char OPTPP::OptimizeClass::mesg[80] [protected]

Optional message.

char OPTPP::OptimizeClass::method[80] [protected]

What method is being used.

ostream* OPTPP::OptimizeClass::optout [protected]

Output file.

int OPTPP::OptimizeClass::optout_fd [protected]

Output file success.

int OPTPP::OptimizeClass::ret_code [protected]

Return code from Optimization class.

Reimplemented in OPTPP::OptNPSOL.

NEWMAT::ColumnVector OPTPP::OptimizeClass::sfx [protected]

Diagonal Scaling Matrix for f.

real OPTPP::OptimizeClass::step_length [protected]

Length of step direction.

NEWMAT::ColumnVector OPTPP::OptimizeClass::sx [protected]

Diagonal Scaling Matrix for x.

TOLS OPTPP::OptimizeClass::tol [protected]

Various tolerances assoc. with the problem.

double OPTPP::OptimizeClass::total_time [protected]

Total compute time.

int OPTPP::OptimizeClass::trace [protected]

UPDATEFCN OPTPP::OptimizeClass::update_fcn [protected]

User defined function to call after each nonlinear iteration.

int OPTPP::OptimizeClass::x_optout_fd [private]

NEWMAT::ColumnVector OPTPP::OptimizeClass::xprev [protected]

Previous iterate.


The documentation for this class was generated from the following file:
Bug Reports    OPT++ Developers    Copyright Information    GNU Lesser General Public License
Documentation, generated by , last revised August 30, 2006.