#include <Optimizer.h>
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 paramters of the objective function and/or supplying constraint functions that must be satisfied. The optimizer starts searching for a minimum begining at a user supplied initial set of paramters.
The objective function and constraints are specified by supplying the Optimizer with a concreate implemenation of a 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.
Public Member Functions | |
Optimizer () | |
Optimizer (const OptimizerSystem &sys) | |
Optimizer (const OptimizerSystem &sys, OptimizerAlgorithm algorithm) | |
~Optimizer () | |
void | setConvergenceTolerance (const Real tolerance) |
sets the absolute tolerance used determine if the problem has converged | |
void | setMaxIterations (const int iter) |
set the maximum number of iterations used for each step | |
void | setLimitedMemoryHistory (const int history) |
set the maximum number of previous hessians used in a limitied memory hessian approximation | |
void | setDiagnosticsLevel (const 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 (const bool flag) |
enable numerical gradients | |
void | useNumericalJacobian (const bool flag) |
enable numerical Jacobian | |
double | optimize (Vector &) |
compute optimization | |
Static Public Member Functions | |
static bool | isAlgorithmAvailable (OptimizerAlgorithm algorithm) |
Friends | |
class | OptimizerRep |
Optimizer | ( | ) |
Optimizer | ( | const OptimizerSystem & | sys | ) |
Optimizer | ( | const OptimizerSystem & | sys, | |
OptimizerAlgorithm | algorithm | |||
) |
~Optimizer | ( | ) |
static bool isAlgorithmAvailable | ( | OptimizerAlgorithm | algorithm | ) | [static] |
void setConvergenceTolerance | ( | const Real | tolerance | ) |
void setMaxIterations | ( | const int | iter | ) |
set the maximum number of iterations used for each step
void setLimitedMemoryHistory | ( | const int | history | ) |
set the maximum number of previous hessians used in a limitied memory hessian approximation
void setDiagnosticsLevel | ( | const 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 | ( | const bool | flag | ) |
void useNumericalJacobian | ( | const bool | flag | ) |
friend class OptimizerRep [friend] |