OpenSim Moco
0.4.0
|
Information for a given constraint in the optimal control problem.
The name should correspond to a MocoPathConstraint in the problem.
#include <Moco/Moco/MocoConstraintInfo.h>
Public Member Functions | |
int | getNumEquations () const |
std::vector< MocoBounds > | getBounds () const |
Get the bounds on the scalar constraint equations. More... | |
std::vector< std::string > | getSuffixes () const |
Get the suffixes for the scalar constraint equations. More... | |
void | setBounds (const std::vector< MocoBounds > &bounds) |
void | setSuffixes (const std::vector< std::string > &suffixes) |
std::vector< std::string > | getConstraintLabels () const |
Get a list of constraint labels based on the constraint name and, if specified, the list of suffixes. More... | |
void | printDescription (std::ostream &stream=std::cout) const |
Print the name, type, number of scalar equations, and bounds for this constraint. More... | |
Friends | |
class | MocoPathConstraint |
class | MocoKinematicConstraint |
class | MocoGoal |
|
inline |
Get the bounds on the scalar constraint equations.
If the number of equations have been set, but not the bounds, zero-bounds are returned as a default. If nothing has been set, this returns an empty vector.
Note: the return value is constructed fresh on every call from the internal property. Avoid repeated calls to this function.
std::vector<std::string> OpenSim::MocoConstraintInfo::getConstraintLabels | ( | ) | const |
Get a list of constraint labels based on the constraint name and, if specified, the list of suffixes.
If no suffixes have been specified, zero-indexed, numeric suffixes will be applied as a default. The length of the returned vector is equal to the value returned by getNumEquations().
|
inline |
Get the suffixes for the scalar constraint equations.
If the suffixes have not been set, this returns an empty vector.
Note: the return value is constructed fresh on every call from the internal property. Avoid repeated calls to this function.
void OpenSim::MocoConstraintInfo::printDescription | ( | std::ostream & | stream = std::cout | ) | const |
Print the name, type, number of scalar equations, and bounds for this constraint.
|
inline |
Note: if the number of equations has not been set, this updates the internal equation count variable. If the number of equations has been set and the vector passed is the incorrect size, an error is thrown.
|
inline |
Note: if the number of equations has not been set, this updates the internal equation count variable. If the number of equations has been set and the vector passed is the incorrect size, an error is thrown.