OpenSim::OptimizationTarget Class Reference
This class provides an interface specification for optimizing redundant systems.
More...
#include <OptimizationTarget.h>
List of all members.
Public Member Functions |
| OptimizationTarget (int aNX=0) |
| Construct an optimization target.
|
void | setNumParameters (const int aNX) |
| ______________________________________________________________________________
|
void | setDX (double aVal) |
| Set the derivative perturbation size for all controls.
|
void | setDX (int aIndex, double aVal) |
| Set the derivative perturbation size.
|
double | getDX (int aIndex) |
| Get the derivative perturbation size.
|
double * | getDXArray () |
| Get a pointer to the vector of derivative perturbation sizes.
|
void | validatePerturbationSize (double &aSize) |
| Ensure that a derivative perturbation is a valid size.
|
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 = 1.0e-14 |
| Smallest allowable perturbation size for computing derivatives.
|
Protected Attributes |
Array< double > | _dx |
| Perturbation size for computing numerical derivatives.
|
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::OptimizationTarget |
( |
int |
aNX = 0 |
) |
|
Construct an optimization target.
- Parameters:
-
| aNX | The number of controls. |
Member Function Documentation
static int OpenSim::OptimizationTarget::CentralDifferences |
( |
const OptimizationTarget * |
aTarget, |
|
|
double * |
dx, |
|
|
const SimTK::Vector & |
x, |
|
|
SimTK::Vector & |
dpdx | |
|
) |
| | [static] |
static int OpenSim::OptimizationTarget::CentralDifferencesConstraint |
( |
const OptimizationTarget * |
aTarget, |
|
|
double * |
dx, |
|
|
const SimTK::Vector & |
x, |
|
|
SimTK::Matrix & |
jacobian | |
|
) |
| | [static] |
static int OpenSim::OptimizationTarget::ForwardDifferences |
( |
const OptimizationTarget * |
aTarget, |
|
|
double * |
dx, |
|
|
const SimTK::Vector & |
x, |
|
|
SimTK::Vector & |
dpdx | |
|
) |
| | [static] |
double OptimizationTarget::getDX |
( |
int |
aIndex |
) |
|
Get the derivative perturbation size.
double * OptimizationTarget::getDXArray |
( |
|
) |
|
Get a pointer to the vector of derivative perturbation sizes.
virtual bool OpenSim::OptimizationTarget::prepareToOptimize |
( |
SimTK::State & |
s, |
|
|
double * |
x | |
|
) |
| | [inline, virtual] |
void OptimizationTarget::printPerformance |
( |
double * |
x |
) |
[virtual] |
void OptimizationTarget::setDX |
( |
int |
aIndex, |
|
|
double |
aVal | |
|
) |
| | |
Set the derivative perturbation size.
void OptimizationTarget::setDX |
( |
double |
aVal |
) |
|
Set the derivative perturbation size for all controls.
void OptimizationTarget::setNumParameters |
( |
const int |
aNX |
) |
|
______________________________________________________________________________
Set the number of controls.
The number of controls can be set at any time. However, the perturbation sizes for the controls (i.e., _dx) is destroyed. Therefore, the perturbation sizes must be reset.
- Parameters:
-
- See also:
- setDX()
void OptimizationTarget::validatePerturbationSize |
( |
double & |
aSize |
) |
|
Ensure that a derivative perturbation is a valid size.
Member Data Documentation
Perturbation size for computing numerical derivatives.
Smallest allowable perturbation size for computing derivatives.
The documentation for this class was generated from the following files:
- OpenSim/Common/OptimizationTarget.h
- OpenSim/Common/OptimizationTarget.cpp