OPTPP::OptimizeClass Class Reference

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

Inheritance diagram for OPTPP::OptimizeClass:
[legend]
Collaboration diagram for OPTPP::OptimizeClass:
[legend]

List of all members.

Public Member Functions

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

Protected Member Functions

void copyright ()
 Write copyright information to the screen.
virtual void defaultAcceptStep (int, int)
 Provide default implementation of AcceptStep.
virtual void defaultReset (int n)
 Provide default implementation of reset.
virtual void defaultUpdateModel (int k, int ndim, NEWMAT::ColumnVector x)
 Provide default implementation of UpdateModel.
virtual real stepTolNorm () const

Protected Attributes

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

Detailed Description

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

Definition at line 108 of file Opt.h.


Constructor & Destructor Documentation

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

Default Constructor.

See also:
OptimizeClass(int n)
OptimizeClass(TOLS t)
OptimizeClass(int n, TOLS t)

Definition at line 217 of file Opt.h.

References optout, optout_fd, OPTPP::TOLS::setDefaultTol(), tol, and update_fcn.

OPTPP::OptimizeClass::OptimizeClass ( int  n  )  [inline]
Parameters:
n an integer argument

Definition at line 231 of file Opt.h.

References optout, optout_fd, OPTPP::TOLS::setDefaultTol(), sfx, sx, tol, update_fcn, and xprev.

OPTPP::OptimizeClass::OptimizeClass ( TOLS  t  )  [inline]
Parameters:
t a TOLS object

Definition at line 247 of file Opt.h.

References optout, optout_fd, sfx, sx, update_fcn, and xprev.

OPTPP::OptimizeClass::OptimizeClass ( int  n,
TOLS  t 
) [inline]
Parameters:
n an integer argument
t a TOLS object

Definition at line 262 of file Opt.h.

References optout, optout_fd, sfx, sx, update_fcn, and xprev.


Member Function Documentation

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

Write copyright information to the screen.

Definition at line 191 of file Opt.h.

References optout.

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

Definition at line 397 of file Opt.h.

References debug_.

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

Provide default implementation of AcceptStep.

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

Definition at line 179 of file Opt.h.

References debug_, and optout.

Referenced by OPTPP::OptPDS::acceptStep(), OPTPP::OptLBFGS::acceptStep(), and OPTPP::OptCG::acceptStep().

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

Provide default implementation of reset.

Definition at line 165 of file Opt.h.

References backtracks, fcn_evals, sfx, sx, and xprev.

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

Provide default implementation of UpdateModel.

Definition at line 185 of file Opt.h.

References update_fcn.

int OPTPP::OptimizeClass::getDim (  )  const [inline]
Returns:
Problem dimension

Definition at line 319 of file Opt.h.

References dim.

NEWMAT::ColumnVector OPTPP::OptimizeClass::getFcnScale (  )  const [inline]
Returns:
Scaling vector used for f(x)

Definition at line 339 of file Opt.h.

References sfx.

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

Definition at line 323 of file Opt.h.

References iter_taken.

ostream* OPTPP::OptimizeClass::getOutputFile (  )  [inline]
Returns:
Output Filename

Definition at line 343 of file Opt.h.

References optout.

int OPTPP::OptimizeClass::getReturnCode (  )  const [inline]
Returns:
Return Code

Definition at line 327 of file Opt.h.

References ret_code.

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

Definition at line 331 of file Opt.h.

References xprev.

NEWMAT::ColumnVector OPTPP::OptimizeClass::getXScale (  )  const [inline]
Returns:
Scaling vector used for x

Definition at line 335 of file Opt.h.

References sx.

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

Set constraint tolerance.

Definition at line 292 of file Opt.h.

References OPTPP::TOLS::setCTol(), and tol.

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

Set debug flag to true.

Definition at line 393 of file Opt.h.

References debug_.

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

Set function scale.

Definition at line 311 of file Opt.h.

References sfx.

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

Set function scale.

Definition at line 309 of file Opt.h.

References sfx.

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

Set function tolerance.

Definition at line 290 of file Opt.h.

References OPTPP::TOLS::setFTol(), and tol.

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

Set gradient tolerance.

Definition at line 294 of file Opt.h.

References OPTPP::TOLS::setGTol(), and tol.

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

