OpenSim::CMCTool Class Reference

An abstract class for specifying the interface for an investigation. More...

#include <CMCTool.h>

Inheritance diagram for OpenSim::CMCTool:
OpenSim::AbstractTool OpenSim::Object

List of all members.

Public Member Functions

virtual ~CMCTool ()
 Destructor.
 CMCTool ()
 Default constructor.
 CMCTool (const std::string &aFileName, bool aLoadModel=true) SWIG_DECLARE_EXCEPTION
 CMCTool (const CMCTool &aObject)
 Copy constructor.
virtual Objectcopy () const
 Virtual copy constructor.
CMCTooloperator= (const CMCTool &aCMCTool)
 Assignment operator.
const std::string & getDesiredPointsFileName ()
void setDesiredPointsFileName (const std::string &aFileName)
const std::string & getDesiredKinematicsFileName ()
void setDesiredKinematicsFileName (const std::string &aFileName)
const std::string & getConstraintsFileName ()
void setConstraintsFileName (const std::string &aFileName)
const std::string & getTaskSetFileName ()
void setTaskSetFileName (const std::string &aFileName)
const std::string & getRRAControlsFileName ()
void setRRAControlsFileName (const std::string &aFileName)
double getLowpassCutoffFrequency () const
void setLowpassCutoffFrequency (double aLowpassCutoffFrequency)
double getTimeWindow () const
void setTimeWindow (double aTargetDT)
const std::string & getExternalLoadsFileName () const
void setExternalLoadsFileName (const std::string &aFileName)
bool getUseFastTarget () const
void setUseFastTarget (bool useFastTarget) const
virtual bool run () SWIG_DECLARE_EXCEPTION
 Run the investigation.
StoragegetForceStorage ()
 Get a pointer to the Storage object holding forces.
void setOriginalForceSet (const ForceSet &aForceSet)
ControlSetconstructRRAControlSet (ControlSet *aControlConstraints)
 Create a set of control constraints based on an RRA solution.
void initializeControlSetUsingConstraints (const ControlSet *aRRAControlSet, const ControlSet *aControlConstraints, ControlSet &rControlSet)
 Set controls to use steps except for the residuals, which use linear interpolation.
void addNecessaryAnalyses ()
 Add Actuation/Kinematics analyses if necessary.

Detailed Description

An abstract class for specifying the interface for an investigation.

Author:
Frank C. Anderson
Version:
1.0

Constructor & Destructor Documentation

CMCTool::~CMCTool (  )  [virtual]

Destructor.

CMCTool::CMCTool (  ) 

Default constructor.

OpenSim::CMCTool::CMCTool ( const std::string &  aFileName,
bool  aLoadModel = true 
)
CMCTool::CMCTool ( const CMCTool aTool  ) 

Copy constructor.

Copy constructors for all Tools do not copy the Object's DOMnode and XMLDocument. The reason for this is that for the object and all its derived classes to establish the correct connection to the XML document nodes, the the object would need to reconstruct based on the XML document not the values of the object's member variables.

There are three proper ways to generate an XML document for a Tool:

1) Construction based on XML file (

See also:
Tool(const char *aFileName)). In this case, the XML document is created by parsing the XML file.

2) Construction by Tool(const XMLDocument *aDocument). This constructor explictly requests construction based on an XML document that is held in memory. In this way the proper connection between an object's node and the corresponding node within the XML document is established. This constructor is a copy constructor of sorts because all essential Tool member variables should be held within the XML document. The advantage of this style of construction is that nodes within the XML document, such as comments that may not have any associated Tool member variable, are preserved.

3) A call to generateXMLDocument(). This method generates an XML document for the Tool from scratch. Only the essential document nodes are created (that is, nodes that correspond directly to member variables.).

Parameters:
aTool Object to be copied.
See also:
Tool(const XMLDocument *aDocument)
Tool(const char *aFileName)
generateXMLDocument()

