API
4.0
For C++ developers
|
This class provides an interface specification for static optimization Objective Function. More...
Public Member Functions | |
StaticOptimizationTarget (const SimTK::State &s, Model *aModel, int aNX, int aNC, const bool useMusclePhysiology=true) | |
void | setModel (Model &aModel) |
void | setStatesStore (const Storage *aStatesStore) |
void | setStatesSplineSet (GCVSplineSet aStatesSplineSet) |
void | setNumParams (const int aNP) |
void | setNumConstraints (const int aNC) |
void | setDX (double aVal) |
void | setDX (int aIndex, double aVal) |
double | getDX (int aIndex) |
double * | getDXArray () |
void | getActuation (SimTK::State &s, const SimTK::Vector ¶meters, SimTK::Vector &forces) |
void | setActivationExponent (double aActivationExponent) |
double | getActivationExponent () const |
void | setCurrentState (const SimTK::State *state) |
const SimTK::State * | getCurrentState () const |
void | validatePerturbationSize (double &aSize) |
virtual void | printPerformance (const SimTK::State &s, double *x) |
void | computeActuatorAreas (const SimTK::State &s) |
bool | prepareToOptimize (SimTK::State &s, double *x) |
int | objectiveFunc (const SimTK::Vector &x, bool new_coefficients, SimTK::Real &rP) const override |
int | gradientFunc (const SimTK::Vector &x, bool new_coefficients, SimTK::Vector &gradient) const override |
int | constraintFunc (const SimTK::Vector &x, bool new_coefficients, SimTK::Vector &constraints) const override |
int | constraintJacobian (const SimTK::Vector &x, bool new_coefficients, SimTK::Matrix &jac) const override |
Public Member Functions inherited from SimTK::OptimizerSystem | |
OptimizerSystem () | |
OptimizerSystem (int nParameters) | |
virtual | ~OptimizerSystem () |
virtual int | hessian (const Vector ¶meters, 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 StaticOptimizationTarget *aTarget, double *dx, const SimTK::Vector &x, SimTK::Matrix &jacobian) |
static int | CentralDifferences (const StaticOptimizationTarget *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 | |
double | _activationExponent |
bool | _useMusclePhysiology |
Array< double > | _dx |
Perturbation size for computing numerical derivatives. More... | |
Array< int > | _accelerationIndices |
This class provides an interface specification for static optimization Objective Function.
OpenSim::StaticOptimizationTarget::StaticOptimizationTarget | ( | const SimTK::State & | s, |
Model * | aModel, | ||
int | aNX, | ||
int | aNC, | ||
const bool | useMusclePhysiology = true |
||
) |
|
static |
|
static |
void OpenSim::StaticOptimizationTarget::computeActuatorAreas | ( | const SimTK::State & | s | ) |
|
overridevirtual |
Reimplemented from SimTK::OptimizerSystem.
|
overridevirtual |
Reimplemented from SimTK::OptimizerSystem.
|
inline |
void OpenSim::StaticOptimizationTarget::getActuation | ( | SimTK::State & | s, |
const SimTK::Vector & | parameters, | ||
SimTK::Vector & | forces | ||
) |
|
inline |
double OpenSim::StaticOptimizationTarget::getDX | ( | int | aIndex | ) |
double* OpenSim::StaticOptimizationTarget::getDXArray | ( | ) |
|
overridevirtual |
Reimplemented from SimTK::OptimizerSystem.
|
overridevirtual |
Reimplemented from SimTK::OptimizerSystem.
bool OpenSim::StaticOptimizationTarget::prepareToOptimize | ( | SimTK::State & | s, |
double * | x | ||
) |
|
virtual |
|
inline |
|
inline |
void OpenSim::StaticOptimizationTarget::setDX | ( | double | aVal | ) |
void OpenSim::StaticOptimizationTarget::setDX | ( | int | aIndex, |
double | aVal | ||
) |
void OpenSim::StaticOptimizationTarget::setModel | ( | Model & | aModel | ) |
void OpenSim::StaticOptimizationTarget::setNumConstraints | ( | const int | aNC | ) |
void OpenSim::StaticOptimizationTarget::setNumParams | ( | const int | aNP | ) |
void OpenSim::StaticOptimizationTarget::setStatesSplineSet | ( | GCVSplineSet | aStatesSplineSet | ) |
void OpenSim::StaticOptimizationTarget::setStatesStore | ( | const Storage * | aStatesStore | ) |
void OpenSim::StaticOptimizationTarget::validatePerturbationSize | ( | double & | aSize | ) |
|
protected |
|
protected |
|
protected |
Perturbation size for computing numerical derivatives.
|
protected |
|
static |
Smallest allowable perturbation size for computing derivatives.