API  4.0
For C++ developers
OpenSim::OptimizationTarget Class Reference

This class provides an interface specification for optimizing redundant systems. More...

+ Inheritance diagram for OpenSim::OptimizationTarget:

Public Member Functions

 OptimizationTarget (int aNX=0)
 
void setNumParameters (const int aNX)
 
void setDX (double aVal)
 
void setDX (int aIndex, double aVal)
 
double getDX (int aIndex)
 
double * getDXArray ()
 
void validatePerturbationSize (double &aSize)
 
virtual bool prepareToOptimize (SimTK::State &s, double *x)
 
virtual void printPerformance (double *x)
 
- Public Member Functions inherited from SimTK::OptimizerSystem
 OptimizerSystem ()
 
 OptimizerSystem (int nParameters)
 
virtual ~OptimizerSystem ()
 
virtual int objectiveFunc (const Vector &parameters, bool new_parameters, Real &f) const
 
virtual int gradientFunc (const Vector &parameters, bool new_parameters, Vector &gradient) const
 
virtual int constraintFunc (const Vector &parameters, bool new_parameters, Vector &constraints) const
 
virtual int constraintJacobian (const Vector &parameters, bool new_parameters, Matrix &jac) const
 
virtual int hessian (const Vector &parameters, bool new_parameters, Vector &gradient) const
 
void setNumParameters (const int nParameters)
 
void setNumEqualityConstraints (const int n)
 
void setNumInequalityConstraints (const int n)
 
void setNumLinearEqualityConstraints (const int n)
 
void setNumLinearInequalityConstraints (const int n)
 
void setParameterLimits (const Vector &lower, const Vector &upper)
 
int getNumParameters () const
 
int getNumConstraints () const
 
int getNumEqualityConstraints () const
 
int getNumInequalityConstraints () const
 
int getNumLinearEqualityConstraints () const
 
int getNumNonlinearEqualityConstraints () const
 
int getNumLinearInequalityConstraints () const
 
int getNumNonlinearInequalityConstraints () const
 
bool getHasLimits () const
 
void getParameterLimits (Real **lower, Real **upper) const
 

Static Public Member Functions

static int CentralDifferencesConstraint (const OptimizationTarget *aTarget, double *dx, const SimTK::Vector &x, SimTK::Matrix &jacobian)
 
static int CentralDifferences (const OptimizationTarget *aTarget, double *dx, const SimTK::Vector &x, SimTK::Vector &dpdx)
 
static int ForwardDifferences (const OptimizationTarget *aTarget, double *dx, const SimTK::Vector &x, SimTK::Vector &dpdx)
 

Static Public Attributes

static const double SMALLDX
 Smallest allowable perturbation size for computing derivatives. More...
 

Protected Attributes

Array< double > _dx
 Perturbation size for computing numerical derivatives. More...
 

Detailed Description

This class provides an interface specification for optimizing redundant systems.

If a class represents a redundant system for which one would like to find a set of optimal controls, the class should inherit from this class and implement the virtual functions defined here.

Author
Frank C. Anderson

Constructor & Destructor Documentation

◆ OptimizationTarget()

OpenSim::OptimizationTarget::OptimizationTarget ( int  aNX = 0)

Member Function Documentation

◆ CentralDifferences()

static int OpenSim::OptimizationTarget::CentralDifferences ( const OptimizationTarget aTarget,
double *  dx,
const SimTK::Vector x,
SimTK::Vector dpdx 
)
static

◆ CentralDifferencesConstraint()

static int OpenSim::OptimizationTarget::CentralDifferencesConstraint ( const OptimizationTarget aTarget,
double *  dx,
const SimTK::Vector x,
SimTK::Matrix jacobian 
)
static

◆ ForwardDifferences()

static int OpenSim::OptimizationTarget::ForwardDifferences ( const OptimizationTarget aTarget,
double *  dx,
const SimTK::Vector x,
SimTK::Vector dpdx 
)
static

◆ getDX()

double OpenSim::OptimizationTarget::getDX ( int  aIndex)

◆ getDXArray()

double* OpenSim::OptimizationTarget::getDXArray ( )

◆ prepareToOptimize()

virtual bool OpenSim::OptimizationTarget::prepareToOptimize ( SimTK::State s,
double *  x 
)
inlinevirtual

◆ printPerformance()

virtual void OpenSim::OptimizationTarget::printPerformance ( double *  x)
virtual

◆ setDX() [1/2]

void OpenSim::OptimizationTarget::setDX ( double  aVal)

◆ setDX() [2/2]

void OpenSim::OptimizationTarget::setDX ( int  aIndex,
double  aVal 
)

◆ setNumParameters()

void OpenSim::OptimizationTarget::setNumParameters ( const int  aNX)

◆ validatePerturbationSize()

void OpenSim::OptimizationTarget::validatePerturbationSize ( double &  aSize)

Member Data Documentation

◆ _dx

Array<double> OpenSim::OptimizationTarget::_dx
protected

Perturbation size for computing numerical derivatives.

◆ SMALLDX

const double OpenSim::OptimizationTarget::SMALLDX
static

Smallest allowable perturbation size for computing derivatives.


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