OpenSim::Control Class Reference

#include <Control.h>

Inheritance diagram for OpenSim::Control:
OpenSim::Object OpenSim::ControlConstant OpenSim::ControlLinear

List of all members.

Public Member Functions

 Control (const char *aName="UNKOWN")
 Default constructor.
 Control (const Control &aControl)
 Copy constructor.
virtual ~Control ()
 Destructor.
Controloperator= (const Control &aControl)
 Assignment operator.
void setIsModelControl (bool aTrueFalse)
 Set whether or not this control is a model control.
bool getIsModelControl () const
 Get whether or not this control is a model control.
void setExtrapolate (bool aTrueFalse)
 Set whether or not to extrapolate for control curve evaluations that are outide the region of confidence for a control.
bool getExtrapolate () const
 Get whether or not to extrapolate for control curve evaluations that are outide the region of confidence for a control.
void setFilterOn (bool aTrueFalse)
 Set whether or not to apply a filter to the control values.
bool getFilterOn () const
 Get whether or not to apply a filter to the control values.
virtual int getNumParameters () const =0
void setDefaultParameterMin (double aMin)
 Set the default minimum value of a control parameter.
double getDefaultParameterMin () const
 Get the default minimum value of a control parameter.
void setDefaultParameterMax (double aMin)
 Set the default maximum value of a control parameter.
double getDefaultParameterMax () const
 Get the default maximum value of a control parameter.
virtual void setParameterMin (int aI, double aMin)=0
virtual double getParameterMin (int aI) const =0
virtual void setParameterMax (int aI, double aMax)=0
virtual double getParameterMax (int aI) const =0
virtual double getParameterTime (int aI) const =0
virtual void getParameterNeighborhood (int aI, double &rTLower, double &rTUpper) const =0
virtual int getParameterList (double aT, Array< int > &rList)=0
virtual int getParameterList (double aTLower, double aTUpper, Array< int > &rList)=0
virtual double getParameterValue (int aI) const =0
virtual void setParameterValue (int aI, double aP)=0
virtual double getControlValue (double aT=0.0)=0
virtual void setControlValue (double aT, double aX)=0
virtual double getControlValueMin (double aT=0.0)=0
virtual void setControlValueMin (double aT, double aX)=0
virtual double getControlValueMax (double aT=0.0)=0
virtual void setControlValueMax (double aT, double aX)=0
virtual const double getFirstTime () const
 Get the first time where parameter is specified.
virtual const double getLastTime () const
 Get the last time where parameter is specified.
virtual void simplify (const PropertySet &aProperties)
 Simplify the control (e.g., reduce the number of points in the control curve) based on a set of specified properties.
virtual void filter (double aT)
 Filter the control curve at a particular time.

Protected Member Functions

virtual void setupProperties ()
 Connect properties to local pointers.
void copyData (const Control &aControl)
 Copy the member variables of the specified control.

Protected Attributes

PropertyBool _propIsModelControl
 Flag that specifies whether or not this control is a model control.
PropertyBool _propExtrapolate
 Flag that specifies whether or not this control should use extrapolation for times outside the time range of the control parameters.
PropertyDbl _propDefaultMin
 Default parameter minimum.
PropertyDbl _propDefaultMax
 Default parameter maximum.
PropertyBool _propFilterOn
 Flat that indicates whether PD follower filter is on.
bool & _isModelControl
 Reference to the value of the IsModelControl property.
bool & _extrapolate
 Reference to the value of the Extrapolate flag.
double & _defaultMin
 Reference to the value of the DefaultMin property.
double & _defaultMax
 Reference to the value of the DefaultMax property.
bool & _filterOn
 Reference to the value of the PropFilterOn property.

Constructor & Destructor Documentation

Control::Control ( const char *  aName = "UNKOWN"  ) 

Default constructor.

Control::Control ( const Control aControl  ) 

Copy constructor.

Parameters:
aControl Control to copy.
Control::~Control (  )  [virtual]

Destructor.


Member Function Documentation

void Control::copyData ( const Control aControl  )  [protected]

Copy the member variables of the specified control.

Reimplemented in OpenSim::ControlLinear.

void Control::filter ( double  aT  )  [virtual]

Filter the control curve at a particular time.

Parameters:
aT Time at which to compute a new, filtered control value

Reimplemented in OpenSim::ControlLinear.

virtual double OpenSim::Control::getControlValue ( double  aT = 0.0  )  [pure virtual]
virtual double OpenSim::Control::getControlValueMax ( double  aT = 0.0  )  [pure virtual]
virtual double OpenSim::Control::getControlValueMin ( double  aT = 0.0  )  [pure virtual]
double Control::getDefaultParameterMax (  )  const

Get the default maximum value of a control parameter.

The default maximum is used when no maximum value is specified.

Returns:
Maximum value.
double Control::getDefaultParameterMin (  )  const

Get the default minimum value of a control parameter.

The default minimum is used when no minimum value is specified.

Returns:
Minimum value.
bool Control::getExtrapolate (  )  const

Get whether or not to extrapolate for control curve evaluations that are outide the region of confidence for a control.

Returns:
True if this control should use extrapolation when needed and possible,
bool Control::getFilterOn (  )  const

Get whether or not to apply a filter to the control values.

