A class for recording the basic actuator information for a model during a simulation. More...
#include <Actuation.h>
Public Member Functions | |
Actuation (Model *aModel=0) | |
Construct an Actuation object for recording the Actuation of a model's generalized coodinates during a simulation. | |
Actuation (const std::string &aFileName) | |
Construct an object from file. | |
Actuation (const Actuation &aObject) | |
Copy constructor. | |
virtual Object * | copy () const |
Clone. | |
virtual | ~Actuation () |
Destructor. | |
Actuation & | operator= (const Actuation &aActuation) |
Assignment operator. | |
void | setStorageCapacityIncrements (int aIncrement) |
Set the capacity increments of all storage instances. | |
Storage * | getForceStorage () const |
Get the force storage. | |
Storage * | getSpeedStorage () const |
Get the speed storage. | |
Storage * | getPowerStorage () const |
Get the power storage. | |
virtual void | setModel (Model &aModel) |
Set the model pointer for analysis. | |
virtual int | begin (const SimTK::State &s) |
This method is called at the beginning of an analysis so that any necessary initializations may be performed. | |
virtual int | step (const SimTK::State &s) |
This method is called to perform the analysis. | |
virtual int | end (const SimTK::State &s) |
This method is called at the end of an analysis so that any necessary finalizations may be performed. | |
virtual int | printResults (const std::string &aBaseName, const std::string &aDir="", double aDT=-1.0, const std::string &aExtension=".sto") |
Print the results of the analysis. | |
Protected Member Functions | |
virtual int | record (const SimTK::State &s) |
Record the actuation quantities. | |
Protected Attributes | |
int | _na |
Number of actuators. | |
double * | _fsp |
Work array for storing forces, speeds, or powers. | |
Storage * | _forceStore |
Force storage. | |
Storage * | _speedStore |
Speed storage. | |
Storage * | _powerStore |
Power storage. |
A class for recording the basic actuator information for a model during a simulation.
Actuation::Actuation | ( | Model * | aModel = 0 |
) |
Actuation::Actuation | ( | const std::string & | aFileName | ) |
Construct an object from file.
The object is constructed from the root element of the XML document. The type of object is the tag name of the XML root element.
aFileName | File name of the document. |
Actuation::Actuation | ( | const Actuation & | aObject | ) |
Copy constructor.
Actuation::~Actuation | ( | ) | [virtual] |
Destructor.
int Actuation::begin | ( | const SimTK::State & | s | ) | [virtual] |
This method is called at the beginning of an analysis so that any necessary initializations may be performed.
This method is meant to be called at the begining of an integration in Model::integBeginCallback() and has the same argument list.
This method should be overriden in the child class. It is included here so that the child class will not have to implement it if it is not necessary.
state | system State | |
aStep | Step number of the integration. |
Reimplemented from OpenSim::Analysis.
Object * Actuation::copy | ( | ) | const [virtual] |
Clone.
Reimplemented from OpenSim::Analysis.
int Actuation::end | ( | const SimTK::State & | s | ) | [virtual] |
This method is called at the end of an analysis so that any necessary finalizations may be performed.
This method is meant to be called at the end of an integration in Model::integEndCallback() and has the same argument list.
This method should be overriden in the child class. It is included here so that the child class will not have to implement it if it is not necessary.
state | System state |
Reimplemented from OpenSim::Analysis.
Storage * Actuation::getPowerStorage | ( | ) | const |
Get the power storage.
Storage * Actuation::getSpeedStorage | ( | ) | const |
Get the speed storage.
virtual int OpenSim::Actuation::printResults | ( | const std::string & | aBaseName, | |
const std::string & | aDir = "" , |
|||
double | aDT = -1.0 , |
|||
const std::string & | aExtension = ".sto" | |||
) | [virtual] |
Print the results of the analysis.
aFileName | File to which to print the data. | |
aDT | Time interval between results (linear interpolation is used). If not included as an argument or negative, all time steps are printed without interpolation. |
Reimplemented from OpenSim::Analysis.
int Actuation::record | ( | const SimTK::State & | s | ) | [protected, virtual] |
Record the actuation quantities.
void Actuation::setModel | ( | Model & | aModel | ) | [virtual] |
Set the model pointer for analysis.
Reimplemented from OpenSim::Analysis.
void Actuation::setStorageCapacityIncrements | ( | int | aIncrement | ) |
Set the capacity increments of all storage instances.
aIncrement | Increment by which storage capacities will be increased when storage capcities run out. |
int Actuation::step | ( | const SimTK::State & | s | ) | [virtual] |
This method is called to perform the analysis.
It can be called during the execution of a forward integrations or after the integration by feeding it the necessary data.
When called during an integration, this method is meant to be called in Model::integStepCallback(), which has the same argument list.
This method should be overriden in derived classes. It is included here so that the derived class will not have to implement it if it is not necessary.
state | System state |
Reimplemented from OpenSim::Analysis.
Storage* OpenSim::Actuation::_forceStore [protected] |
Force storage.
double* OpenSim::Actuation::_fsp [protected] |
Work array for storing forces, speeds, or powers.
int OpenSim::Actuation::_na [protected] |
Number of actuators.
Storage* OpenSim::Actuation::_powerStore [protected] |
Power storage.
Storage* OpenSim::Actuation::_speedStore [protected] |
Speed storage.