OpenSim Moco  0.4.0
Public Member Functions | Protected Member Functions | List of all members
OpenSim::MocoVariableInfo Class Reference

Description

Bounds on continuous variables (states, controls, multipliers, etc).

For states, the name should correspond to a path of a state variable in the model. For controls, the name should correspond to a path of an actuator in the model, or, for controls associated with actuators that have more than one control, the path of an actuator in the model appended by the control index (e.g. "/actuator_0").

Inheritance diagram for OpenSim::MocoVariableInfo:

#include <Moco/Moco/MocoVariableInfo.h>

Public Member Functions

 MocoVariableInfo (const std::string &name, const MocoBounds &, const MocoInitialBounds &, const MocoFinalBounds &)
 
MocoBounds getBounds () const
 
MocoInitialBounds getInitialBounds () const
 
MocoFinalBounds getFinalBounds () const
 
void setBounds (const MocoBounds &bounds)
 
void setInitialBounds (const MocoInitialBounds &bounds)
 
void setFinalBounds (const MocoFinalBounds &bounds)
 
void validate () const
 Throws an exception if initial and final bounds are not within bounds.
 
void printDescription (std::ostream &stream=std::cout) const
 Print the bounds on this variable.
 

Protected Member Functions

 OpenSim_DECLARE_LIST_PROPERTY_ATMOST (bounds, double, 2, "1 value: required value over all time. " "2 values: lower, upper bounds on value over all time.")
 
 OpenSim_DECLARE_LIST_PROPERTY_ATMOST (initial_bounds, double, 2, "1 value: required initial value. " "2 values: lower, upper bounds on initial value.")
 
 OpenSim_DECLARE_LIST_PROPERTY_ATMOST (final_bounds, double, 2, "1 value: required final value. " "2 values: lower, upper bounds on final value.")
 

Member Function Documentation

◆ getBounds()

MocoBounds OpenSim::MocoVariableInfo::getBounds ( ) const
inline

Note: the return value is constructed fresh on every call from the internal property. Avoid repeated calls to this function.

◆ getFinalBounds()

MocoFinalBounds OpenSim::MocoVariableInfo::getFinalBounds ( ) const
inline

Note: the return value is constructed fresh on every call from the internal property. Avoid repeated calls to this function.

◆ getInitialBounds()

MocoInitialBounds OpenSim::MocoVariableInfo::getInitialBounds ( ) const
inline

Note: the return value is constructed fresh on every call from the internal property. Avoid repeated calls to this function.


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