OptimizerSystem Class Reference

Abstract class which defines an objective/cost function which is optimized by and Optimizer object. More...

#include <Optimizer.h>

List of all members.

Public Member Functions

 OptimizerSystem ()
 OptimizerSystem (int nParameters)
virtual ~OptimizerSystem ()
virtual int objectiveFunc (const Vector &parameters, const bool new_parameters, Real &f) const
 Objective/cost function which is to be optimized; return 0 when successful.
virtual int gradientFunc (const Vector &parameters, const bool new_parameters, Vector &gradient) const
 Computes the gradient of the objective function; return 0 when successful.
virtual int constraintFunc (const Vector &parameters, const bool new_parameters, Vector &constraints) const
 Computes the value of the constraints; return 0 when successful.
virtual int constraintJacobian (const Vector &parameters, const bool new_parameters, Matrix &jac) const
 Computes Jacobian of the constraints; return 0 when successful.
virtual int hessian (const Vector &parameters, const bool new_parameters, Vector &gradient) const
 Computes Hessian of the objective function; return 0 when successful.
void setNumParameters (const int nParameters)
 Sets the number of parameters in the objective function.
void setNumEqualityConstraints (const int n)
 Sets the number of equality constraints.
void setNumInequalityConstraints (const int n)
 Sets the number of inequality constraints.
void setNumLinearEqualityConstraints (const int n)
 Sets the number of lineaer equality constraints.
void setNumLinearInequalityConstraints (const int n)
 Sets the number of lineaer inequality constraints.
void setParameterLimits (const Vector &lower, const Vector &upper)
 Set the upper and lower bounds on the paramters.
int getNumParameters () const
 Returns the number of parameters, that is, the number of variables that the Optimizer may adjust while searching for a solution.
int getNumConstraints () const
 Returns the total number of constraints.
int getNumEqualityConstraints () const
 Returns the number of equality constraints.
int getNumInequalityConstraints () const
 Returns the number of inequality constraints.
int getNumLinearEqualityConstraints () const
 Returns the number of linear equality constraints.
int getNumNonlinearEqualityConstraints () const
 Returns the number of nonlinear equality constraints.
int getNumLinearInequalityConstraints () const
 Returns the number of linear inequality constraints.
int getNumNonlinearInequalityConstraints () const
 Returns the number of linear inequality constraints.
bool getHasLimits () const
 Returns true if there are limits on the parameters.
void getParameterLimits (double **lower, double **upper) const
 Returns the limits on the allowed values of each parameter, as an array of lower bounds and an array of upper bounds, with assumed lengths matching the number of parameters.

Detailed Description

Abstract class which defines an objective/cost function which is optimized by and Optimizer object.

The OptimizerSystem also defines any constraints which must be satisfied.


Constructor & Destructor Documentation

OptimizerSystem (  )  [inline]
OptimizerSystem ( int  nParameters  )  [inline, explicit]
virtual ~OptimizerSystem (  )  [inline, virtual]

Member Function Documentation

virtual int constraintFunc ( const Vector parameters,
const bool  new_parameters,
Vector constraints 
) const [inline, virtual]

Computes the value of the constraints; return 0 when successful.

This method must be supplied if the objective function has constraints.

References SimTK_THROW2.

virtual int constraintJacobian ( const Vector parameters,
const bool  new_parameters,
Matrix jac 
) const [inline, virtual]

Computes Jacobian of the constraints; return 0 when successful.

This method does not have to be supplied if a numerical jacobian is used.

References SimTK_THROW2.

bool getHasLimits (  )  const [inline]

Returns true if there are limits on the parameters.

int getNumConstraints (  )  const [inline]

Returns the total number of constraints.

int getNumEqualityConstraints (  )  const [inline]

Returns the number of equality constraints.

int getNumInequalityConstraints (  )  const [inline]

Returns the number of inequality constraints.

int getNumLinearEqualityConstraints (  )  const [inline]

Returns the number of linear equality constraints.

int getNumLinearInequalityConstraints (  )  const [inline]

Returns the number of linear inequality constraints.

int getNumNonlinearEqualityConstraints (  )  const [inline]

Returns the number of nonlinear equality constraints.

int getNumNonlinearInequalityConstraints (  )  const [inline]

Returns the number of linear inequality constraints.

int getNumParameters (  )  const [inline]

Returns the number of parameters, that is, the number of variables that the Optimizer may adjust while searching for a solution.

void getParameterLimits ( double **  lower,
double **  upper 
) const [inline]

Returns the limits on the allowed values of each parameter, as an array of lower bounds and an array of upper bounds, with assumed lengths matching the number of parameters.

virtual int gradientFunc ( const Vector parameters,
const bool  new_parameters,
Vector gradient 
) const [inline, virtual]

Computes the gradient of the objective function; return 0 when successful.

This method does not have to be supplied if a numerical gradient is used.

References SimTK_THROW2.

virtual int hessian ( const Vector parameters,
const bool  new_parameters,
Vector gradient 
) const [inline, virtual]

Computes Hessian of the objective function; return 0 when successful.

This method does not have to be supplied if limited memory is used.

References SimTK_THROW2.

virtual int objectiveFunc ( const Vector parameters,
const bool  new_parameters,
Real &  f 
) const [inline, virtual]

Objective/cost function which is to be optimized; return 0 when successful.

This method must be supplied by concrete class.

References SimTK_THROW2.

void setNumEqualityConstraints ( const int  n  )  [inline]

Sets the number of equality constraints.

References SimTK_THROW3.

void setNumInequalityConstraints ( const int  n  )  [inline]

Sets the number of inequality constraints.

References SimTK_THROW3.

void setNumLinearEqualityConstraints ( const int  n  )  [inline]

Sets the number of lineaer equality constraints.

References SimTK_THROW4.

void setNumLinearInequalityConstraints ( const int  n  )  [inline]

Sets the number of lineaer inequality constraints.

References SimTK_THROW4.

void setNumParameters ( const int  nParameters  )  [inline]

Sets the number of parameters in the objective function.

References SimTK_THROW5.

void setParameterLimits ( const Vector lower,
const Vector upper 
) [inline]

Set the upper and lower bounds on the paramters.

References SimTK_THROW5, and VectorBase< ELT >::size().


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

Generated on Wed Dec 30 11:05:16 2009 for SimTKcore by  doxygen 1.6.1