Returns:
True if a filter will be used. False otherwise.
const double Control::getFirstTime (  )  const [virtual]

Get the first time where parameter is specified.

Should be overriden by derived classes that have a defined min time.

Returns:
0.

Reimplemented in OpenSim::ControlLinear.

bool Control::getIsModelControl (  )  const

Get whether or not this control is a model control.

A model control is a control that is expected by a model. Controls that are not model controls may be, for example, controls that are used to set up a simulation. Such examples might include an initial state of a model (e.g., joint angle, joint angular velocity, ...) or the final time of a siimulation.

Returns:
True if this control is a model control, false otherwise.
const double Control::getLastTime (  )  const [virtual]

Get the last time where parameter is specified.

Should be overriden by derived classes that have a defined max time.

Returns:
0.

Reimplemented in OpenSim::ControlLinear.

virtual int OpenSim::Control::getNumParameters (  )  const [pure virtual]
virtual int OpenSim::Control::getParameterList ( double  aTLower,
double  aTUpper,
Array< int > &  rList 
) [pure virtual]
virtual int OpenSim::Control::getParameterList ( double  aT,
Array< int > &  rList 
) [pure virtual]
virtual double OpenSim::Control::getParameterMax ( int  aI  )  const [pure virtual]
virtual double OpenSim::Control::getParameterMin ( int  aI  )  const [pure virtual]
virtual void OpenSim::Control::getParameterNeighborhood ( int  aI,
double &  rTLower,
double &  rTUpper 
) const [pure virtual]
virtual double OpenSim::Control::getParameterTime ( int  aI  )  const [pure virtual]
virtual double OpenSim::Control::getParameterValue ( int  aI  )  const [pure virtual]
Control & Control::operator= ( const Control aControl  ) 

Assignment operator.

Returns:
Reference to the altered object.

Reimplemented from OpenSim::Object.

Reimplemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.

virtual void OpenSim::Control::setControlValue ( double  aT,
double  aX 
) [pure virtual]
virtual void OpenSim::Control::setControlValueMax ( double  aT,
double  aX 
) [pure virtual]
virtual void OpenSim::Control::setControlValueMin ( double  aT,
double  aX 
) [pure virtual]
void Control::setDefaultParameterMax ( double  aMax  ) 

Set the default maximum value of a control parameter.

The default maximum is used when no maximum value is specified.

Parameters:
aMax Maximum value.
void Control::setDefaultParameterMin ( double  aMin  ) 

Set the default minimum value of a control parameter.

The default minimum is used when no minimum value is specified.

Parameters:
aMin Minimum value.
void Control::setExtrapolate ( bool  aTrueFalse  ) 

Set whether or not to extrapolate for control curve evaluations that are outide the region of confidence for a control.

Parameters:
aTrueFalse If true, extrapolate when needed and possible to determine the value of the control curve.
void Control::setFilterOn ( bool  aTrueFalse  ) 

Set whether or not to apply a filter to the control values.

Parameters:
aTrueFalse If true, will apply a filter to the control values. If false, a filter will not be used.
void Control::setIsModelControl ( bool  aTrueFalse  ) 

Set whether or not this control is a model control.

A model control is a control that is expected by a model. Controls that are not model controls may be, for example, controls that are used to set up a simulation. Such examples might include an initial state of a model (e.g., joint angle, joint angular velocity, ...) or the final time of a siimulation.

Parameters:
aTrueFalse If true, the control is treated as a model control. If false, the control is not treated as a model control.
virtual void OpenSim::Control::setParameterMax ( int  aI,
double  aMax 
) [pure virtual]
virtual void OpenSim::Control::setParameterMin ( int  aI,
double  aMin 
) [pure virtual]
virtual void OpenSim::Control::setParameterValue ( int  aI,
double  aP 
) [pure virtual]
void Control::setupProperties ( void   )  [protected, virtual]

Connect properties to local pointers.

Reimplemented from OpenSim::Object.

Reimplemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.

void Control::simplify ( const PropertySet aProperties  )  [virtual]

Simplify the control (e.g., reduce the number of points in the control curve) based on a set of specified properties.

Each implementation is free to require whatever properties are needed to perform the simplification. Refer to the documentation in derived classes to see what properties are required.

Parameters:
aProperties Set of properties used to perform the simplify operation.
Exceptions:
Exception This method does nothing. It must be overriden in derived classes.

Reimplemented in OpenSim::ControlLinear.


Member Data Documentation

double& OpenSim::Control::_defaultMax [protected]

Reference to the value of the DefaultMax property.

double& OpenSim::Control::_defaultMin [protected]

Reference to the value of the DefaultMin property.

bool& OpenSim::Control::_extrapolate [protected]

Reference to the value of the Extrapolate flag.

bool& OpenSim::Control::_filterOn [protected]

Reference to the value of the PropFilterOn property.

Reference to the value of the IsModelControl property.

Default parameter maximum.

Default parameter minimum.

Flag that specifies whether or not this control should use extrapolation for times outside the time range of the control parameters.

Flat that indicates whether PD follower filter is on.

Flag that specifies whether or not this control is a model control.


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

Generated on Wed Dec 16 15:03:43 2009 for OpenSim by  doxygen 1.6.1