Optimizer Class Reference

API for SimTK Simmath's optimizers. More...

#include <Optimizer.h>

List of all members.

Public Member Functions

 Optimizer ()
 Optimizer (const OptimizerSystem &sys)
 Optimizer (const OptimizerSystem &sys, OptimizerAlgorithm algorithm)
 ~Optimizer ()
void setConvergenceTolerance (Real accuracy)
 Sets the relative accuracy used determine if the problem has converged.
void setConstraintTolerance (Real tolerance)
 Sets the absolute tolerance used to determine whether constraint violation is acceptable.
void setMaxIterations (int iter)
 Set the maximum number of iterations used for each step.
void setLimitedMemoryHistory (int history)
 Set the maximum number of previous hessians used in a limitied memory hessian approximation.
void setDiagnosticsLevel (int level)
 Set the level of debugging info displayed.
void setDifferentiatorMethod (Differentiator::Method method)
 Set which numerical gradient algorithm is used.
void setOptimizerSystem (const OptimizerSystem &sys)
void setOptimizerSystem (const OptimizerSystem &sys, OptimizerAlgorithm algorithm)
bool setAdvancedStrOption (const char *option, const char *value)
 Set the value of an advanced option specified by a string.
bool setAdvancedRealOption (const char *option, const Real value)
 Set the value of an advanced option specified by a real value.
bool setAdvancedIntOption (const char *option, const int value)
 Set the value of an advanced option specified by an integer value.
bool setAdvancedBoolOption (const char *option, const bool value)
 Set the value of an advanced option specified by an boolean value.
void useNumericalGradient (bool flag)
 Enable numerical gradients.
void useNumericalJacobian (bool flag)
 Enable numerical Jacobian.
Real optimize (Vector &)
 Compute optimization.
const OptimizerSystemgetOptimizerSystem () const
 Return a reference to the OptimizerSystem currently associated with this Optimizer.
bool isUsingNumericalGradient () const
 Indicate whether the Optimizer is currently set to use a numerical gradient.
bool isUsingNumericalJacobian () const
 Indicate whether the Optimizer is currently set to use a numerical Jacobian.

Static Public Member Functions

static bool isAlgorithmAvailable (OptimizerAlgorithm algorithm)

Friends

class OptimizerRep

Detailed Description

API for SimTK Simmath's optimizers.

An optimizer finds a local minimum to an objective function. The optimizer can be constrained to search for a minimum within a feasible region. The feasible region can be defined by setting limits on the parameters of the objective function and/or supplying constraint functions that must be satisfied. The optimizer starts searching for a minimum beginning at a user supplied initial value for the set of parameters.

The objective function and constraints are specified by supplying the Optimizer with a concrete implemenation of an OptimizerSystem class. The OptimizerSystem can be passed to the Optimizer either through the Optimizer constructor or by calling the setOptimizerSystem method. The Optimizer class will select the best optimization algorithm to solve the problem based on the constraints supplied by the OptimizerSystem. A user can also override the optimization algorithm selected by the Optimizer by specifying the optimization algorithm.


Constructor & Destructor Documentation

Optimizer (  ) 
Optimizer ( const OptimizerSystem sys  ) 
Optimizer ( const OptimizerSystem sys,
OptimizerAlgorithm  algorithm 
)
~Optimizer (  ) 

Member Function Documentation

const OptimizerSystem& getOptimizerSystem (  )  const

Return a reference to the OptimizerSystem currently associated with this Optimizer.

static bool isAlgorithmAvailable ( OptimizerAlgorithm  algorithm  )  [static]
bool isUsingNumericalGradient (  )  const

Indicate whether the Optimizer is currently set to use a numerical gradient.

bool isUsingNumericalJacobian (  )  const

Indicate whether the Optimizer is currently set to use a numerical Jacobian.

Real optimize ( Vector  ) 

Compute optimization.

bool setAdvancedBoolOption ( const char *  option,
const bool  value 
)

Set the value of an advanced option specified by an boolean value.

bool setAdvancedIntOption ( const char *  option,
const int  value 
)

Set the value of an advanced option specified by an integer value.

bool setAdvancedRealOption ( const char *  option,
const Real  value 
)

Set the value of an advanced option specified by a real value.

bool setAdvancedStrOption ( const char *  option,
const char *  value 
)

Set the value of an advanced option specified by a string.

void setConstraintTolerance ( Real  tolerance  ) 

Sets the absolute tolerance used to determine whether constraint violation is acceptable.

void setConvergenceTolerance ( Real  accuracy  ) 

Sets the relative accuracy used determine if the problem has converged.

void setDiagnosticsLevel ( int  level  ) 

Set the level of debugging info displayed.

void setDifferentiatorMethod ( Differentiator::Method  method  ) 

Set which numerical gradient algorithm is used.

void setLimitedMemoryHistory ( int  history  ) 

Set the maximum number of previous hessians used in a limitied memory hessian approximation.

void setMaxIterations ( int  iter  ) 

Set the maximum number of iterations used for each step.

void setOptimizerSystem ( const OptimizerSystem sys,
OptimizerAlgorithm  algorithm 
)
void setOptimizerSystem ( const OptimizerSystem sys  ) 
void useNumericalGradient ( bool  flag  ) 

Enable numerical gradients.

void useNumericalJacobian ( bool  flag  ) 

Enable numerical Jacobian.


Friends And Related Function Documentation

friend class OptimizerRep [friend]

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

Generated on Thu Aug 12 16:38:02 2010 for SimTKcore by  doxygen 1.6.1