OptimizerSystem Class Reference

#include <Optimizer.h>

Inheritance diagram for OptimizerSystem:

ProblemSystem ProblemSystem ProblemSystem ProblemSystem ProblemSystem ProblemSystem ProblemSystem

List of all members.


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.

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.
virtual int gradientFunc (const Vector &parameters, const bool new_parameters, Vector &gradient) const
 computes the gradient of the objective function this method does not have to be supplied if a numerical gradient is used
virtual int constraintFunc (const Vector &parameters, const bool new_parameters, Vector &constraints) const
 computes the value of the constraints this method must be supplied if the objective function has constraints
virtual int constraintJacobian (const Vector &parameters, const bool new_parameters, Matrix &jac) const
 computes jacobian of the constraints this method does not have to be supplied if a numerical jacobian is used
virtual int hessian (const Vector &parameters, const bool new_parameters, Vector &gradient) const
 computes Hessian of the objective function this method does not have to be supplied limited memory is used
virtual void setNumParameters (const int nParameters)
 sets the number of paramters 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 paramters
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 a bool true if there are limits on the parameters
void getParameterLimits (double **lower, double **upper) const
 returns the paramter limits

Public Attributes

int numParameters
int numEqualityConstraints
int numInequalityConstraints
int numLinearEqualityConstraints
int numLinearInequalityConstraints
bool useLimits
VectorlowerLimits
VectorupperLimits


Constructor & Destructor Documentation

OptimizerSystem (  )  [inline]

OptimizerSystem ( int  nParameters  )  [inline]

virtual ~OptimizerSystem (  )  [inline, virtual]


Member Function Documentation

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

Objective/cost function which is to be optimized.

This method must be supplied by concreate class

References SimTK_THROW2.

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

computes the gradient of the objective function this method does not have to be supplied if a numerical gradient is used

References SimTK_THROW2.

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

computes the value of the constraints 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 this method does not have to be supplied if a numerical jacobian 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 this method does not have to be supplied limited memory is used

References SimTK_THROW2.

virtual void setNumParameters ( const int  nParameters  )  [inline, virtual]

sets the number of paramters in the objective function

References SimTK_THROW5.

void setNumEqualityConstraints ( const int  n  )  [inline]

sets the number of equality constraints

References SimTK_THROW3.

Referenced by ProblemSystem::ProblemSystem().

void setNumInequalityConstraints ( const int  n  )  [inline]

sets the number of inequality constraints

References SimTK_THROW3.

Referenced by ProblemSystem::ProblemSystem().

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 setParameterLimits ( const Vector lower,
const Vector upper 
) [inline]

set the upper and lower bounds on the paramters

References SimTK_THROW5, and VectorBase::size().

Referenced by main().

int getNumParameters (  )  const [inline]

returns the number of paramters

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 getNumNonlinearEqualityConstraints (  )  const [inline]

returns the number of nonlinear equality constraints

int getNumLinearInequalityConstraints (  )  const [inline]

returns the number of linear inequality constraints

int getNumNonlinearInequalityConstraints (  )  const [inline]

returns the number of linear inequality constraints

bool getHasLimits (  )  const [inline]

returns a bool true if there are limits on the parameters

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

returns the paramter limits


Member Data Documentation

bool useLimits


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

Generated on Fri Sep 26 07:44:31 2008 for SimTKcore by  doxygen 1.5.6