Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

suActuation Class Reference

A class for recording the basic actuator information for a model during a simulation. More...

#include <suActuation.h>

Inheritance diagram for suActuation:

rdAnalysis List of all members.

Public Member Functions

 suActuation (rdModel *aModel)
 Construct an suActuation object for recording the kinematics of a model's generalized coodinates during a simulation.

virtual ~suActuation ()
 Destructor.

void setStorageCapacityIncrements (int aIncrement)
 Set the capacity increments of all storage instances.

rdStoragegetForceStorage () const
 Get the force storage.

rdStoragegetSpeedStorage () const
 Get the speed storage.

rdStoragegetPowerStorage () const
 Get the power storage.

virtual int begin (int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called at the beginning of an analysis so that any necessary initializations may be performed.

virtual int analyze (double *aXPrev, double *aYPrev, int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called to perform the analysis.

virtual int end (int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called at the end of an analysis so that any necessary finalizations may be performed.

virtual int printResults (char *aBaseName, char *aDir=NULL, double aDT=-1.0, char *aExtension=".sto")
 Print results.


Protected Member Functions

virtual int record (double aT, double *aX, double *aY)
 Record the actuation quantities.


Protected Attributes

int _na
 Number of actuators.

double * _fsp
 Work array for storing forces, speeds, or powers.

rdStorage_forceStore
 Force storage.

rdStorage_speedStore
 Speed storage.

rdStorage_powerStore
 Power storage.


Private Member Functions

void setNull ()
 Set NULL values for all member variables.

void constructDescription ()
 Construct the description for the kinematics files.

void constructColumnLabels ()
 Construct the column labels for the kinematics files.

void allocateStorage ()
 Allocate storage for the kinematics.

void deleteStorage ()
 Delete storage objects.


Detailed Description

A class for recording the basic actuator information for a model during a simulation.

Author:
Frank C. Anderson
Version:
1.0


Constructor & Destructor Documentation

suActuation::suActuation rdModel aModel  ) 
 

Construct an suActuation object for recording the kinematics of a model's generalized coodinates during a simulation.

Parameters:
aModel Model for which the kinematics are to be recorded.


Member Function Documentation

int suActuation::analyze double *  aXPrev,
double *  aYPrev,
int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[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 rdModel::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.

Parameters:
aXPrev Controls at the beginining of the current time step.
aYPrev States at the beginning of the current time step.
aStep Step number of the integration.
aDT Size of the time step that was just taken.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.
Returns:
-1 on error, 0 otherwise.

Reimplemented from rdAnalysis.

int suActuation::begin int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[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 rdModel::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.

Parameters:
aStep Step number of the integration.
aDT Size of the time step that will be attempted.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.
Returns:
-1 on error, 0 otherwise.

Reimplemented from rdAnalysis.

int suActuation::end int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[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 rdModel::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.

Parameters:
aStep Step number of the integration.
aDT Size of the time step that was just completed.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.
Returns:
-1 on error, 0 otherwise.

Reimplemented from rdAnalysis.

rdStorage * suActuation::getForceStorage  )  const
 

Get the force storage.

Returns:
Force storage.

rdStorage * suActuation::getPowerStorage  )  const
 

Get the power storage.

Returns:
Power storage.

rdStorage * suActuation::getSpeedStorage  )  const
 

Get the speed storage.

Returns:
Speed storage.

int suActuation::printResults char *  aBaseName,
char *  aDir = NULL,
double  aDT = -1.0,
char *  aExtension = ".sto"
[virtual]
 

Print results.

The file names are constructed as aDir + "/" + aBaseName + "_" + ComponentName + aExtension

Parameters:
aDir Directory in which the results reside.
aBaseName Base file name.
aDT Desired time interval between adjacent storage vectors. Linear interpolation is used to print the data out at the desired interval.
aExtension File extension.
Returns:
0 on success, -1 on error.

Reimplemented from rdAnalysis.

void suActuation::setStorageCapacityIncrements int  aIncrement  ) 
 

Set the capacity increments of all storage instances.

Parameters:
aIncrement Increment by which storage capacities will be increased when storage capcities run out.


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:13 2003 for Simulation Software by doxygen1.3