API  4.2
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)
 

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: