OpenSim Moco  0.2.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpenSim::MocoTropterSolver::TropterProblemBase< T > Class Template Reference
Inheritance diagram for OpenSim::MocoTropterSolver::TropterProblemBase< T >:
tropter::Problem< T > OpenSim::MocoTropterSolver::ExplicitTropterProblem< T > OpenSim::MocoTropterSolver::ImplicitTropterProblem< T >

Public Member Functions

template<typename MocoTrajectoryType , typename tropIterateType >
MocoTrajectoryType convertIterateTropterToMoco (const tropIterateType &tropSol) const
 
MocoTrajectory convertToMocoTrajectory (const tropter::Iterate &tropSol) const
 
MocoSolution convertToMocoSolution (const tropter::Solution &tropSol) const
 
tropter::Iterate convertToTropterIterate (const MocoTrajectory &mocoIter) const
 

Protected Member Functions

 TropterProblemBase (const MocoTropterSolver &solver, bool implicit=false)
 
void addStateVariables ()
 
void addControlVariables ()
 
void addCosts ()
 
void addKinematicConstraints ()
 
void addGenericPathConstraints ()
 Add any generic path constraints included in the problem.
 
void addParameters ()
 
void initialize_on_iterate (const Eigen::VectorXd &parameters) const override final
 
void setSimTKTimeAndStates (const T &time, Eigen::Ref< const tropter::VectorX< T >> states, SimTK::State &simTKState) const
 
void setSimTKState (const tropter::Input< T > &in) const
 
void setSimTKStateForCostInitial (const tropter::CostInput< T > &in) const
 
void setSimTKStateForCostFinal (const tropter::CostInput< T > &in) const
 
void setSimTKState (const T &time, const Eigen::Ref< const tropter::VectorX< T >> &states, const Eigen::Ref< const tropter::VectorX< T >> &controls, const Eigen::Ref< const tropter::VectorX< T >> &adjuncts, int stateDisConIndex=0) const
 Use stateDisConIndex to specify which of the two stateDisabledConstraints from MocoProblemRep to update.
 
void calc_cost_integrand (int cost_index, const tropter::Input< T > &in, T &integrand) const override
 
void calc_cost (int cost_index, const tropter::CostInput< T > &in, T &cost_value) const override
 
void applyParametersToModelProperties (const tropter::VectorX< T > &parameters) const
 Apply parameters to properties in m_modelBase and m_modelDisabledConstraints.
 
void calcAndApplyKinematicConstraintForces (const tropter::VectorX< T > &adjuncts, const SimTK::State &stateBase, SimTK::State &stateDisabledConstraints) const
 
void calcKinematicConstraintErrors (const SimTK::Vector &udot, tropter::Output< T > &out) const
 
void calcPathConstraintErrors (const SimTK::State &state, tropter::Output< T > &out) const
 

Protected Attributes

const MocoTropterSolverm_mocoTropterSolver
 
const MocoProblemRepm_mocoProbRep
 
const Model & m_modelBase
 
SimTK::State & m_stateBase
 
const Model & m_modelDisabledConstraints
 
SimTK::State & m_stateDisabledConstraints
 
const bool m_implicit
 
int m_multiplierCostIndex = -1
 
std::unique_ptr< FileDeletionThrowerm_fileDeletionThrower
 
std::vector< std::string > m_svNamesInSysOrder
 
std::unordered_map< int, int > m_yIndexMap
 
std::vector< int > m_modelControlIndices
 
SimTK::Vector_< SimTK::SpatialVec > m_constraintBodyForces
 
SimTK::Vector m_constraintMobilityForces
 
SimTK::Vector qdot
 
SimTK::Vector qdotCorr
 
int m_total_mp = 0
 
int m_total_mv = 0
 
int m_total_ma = 0
 
int m_numMultipliers = 0
 
SimTK::Vector m_pvaerr
 
int m_numKinematicConstraintEquations = 0
 
int m_numPathConstraintEquations = 0
 

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