#include <Control.h>
Public Member Functions | |
Control (const char *aName="UNKOWN") | |
Default constructor. | |
Control (const Control &aControl) | |
Copy constructor. | |
virtual | ~Control () |
Destructor. | |
Control & | operator= (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. |
Control::Control | ( | const char * | aName = "UNKOWN" |
) |
Default constructor.
Control::Control | ( | const Control & | aControl | ) |
Copy constructor.
aControl | Control to copy. |
Control::~Control | ( | ) | [virtual] |
Destructor.
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.
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] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual double OpenSim::Control::getControlValueMax | ( | double | aT = 0.0 |
) | [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual double OpenSim::Control::getControlValueMin | ( | double | aT = 0.0 |
) | [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
double Control::getDefaultParameterMax | ( | ) | const |
Get the default maximum value of a control parameter.
The default maximum is used when no maximum value is specified.
double Control::getDefaultParameterMin | ( | ) | const |
Get the default minimum value of a control parameter.
The default minimum is used when no minimum value is specified.
bool Control::getExtrapolate | ( | ) | const |
Get whether or not to extrapolate for control curve evaluations that are outide the region of confidence for a control.
bool Control::getFilterOn | ( | ) | const |
Get whether or not to apply a filter to the control values.
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.
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.
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.
Reimplemented in OpenSim::ControlLinear.
virtual int OpenSim::Control::getNumParameters | ( | ) | const [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual int OpenSim::Control::getParameterList | ( | double | aTLower, | |
double | aTUpper, | |||
Array< int > & | rList | |||
) | [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual int OpenSim::Control::getParameterList | ( | double | aT, | |
Array< int > & | rList | |||
) | [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual double OpenSim::Control::getParameterMax | ( | int | aI | ) | const [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual double OpenSim::Control::getParameterMin | ( | int | aI | ) | const [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual void OpenSim::Control::getParameterNeighborhood | ( | int | aI, | |
double & | rTLower, | |||
double & | rTUpper | |||
) | const [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual double OpenSim::Control::getParameterTime | ( | int | aI | ) | const [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual double OpenSim::Control::getParameterValue | ( | int | aI | ) | const [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
Assignment operator.
Reimplemented from OpenSim::Object.
Reimplemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual void OpenSim::Control::setControlValue | ( | double | aT, | |
double | aX | |||
) | [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual void OpenSim::Control::setControlValueMax | ( | double | aT, | |
double | aX | |||
) | [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual void OpenSim::Control::setControlValueMin | ( | double | aT, | |
double | aX | |||
) | [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
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.
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.
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.
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.
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.
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] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual void OpenSim::Control::setParameterMin | ( | int | aI, | |
double | aMin | |||
) | [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
virtual void OpenSim::Control::setParameterValue | ( | int | aI, | |
double | aP | |||
) | [pure virtual] |
Implemented in OpenSim::ControlConstant, and OpenSim::ControlLinear.
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.
aProperties | Set of properties used to perform the simplify operation. |
Exception | This method does nothing. It must be overriden in derived classes. |
Reimplemented in OpenSim::ControlLinear.
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.
bool& OpenSim::Control::_isModelControl [protected] |
Reference to the value of the IsModelControl property.
PropertyDbl OpenSim::Control::_propDefaultMax [protected] |
Default parameter maximum.
PropertyDbl OpenSim::Control::_propDefaultMin [protected] |
Default parameter minimum.
PropertyBool OpenSim::Control::_propExtrapolate [protected] |
Flag that specifies whether or not this control should use extrapolation for times outside the time range of the control parameters.
PropertyBool OpenSim::Control::_propFilterOn [protected] |
Flat that indicates whether PD follower filter is on.
PropertyBool OpenSim::Control::_propIsModelControl [protected] |
Flag that specifies whether or not this control is a model control.