OpenSim Moco  0.4.0
Classes | Typedefs | Enumerations
CasOC Namespace Reference

CasOC is a namespace containing classes for solving multibody optimal control problems with CasADi. More...

Classes

struct  Bounds
 
struct  ControlInfo
 
class  Cost
 This invokes CasOC::Problem::calcCost(). More...
 
struct  CostInfo
 
class  CostIntegrand
 
class  Endpoint
 This function takes initial states/controls, final states/controls, and an integral. More...
 
class  EndpointConstraint
 This invokes CasOC::Problem::calcEndpointConstraint(). More...
 
struct  EndpointConstraintInfo
 
class  EndpointConstraintIntegrand
 
struct  EndpointInfo
 
class  Function
 
class  HermiteSimpson
 Enforce the differential equations in the problem using a Hermite- Simpson (third-order) approximation. More...
 
class  Integrand
 
struct  Iterate
 This struct is used to obtain initial guesses. More...
 
class  MultibodySystemExplicit
 This function should compute forward dynamics (explicit multibody dynamics), auxiliary explicit dynamics, and the errors for the kinematic constraints. More...
 
class  MultibodySystemImplicit
 
struct  MultiplierInfo
 
struct  ParameterInfo
 
class  PathConstraint
 
struct  PathConstraintInfo
 The number outputs in the function must match the size of lowerBounds and upperBounds. More...
 
class  Problem
 
struct  SlackInfo
 
struct  Solution
 
class  Solver
 Once you have built your CasOC::Problem, create a CasOC::Solver to configure how you want to solve the problem, then invoke solve() to solve your problem. More...
 
struct  StateInfo
 
class  Transcription
 This is the base class for transcription schemes that convert a CasOC::Problem into a general nonlinear programming problem. More...
 
class  Trapezoidal
 Enforce the differential equations in the problem using a trapezoidal (second-order) approximation. More...
 
class  VelocityCorrection
 This function should compute a velocity correction term to make feasible problems that enforce kinematic constraints and their derivatives. More...
 

Typedefs

using VectorDM = std::vector< casadi::DM >
 
template<typename T >
using Variables = std::unordered_map< Var, T, std::hash< int > >
 
using VariablesDM = Variables< casadi::DM >
 Numeric variables for initial guesses and solutions.
 
using VariablesMX = Variables< casadi::MX >
 Symbolic variables, used to define the problem.
 
using ObjectiveBreakdown = std::vector< std::pair< std::string, double > >
 This struct is used to return a solution to a problem. More...
 

Enumerations

enum  Var {
  initial_time, final_time, states, controls,
  multipliers, slacks, derivatives, parameters,
  multibody_states = 100
}
 This enum describes the different types of optimization variables, and are the keys for the Variables map. More...
 
enum  StateType { Coordinate, Speed, Auxiliary }
 This enum is used to categorize a state variable as a generalized coordinate, as a generalized speed, or as an auxiliary state variable (e.g., muscle activity). More...
 
enum  KinematicLevel { Position, Velocity, Acceleration }
 

Detailed Description

CasOC is a namespace containing classes for solving multibody optimal control problems with CasADi.

CasOC is not designed to solve generic optimal control problems. For example, CasOC does not require the user to provide a system of first-order differential equations.

CasOC does not conceptually depend on OpenSim or Moco, though CasOC may use OpenSim/Moco utilities (e.g., exception handling). CasADi Optimal Control.

Typedef Documentation

◆ ObjectiveBreakdown

using CasOC::ObjectiveBreakdown = typedef std::vector<std::pair<std::string, double> >

This struct is used to return a solution to a problem.

Use stats to check if the problem converged.

Enumeration Type Documentation

◆ StateType

enum CasOC::StateType
strong

This enum is used to categorize a state variable as a generalized coordinate, as a generalized speed, or as an auxiliary state variable (e.g., muscle activity).

◆ Var

enum CasOC::Var

This enum describes the different types of optimization variables, and are the keys for the Variables map.

Enumerator
states 

Differential variables.

controls 

Algebraic variables.

multipliers 

Used for kinematic constraints.

slacks 

Used for certain methods of solving kinematic constraints.

derivatives 

Used in implicit dynamics mode.

parameters 

Constant in time.

multibody_states 

For internal use (never actually a key for Variables).