#include <ActuatorPerturbationIndependent.h>
Public Member Functions | |
ActuatorPerturbationIndependent (Model *aModel) | |
Construct an instance for perturbing actuator forces during an integration while forcing all other muscles to exert their nominal force. | |
virtual | ~ActuatorPerturbationIndependent () |
Destructor. | |
void | setUnperturbedForceSplineSet (Storage *aStore) |
Set the Storage object containing the unperturbed forces. | |
GCVSplineSet * | getUnperturbedForceSplineSet () |
Get a pointer to the spline set used to fit the unperturbed actuator forces. | |
Storage * | getPerturbedForceStorage () |
Get a pointer to the Storage containing the perturbed forces. | |
virtual void | reset (const SimTK::State &s) |
Set the step counter to zero and reset the perturbed force storage. | |
int | getStep () |
Get the current value of the step counter. | |
virtual void | computeActuation (const SimTK::State &s) |
called right after actuation has been computed by the model. | |
virtual void | applyActuation (const SimTK::State &s) |
called right after actuation has been applied by the model. | |
Protected Attributes | |
GCVSplineSet * | _unperturbedForceSplines |
Splines used to fit the unperturbed forces. | |
Storage * | _unperturbedForceStorage |
Storage for holding unperturbed forces. | |
Storage * | _perturbedForceStorage |
Storage for holding perturbed forces. | |
int | _step |
Counter to track the number of integration steps. |
ActuatorPerturbationIndependent::ActuatorPerturbationIndependent | ( | Model * | aModel | ) |
Construct an instance for perturbing actuator forces during an integration while forcing all other muscles to exert their nominal force.
aModel | Model for which actuator forces are to be perturbed. |
ActuatorPerturbationIndependent::~ActuatorPerturbationIndependent | ( | ) | [virtual] |
Destructor.
void ActuatorPerturbationIndependent::applyActuation | ( | const SimTK::State & | s | ) | [virtual] |
called right after actuation has been applied by the model.
The perturbed actuator force is recorded and then the unperturbed actuator force is restored.
Reimplemented from OpenSim::ActuatorPerturbation.
void ActuatorPerturbationIndependent::computeActuation | ( | const SimTK::State & | s | ) | [virtual] |
called right after actuation has been computed by the model.
The nominal actuator force is recorded so that it can be restored, and the actuator force is replaced by its perturbed value.
aT | Real time. | |
aX | Controls. | |
aY | States. |
Reimplemented from OpenSim::ActuatorPerturbation.
Storage * ActuatorPerturbationIndependent::getPerturbedForceStorage | ( | ) |
Get a pointer to the Storage containing the perturbed forces.
int ActuatorPerturbationIndependent::getStep | ( | ) |
Get the current value of the step counter.
GCVSplineSet * ActuatorPerturbationIndependent::getUnperturbedForceSplineSet | ( | ) |
Get a pointer to the spline set used to fit the unperturbed actuator forces.
void ActuatorPerturbationIndependent::reset | ( | const SimTK::State & | s | ) | [virtual] |
Set the step counter to zero and reset the perturbed force storage.
Reimplemented from OpenSim::ActuatorPerturbation.
void ActuatorPerturbationIndependent::setUnperturbedForceSplineSet | ( | Storage * | aStore | ) |
Set the Storage object containing the unperturbed forces.
This storage object is not deleted; the caller is responsible for cleaning up the resources associated with the storage object.
A cubic spline set is used to fit the forces contained in the object, and the splines are used to apply actuator forces throughout an integration.
aStore | Unperturbed force storage that is used to construct the spline set. |
Storage for holding perturbed forces.
int OpenSim::ActuatorPerturbationIndependent::_step [protected] |
Counter to track the number of integration steps.
Splines used to fit the unperturbed forces.
Storage for holding unperturbed forces.