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

Description

This class is the bridge between CasOC::Problem and MocoProblemRep.

Inputs are CasADi types, which are converted to SimTK types to evaluate problem functions. Then, results are converted back into CasADi types.

Inheritance diagram for OpenSim::MocoCasOCProblem:
CasOC::Problem

#include <Moco/Moco/MocoCasADiSolver/MocoCasOCProblem.h>

Public Member Functions

 MocoCasOCProblem (const MocoCasADiSolver &mocoCasADiSolver, const MocoProblemRep &mocoProblemRep, std::unique_ptr< ThreadsafeJar< const MocoProblemRep >> jar, std::string dynamicsMode)
 
int getJarSize () const
 
- Public Member Functions inherited from CasOC::Problem
template<typename IterateType = Iterate>
IterateType createIterate () const
 Create an iterate with the variable names populated according to the variables added to this problem. More...
 
void initialize (const std::string &finiteDiffScheme, std::shared_ptr< const std::vector< VariablesDM >> pointsForSparsityDetection) const
 
int getNumStates () const
 
int getNumControls () const
 
int getNumParameters () const
 
int getNumMultipliers () const
 
std::string getDynamicsMode () const
 
bool isDynamicsModeImplicit () const
 
int getNumDerivatives () const
 
int getNumSlacks () const
 
int getNumCoordinates () const
 This is the number of generalized coordinates, which may be greater than the number of generalized speeds. More...
 
int getNumSpeeds () const
 
int getNumAccelerations () const
 
int getNumAuxiliaryStates () const
 
int getNumCosts () const
 
bool isPrescribedKinematics () const
 
int getNumMultibodyDynamicsEquations () const
 If the coordinates are prescribed, then the number of multibody dynamics equations is not the same as the number of speeds. More...
 
const std::vector< std::string > & getAuxiliaryDerivativeNames () const
 
int getNumAuxiliaryResidualEquations () const
 
int getNumKinematicConstraintEquations () const
 
std::vector< std::string > createKinematicConstraintEquationNames () const
 Create a vector of names for scalar kinematic constraint equations. More...
 
int getNumHolonomicConstraintEquations () const
 
int getNumNonHolonomicConstraintEquations () const
 
int getNumAccelerationConstraintEquations () const
 
bool getEnforceConstraintDerivatives () const
 
const BoundsgetKinematicConstraintBounds () const
 
const BoundsgetTimeInitialBounds () const
 
const BoundsgetTimeFinalBounds () const
 
const std::vector< StateInfo > & getStateInfos () const
 
const std::vector< ControlInfo > & getControlInfos () const
 
const std::vector< MultiplierInfo > & getMultiplierInfos () const
 
const std::vector< SlackInfo > & getSlackInfos () const
 
const std::vector< ParameterInfo > & getParameterInfos () const
 
const std::vector< CostInfo > & getCostInfos () const
 
const std::vector< EndpointConstraintInfo > & getEndpointConstraintInfos () const
 
const std::vector< PathConstraintInfo > & getPathConstraintInfos () const
 
const casadi::Function & getMultibodySystem () const
 Get a function to the full multibody system (i.e. More...
 
const casadi::Function & getMultibodySystemIgnoringConstraints () const
 Get a function to the multibody system that does not compute kinematic constraint errors (if they exist). More...
 
const casadi::Function & getVelocityCorrection () const
 Get a function to compute the velocity correction to qdot when enforcing kinematic constraints and their derivatives. More...
 
const casadi::Function & getImplicitMultibodySystem () const
 
const casadi::Function & getImplicitMultibodySystemIgnoringConstraints () const
 
void intermediateCallback () const
 
void intermediateCallbackWithIterate (const CasOC::Iterate &it) const
 

Additional Inherited Members

- Protected Member Functions inherited from CasOC::Problem
void setTimeBounds (Bounds initial, Bounds final)
 
void addState (std::string name, StateType type, Bounds bounds, Bounds initialBounds, Bounds finalBounds)
 Add a differential state. More...
 
void addControl (std::string name, Bounds bounds, Bounds initialBounds, Bounds finalBounds)
 Add an algebraic variable/"state" to the problem.
 
void addKinematicConstraint (std::string multName, Bounds multbounds, Bounds multInitialBounds, Bounds multFinalBounds, KinematicLevel kinLevel)
 
void addSlack (std::string name, Bounds bounds)
 Add a slack velocity correction variable to the problem associated with a kinematic constraint in the model. More...
 
void setPrescribedKinematics (bool tf, int numMultibodyDynamicsEquations)
 Set if all kinematics are prescribed. More...
 
void setEnforceConstraintDerivatives (bool tf)
 Set whether not constraint derivatives are to be enforced.
 
void setKinematicConstraintBounds (Bounds bounds)
 Set the bounds for all kinematic constraints in the problem.
 
void addParameter (std::string name, Bounds bounds)
 Add a constant (time-invariant) variable to the optimization problem.
 
void addCost (std::string name, int numIntegrals, int numOutputs)
 Add a cost term to the problem.
 
void addEndpointConstraint (std::string name, int numIntegrals, std::vector< Bounds > bounds)
 Add an endpoint constraint to the problem.
 
void addPathConstraint (std::string name, std::vector< Bounds > bounds)
 The size of bounds must match the number of outputs in the function. More...
 
void setDynamicsMode (std::string dynamicsMode)
 
void setAuxiliaryDerivativeNames (const std::vector< std::string > &names)
 

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