Set linesearch tolerance.

Definition at line 296 of file Opt.h.

References OPTPP::TOLS::setLSTol(), and tol.

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

Set maximum backtrack iterations.

Definition at line 300 of file Opt.h.

References OPTPP::TOLS::setMaxBacktrackIter(), and tol.

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

Set maximum fcn evaluations.

Definition at line 302 of file Opt.h.

References OPTPP::TOLS::setMaxFeval(), and tol.

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

Set maximum outer iterations.

Definition at line 298 of file Opt.h.

References OPTPP::TOLS::setMaxIter(), and tol.

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

Set maximum steplength.

Definition at line 284 of file Opt.h.

References OPTPP::TOLS::setMaxStep(), and tol.

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

Set message.

Definition at line 280 of file Opt.h.

References mesg.

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

Set method of choice.

Definition at line 282 of file Opt.h.

References method.

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

Set minimum steplength.

Definition at line 286 of file Opt.h.

References OPTPP::TOLS::setMinStep(), and tol.

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

Set return code.

Definition at line 314 of file Opt.h.

References ret_code.

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

Set step tolerance.

Definition at line 288 of file Opt.h.

References OPTPP::TOLS::setStepTol(), and tol.

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

Set update model.

Definition at line 304 of file Opt.h.

References update_fcn.

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

Set step scale.

Definition at line 307 of file Opt.h.

References sx.


Member Data Documentation

Number of bactracks in linesearch.

Definition at line 143 of file Opt.h.

Referenced by defaultReset().

bool OPTPP::OptimizeClass::debug_ [protected]

Print debug statements.

Definition at line 145 of file Opt.h.

Referenced by Debug(), defaultAcceptStep(), and setDebug().

int OPTPP::OptimizeClass::dim [protected]

Dimension of the problem.

Definition at line 115 of file Opt.h.

Referenced by getDim().

Number of function evaluations taken.

Definition at line 141 of file Opt.h.

Referenced by defaultReset(), OPTPP::OptNewtonLike::getFevals(), OPTPP::OptConstrNewtonLike::getFevals(), and OPTPP::OptBCNewtonLike::getFevals().

real OPTPP::OptimizeClass::fprev [protected]

Objective function value at xprev.

Definition at line 125 of file Opt.h.

Number of iterations taken.

Definition at line 139 of file Opt.h.

Referenced by getIter().

double OPTPP::OptimizeClass::iter_time [protected]

Compute time per iteration.

Definition at line 148 of file Opt.h.

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

Current step direction.

Definition at line 127 of file Opt.h.

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

Optional message.

Definition at line 135 of file Opt.h.

Referenced by setMesg().

char OPTPP::OptimizeClass::method[80] [protected]
ostream* OPTPP::OptimizeClass::optout [protected]

Output file.

Definition at line 157 of file Opt.h.

Referenced by copyright(), defaultAcceptStep(), getOutputFile(), and OptimizeClass().

Output file success.

Definition at line 159 of file Opt.h.

Referenced by OptimizeClass().

Return code from Optimization class.

Definition at line 137 of file Opt.h.

Referenced by getReturnCode(), and setReturnCode().

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

Diagonal Scaling Matrix for f.

Definition at line 121 of file Opt.h.

Referenced by defaultReset(), getFcnScale(), OptimizeClass(), and setFcnScale().

Length of step direction.

Definition at line 129 of file Opt.h.

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

Diagonal Scaling Matrix for x.

Definition at line 119 of file Opt.h.

Referenced by defaultReset(), getXScale(), OptimizeClass(), and setXScale().

Various tolerances assoc. with the problem.

Definition at line 117 of file Opt.h.

Referenced by OptimizeClass(), setConTol(), setFcnTol(), setGradTol(), setLineSearchTol(), setMaxBacktrackIter(), setMaxFeval(), setMaxIter(), setMaxStep(), setMinStep(), and setStepTol().

Total compute time.

Definition at line 150 of file Opt.h.

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

Previous iterate.

Definition at line 123 of file Opt.h.

Referenced by defaultReset(), getXPrev(), and OptimizeClass().


The documentation for this class was generated from the following file:
Generated on Mon Jan 24 12:04:41 2011 for FASTlib by  doxygen 1.6.3