Member Function Documentation

void CMCTool::addNecessaryAnalyses (  ) 

Add Actuation/Kinematics analyses if necessary.

ControlSet * CMCTool::constructRRAControlSet ( ControlSet aControlConstraints  ) 

Create a set of control constraints based on an RRA solution.

If RRA (Residual Reduction Algorithm) was run to compute or reduce the residuals as a preprocessing step, those residuals need to be applied during the CMC run. They are applied by reading in the residuals computed during RRA and then using these controls to place narrow constraints on the controls for the residual actuators active during the CMC run.

Parameters:
aControlConstraints Constraints based on a previous RRA solution to be used during this run of CMC.
Object * CMCTool::copy (  )  const [virtual]

Virtual copy constructor.

Returns:
Copy of this object.

Reimplemented from OpenSim::Object.

const std::string& OpenSim::CMCTool::getConstraintsFileName (  )  [inline]
const std::string& OpenSim::CMCTool::getDesiredKinematicsFileName (  )  [inline]
const std::string& OpenSim::CMCTool::getDesiredPointsFileName (  )  [inline]
const std::string& OpenSim::CMCTool::getExternalLoadsFileName (  )  const [inline]

Reimplemented from OpenSim::AbstractTool.

Storage & CMCTool::getForceStorage (  ) 

Get a pointer to the Storage object holding forces.

This's a utility routine used by the SimTrack GUI primarily to get access to residuals while running RRA.

User-beware, the storage will get out of scope and potentially get deleted when the analysis is done, so no assumptions about the lifetime of the returned storage object outside the owning analysis should be made.

double OpenSim::CMCTool::getLowpassCutoffFrequency (  )  const [inline]
const std::string& OpenSim::CMCTool::getRRAControlsFileName (  )  [inline]
const std::string& OpenSim::CMCTool::getTaskSetFileName (  )  [inline]
double OpenSim::CMCTool::getTimeWindow (  )  const [inline]
bool OpenSim::CMCTool::getUseFastTarget (  )  const [inline]
void CMCTool::initializeControlSetUsingConstraints ( const ControlSet aRRAControlSet,
const ControlSet aControlConstraints,
ControlSet rControlSet 
)

Set controls to use steps except for the residuals, which use linear interpolation.

This method also sets the min and max values for the controls.

Parameters:
aRRAControlSet Controls that were output by an RRA pass.
rControlSet Controls for the current run of CMC.
CMCTool & CMCTool::operator= ( const CMCTool aTool  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::AbstractTool.

bool CMCTool::run (  )  [virtual]

Run the investigation.

Implements OpenSim::AbstractTool.

void OpenSim::CMCTool::setConstraintsFileName ( const std::string &  aFileName  )  [inline]
void OpenSim::CMCTool::setDesiredKinematicsFileName ( const std::string &  aFileName  )  [inline]
void OpenSim::CMCTool::setDesiredPointsFileName ( const std::string &  aFileName  )  [inline]
void OpenSim::CMCTool::setExternalLoadsFileName ( const std::string &  aFileName  )  [inline]

Reimplemented from OpenSim::AbstractTool.

void OpenSim::CMCTool::setLowpassCutoffFrequency ( double  aLowpassCutoffFrequency  )  [inline]
void CMCTool::setOriginalForceSet ( const ForceSet aForceSet  ) 
void OpenSim::CMCTool::setRRAControlsFileName ( const std::string &  aFileName  )  [inline]
void OpenSim::CMCTool::setTaskSetFileName ( const std::string &  aFileName  )  [inline]
void OpenSim::CMCTool::setTimeWindow ( double  aTargetDT  )  [inline]
void OpenSim::CMCTool::setUseFastTarget ( bool  useFastTarget  )  const [inline]

The documentation for this class was generated from the following files:

Generated on Sun Sep 25 00:20:06 2011 for OpenSim by  doxygen 1.6.1