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

Description

Enforce the differential equations in the problem using a Hermite- Simpson (third-order) approximation.

The integral in the objective function is approximated by Simpson quadrature.

Defect constraints.

For each state variable, there is one pair of defect constraints (Hermite interpolant defect + Simpson integration defect) per mesh interval. Each mesh interval includes two mesh points (at the interval's endpoints) and an additional collocation point at the mesh interval midpoint. All three mesh interval points (2 mesh points + 1 collocation point) are used to construct the defects.

Kinematic constraints and path constraints.

Kinematic constraint and path constraint errors are enforced only at the mesh points. Errors at collocation points at the mesh interval midpoint are ignored.

Inheritance diagram for CasOC::HermiteSimpson:
CasOC::Transcription

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

Public Member Functions

 HermiteSimpson (const Solver &solver, const Problem &problem)
 
- Public Member Functions inherited from CasOC::Transcription
 Transcription (const Solver &solver, const Problem &problem)
 
Iterate createInitialGuessFromBounds () const
 
Iterate createRandomIterateWithinBounds (const SimTK::Random *=nullptr) const
 Use the provided random number generator to generate an iterate. More...
 
template<typename T >
createTimes (const T &initialTime, const T &finalTime) const
 
casadi::DM createQuadratureCoefficients () const
 
casadi::DM createMeshIndices () const
 
Solution solve (const Iterate &guessOrig)
 

Additional Inherited Members

- Protected Member Functions inherited from CasOC::Transcription
void createVariablesAndSetBounds (const casadi::DM &grid, int numDefectsPerMeshInterval, const casadi::DM &pointsForInterpControls=casadi::DM())
 This must be called in the constructor of derived classes so that overridden virtual methods are accessible to the base class. More...
 
casadi::MXVector evalOnTrajectory (const casadi::Function &pointFunction, const std::vector< Var > &inputs, const casadi::Matrix< casadi_int > &timeIndices) const
 We assume all functions depend on time and parameters. More...
 
template<typename TRow , typename TColumn >
void setVariableBounds (Var var, const TRow &rowIndices, const TColumn &columnIndices, const Bounds &bounds)
 
void printConstraintValues (const Iterate &it, const Constraints< casadi::DM > &constraints, std::ostream &stream=std::cout) const
 
void printObjectiveBreakdown (const Iterate &it, const casadi::DM &objectiveTerms, std::ostream &stream=std::cout) const
 
- Protected Attributes inherited from CasOC::Transcription
const Solverm_solver
 
const Problemm_problem
 
int m_numGridPoints = -1
 
int m_numMeshPoints = -1
 
int m_numMeshIntervals = -1
 
int m_numMeshInteriorPoints = -1
 
int m_numDefectsPerMeshInterval = -1
 
int m_numMultibodyResiduals = -1
 
int m_numAuxiliaryResiduals = -1
 
int m_numConstraints = -1
 
casadi::DM m_grid
 
casadi::DM m_pointsForInterpControls
 
casadi::MX m_times
 
casadi::MX m_duration
 

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