API  4.5
For C++ developers
OpenSim::MocoTropterSolver::TropterProblemBase< T > Class Template Reference
+ Inheritance diagram for OpenSim::MocoTropterSolver::TropterProblemBase< 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. More...
 
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. More...
 
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. More...
 
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 Modelm_modelBase
 
SimTK::State & m_stateBase
 
const Modelm_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::SpatialVecm_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
 

Constructor & Destructor Documentation

◆ TropterProblemBase()

Member Function Documentation

◆ addControlVariables()

◆ addCosts()

◆ addGenericPathConstraints()

◆ addKinematicConstraints()

◆ addParameters()

◆ addStateVariables()

◆ applyParametersToModelProperties()

template<typename T >
void OpenSim::MocoTropterSolver::TropterProblemBase< T >::applyParametersToModelProperties ( const tropter::VectorX< T > &  parameters) const
inlineprotected

◆ calc_cost()

◆ calc_cost_integrand()

◆ calcAndApplyKinematicConstraintForces()

◆ calcKinematicConstraintErrors()

◆ calcPathConstraintErrors()

◆ convertIterateTropterToMoco()

template<typename T >
template<typename MocoTrajectoryType , typename tropIterateType >
MocoTrajectoryType OpenSim::MocoTropterSolver::TropterProblemBase< T >::convertIterateTropterToMoco ( const tropIterateType &  tropSol) const

◆ convertToMocoSolution()

template<typename T >
MocoSolution OpenSim::MocoTropterSolver::TropterProblemBase< T >::convertToMocoSolution ( const tropter::Solution &  tropSol) const

◆ convertToMocoTrajectory()

template<typename T >
MocoTrajectory OpenSim::MocoTropterSolver::TropterProblemBase< T >::convertToMocoTrajectory ( const tropter::Iterate &  tropSol) const

◆ convertToTropterIterate()

template<typename T >
tropter::Iterate OpenSim::MocoTropterSolver::TropterProblemBase< T >::convertToTropterIterate ( const MocoTrajectory mocoIter) const

◆ initialize_on_iterate()

template<typename T >
void OpenSim::MocoTropterSolver::TropterProblemBase< T >::initialize_on_iterate ( const Eigen::VectorXd &  parameters) const
inlinefinaloverrideprotected

◆ setSimTKState() [1/2]

◆ setSimTKState() [2/2]

◆ setSimTKStateForCostFinal()

template<typename T >
void OpenSim::MocoTropterSolver::TropterProblemBase< T >::setSimTKStateForCostFinal ( const tropter::CostInput< T > &  in) const
inlineprotected

◆ setSimTKStateForCostInitial()

template<typename T >
void OpenSim::MocoTropterSolver::TropterProblemBase< T >::setSimTKStateForCostInitial ( const tropter::CostInput< T > &  in) const
inlineprotected

◆ setSimTKTimeAndStates()

template<typename T >
void OpenSim::MocoTropterSolver::TropterProblemBase< T >::setSimTKTimeAndStates ( const T &  time,
Eigen::Ref< const tropter::VectorX< T >>  states,
SimTK::State &  simTKState 
) const
inlineprotected

Member Data Documentation

◆ m_constraintBodyForces

◆ m_constraintMobilityForces

template<typename T >
SimTK::Vector OpenSim::MocoTropterSolver::TropterProblemBase< T >::m_constraintMobilityForces
mutableprotected

◆ m_fileDeletionThrower

◆ m_implicit

template<typename T >
const bool OpenSim::MocoTropterSolver::TropterProblemBase< T >::m_implicit
protected

◆ m_mocoProbRep

◆ m_mocoTropterSolver

◆ m_modelBase

◆ m_modelControlIndices

◆ m_modelDisabledConstraints

◆ m_multiplierCostIndex

◆ m_numKinematicConstraintEquations

◆ m_numMultipliers

◆ m_numPathConstraintEquations

◆ m_pvaerr

◆ m_stateBase

◆ m_stateDisabledConstraints

◆ m_svNamesInSysOrder

◆ m_total_ma

◆ m_total_mp

◆ m_total_mv

◆ m_yIndexMap

◆ qdot

◆ qdotCorr


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