OCS2 Manual  v1.0.0
OCS2 Documentation
ocs2_core

Detailed Description

Namespaces

 ocs2::loopshaping_property_tree
 

Classes

class  ocs2::AutomaticDifferentiationBase< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >
 
class  ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >
 
class  ocs2::ConstraintBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LinearConstraint< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >
 
class  ocs2::RelaxedBarrierPenalty< STATE_DIM, INPUT_DIM >
 
class  ocs2::ControllerBase< STATE_DIM, INPUT_DIM >
 
class  ocs2::FeedforwardController< STATE_DIM, INPUT_DIM >
 
class  ocs2::LinearController< STATE_DIM, INPUT_DIM >
 
class  ocs2::PiController< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::CostDesiredTrajectories< SCALAR_T >
 
class  ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >
 
class  ocs2::QuadraticCostFunction< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::Dimensions< STATE_DIM, INPUT_DIM >
 
class  ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::DerivativesBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LinearSystemDynamics< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >
 
class  ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >
 
class  ocs2::SystemDynamicsLinearizer< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::TransferFunctionBase
 
class  ocs2::SystemOperatingPoint< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::SystemOperatingTrajectoriesBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::EventHandlerBase< STATE_DIM >
 
class  ocs2::Integrator< STATE_DIM, Stepper >
 
class  ocs2::IntegratorBase< STATE_DIM >
 
class  ocs2::Observer< STATE_DIM >
 
class  ocs2::OdeBase< STATE_DIM >
 
class  ocs2::OdeFunc< STATE_DIM >
 
class  ocs2::StateTriggeredEventHandler< STATE_DIM >
 
class  ocs2::SystemEventHandler< STATE_DIM >
 
class  ocs2::HybridLogicRulesMachine< LOGIC_RULES_T >
 
class  ocs2::LogicRulesMachine< LOGIC_RULES_T >
 
struct  ocs2::ModeSequenceTemplate< scalar_t >
 
class  ocs2::HybridLogicRules
 
class  ocs2::LogicRulesBase
 
class  ocs2::NullLogicRules
 
class  ocs2::LoopshapingConstraint< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingConstraintEliminatePattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingConstraintInputPattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingConstraintOutputPattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingCost< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingCostEliminatePattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingCostInputPattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingCostOutputPattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingDynamics< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingDynamicsDerivative< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingDynamicsDerivativeEliminatePattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingDynamicsDerivativeInputPattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingDynamicsDerivativeOutputPattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingDynamicsInputPattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingDynamicsOutputPattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LoopshapingFilterDynamics< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM >
 
class  ocs2::LoopshapingDefinition
 
class  ocs2::Filter
 
class  ocs2::LoopshapingOperatingPoint< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
class  ocs2::LinearFunction< STATE_DIM, DIM1, DIM2, scalar_t >
 
class  ocs2::LinearInterpolation< Data_T, Alloc >
 
class  ocs2::LTI_Equations< DIM1, DIM2, SCALAR_T >
 
class  ocs2::TrajectorySpreadingController< STATE_DIM, INPUT_DIM >
 
class  ocs2::OCS2NumericTraits< T >
 

Typedefs

template<int STATE_DIM>
using ocs2::IntegratorEuler = Integrator< STATE_DIM, euler_t< STATE_DIM > >
 
template<int STATE_DIM>
using ocs2::IntegratorModifiedMidpoint = Integrator< STATE_DIM, modified_midpoint_t< STATE_DIM > >
 
template<int STATE_DIM>
using ocs2::IntegratorRK4 = Integrator< STATE_DIM, runge_kutta_4_t< STATE_DIM > >
 
template<int STATE_DIM>
using ocs2::IntegratorRK5Variable = Integrator< STATE_DIM, dense_runge_kutta5_t< STATE_DIM > >
 
template<int STATE_DIM>
using ocs2::ODE45 = Integrator< STATE_DIM, runge_kutta_dopri5_t< STATE_DIM > >
 
template<int STATE_DIM, size_t STEPS>
using ocs2::IntegratorAdamsBashforth = Integrator< STATE_DIM, adams_bashforth_uncontrolled_t< STATE_DIM, STEPS > >
 
template<int STATE_DIM>
using ocs2::IntegratorBulirschStoer = Integrator< STATE_DIM, bulirsch_stoer_t< STATE_DIM > >
 
template<int STATE_DIM>
using ocs2::euler_t = boost::numeric::odeint::euler< Eigen::Matrix< double, STATE_DIM, 1 >, double, Eigen::Matrix< double, STATE_DIM, 1 >, double, boost::numeric::odeint::vector_space_algebra >
 
template<int STATE_DIM>
using ocs2::modified_midpoint_t = boost::numeric::odeint::modified_midpoint< Eigen::Matrix< double, STATE_DIM, 1 >, double, Eigen::Matrix< double, STATE_DIM, 1 >, double, boost::numeric::odeint::vector_space_algebra >
 
template<int STATE_DIM>
using ocs2::runge_kutta_4_t = boost::numeric::odeint::runge_kutta4< Eigen::Matrix< double, STATE_DIM, 1 >, double, Eigen::Matrix< double, STATE_DIM, 1 >, double, boost::numeric::odeint::vector_space_algebra >
 
template<int STATE_DIM>
using ocs2::runge_kutta_dopri5_t = boost::numeric::odeint::runge_kutta_dopri5< Eigen::Matrix< double, STATE_DIM, 1 >, double, Eigen::Matrix< double, STATE_DIM, 1 >, double, boost::numeric::odeint::vector_space_algebra >
 
template<int STATE_DIM>
using ocs2::dense_runge_kutta5_t = boost::numeric::odeint::dense_output_runge_kutta< boost::numeric::odeint::controlled_runge_kutta< runge_kutta_dopri5_t< STATE_DIM > > >
 
template<int STATE_DIM>
using ocs2::bulirsch_stoer_t = boost::numeric::odeint::bulirsch_stoer< Eigen::Matrix< double, STATE_DIM, 1 >, double, Eigen::Matrix< double, STATE_DIM, 1 >, double, boost::numeric::odeint::vector_space_algebra >
 
template<int STATE_DIM, size_t STEPS>
using ocs2::adams_bashforth_uncontrolled_t = boost::numeric::odeint::adams_bashforth< STEPS, Eigen::Matrix< double, STATE_DIM, 1 >, double, Eigen::Matrix< double, STATE_DIM, 1 >, double, boost::numeric::odeint::vector_space_algebra >
 
template<size_t FULL_STATE_DIM, size_t FULL_INPUT_DIM, size_t SYSTEM_STATE_DIM, size_t SYSTEM_INPUT_DIM, size_t FILTER_STATE_DIM, size_t FILTER_INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::LoopshapingDynamicsEliminatePattern = LoopshapingDynamicsInputPattern< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T >
 
template<typename Data_T >
using ocs2::EigenLinearInterpolation = LinearInterpolation< Data_T, Eigen::aligned_allocator< Data_T > >
 

Enumerations

enum  ocs2::ControllerType {
  ocs2::ControllerType::UNKNOWN,
  ocs2::ControllerType::FEEDFORWARD,
  ocs2::ControllerType::LINEAR,
  ocs2::ControllerType::PATH_INTEGRAL
}
 
enum  ocs2::IntegratorType {
  ocs2::IntegratorType::EULER,
  ocs2::IntegratorType::MODIFIED_MIDPOINT,
  ocs2::IntegratorType::RK4,
  ocs2::IntegratorType::RK5_VARIABLE,
  ocs2::IntegratorType::ODE45,
  ocs2::IntegratorType::ADAMS_BASHFORTH,
  ocs2::IntegratorType::BULIRSCH_STOER,
  ocs2::IntegratorType::ADAMS_BASHFORTH_MOULTON
}
 The IntegratorType enum Enum used in selecting a specific integrator. More...
 
enum  ocs2::sys_event_id {
  ocs2::killIntegration = -1,
  ocs2::maxCall = -2
}
 
enum  ocs2::LoopshapingType {
  ocs2::LoopshapingType::outputpattern,
  ocs2::LoopshapingType::inputpattern,
  ocs2::LoopshapingType::eliminatepattern
}
 

Functions

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::swap (FeedforwardController< STATE_DIM, INPUT_DIM > &a, FeedforwardController< STATE_DIM, INPUT_DIM > &b)
 
template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::swap (LinearController< STATE_DIM, INPUT_DIM > &a, LinearController< STATE_DIM, INPUT_DIM > &b)
 
template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::swap (PiController< STATE_DIM, INPUT_DIM > &a, PiController< STATE_DIM, INPUT_DIM > &b)
 
void ocs2::padeApproximation (double timeDelay, Eigen::VectorXd &numCoefficients, Eigen::VectorXd &denCoefficients, size_t numZeros, size_t numPoles)
 
Eigen::VectorXd ocs2::multiplyPolynomials (const Eigen::VectorXd &p_lhs, const Eigen::VectorXd &p_rhs)
 
void ocs2::tf2ss (Eigen::VectorXd numCoefficients, Eigen::VectorXd denCoefficients, Eigen::MatrixXd &A, Eigen::MatrixXd &B, Eigen::MatrixXd &C, Eigen::MatrixXd &D, double timeDelay=0.0, bool balance=true)
 
std::string ocs2::toString (IntegratorType integratorType)
 
template<typename scalar_t , typename alloc_t = std::allocator<scalar_t>>
int ocs2::findActiveIntervalIndex (const std::vector< scalar_t, alloc_t > &timeIntervals, const scalar_t &enquiryTime, const int &guessedIndex, scalar_t epsilon=OCS2NumericTraits< scalar_t >::weakEpsilon())
 
template<typename scalar_t , typename alloc_t = std::allocator<scalar_t>>
int ocs2::findActiveIntervalIndex (const std::vector< scalar_t, alloc_t > &timeIntervals, const scalar_t &enquiryTime, scalar_t epsilon=OCS2NumericTraits< scalar_t >::weakEpsilon())
 
template<typename scalar_t >
void ocs2::loadScalar (const std::string &filename, const std::string &scalarName, scalar_t &value)
 
template<typename Derived >
void ocs2::loadEigenMatrix (const std::string &filename, const std::string &matrixName, Eigen::MatrixBase< Derived > &matrix)
 
void ocs2::setThreadPriority (const int priority, std::thread &thread)
 
 ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::CppAdCodeGenInterface (const ad_funtion_t &adFunction, const range_domain_matrix_t &sparsityPattern)
 
 ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::CppAdCodeGenInterface (int domainDim, int rangeDim, int variableDim, const ad_funtion_t &adFunction, const range_domain_matrix_t &sparsityPattern)
 
 ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::CppAdCodeGenInterface (const CppAdCodeGenInterface &rhs)
 
CppAdCodeGenInterfaceocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::clone () const override
 
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::computeForwardModel (bool computeForwardModel) override
 
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::computeJacobianModel (bool computeJacobianModel) override
 
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::computeHessianModel (bool computeHessianModel) override
 
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::createModels (const std::string &modelName, const std::string &libraryFolder="", const bool verbose=true, bool cgJIT=true) override
 
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::createModels (const int &domainDim, const int &rangeDim, const std::string &modelName, const std::string &libraryFolder="", bool verbose=true, bool cgJIT=true) override
 
bool ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::loadModels (const std::string &modelName, const std::string &libraryFolder="", bool verbose=true) override
 
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::getSparsityPattern (range_domain_matrix_t &sparsityPattern) const override
 
bool ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::getFunctionValue (const domain_vector_t &x, range_vector_t &funcValue) override
 
bool ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::getJacobian (const domain_vector_t &x, domain_range_matrix_t &jacobian) override
 
bool ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::getHessian (const domain_vector_t &x, variable_matrix_t &hessian, size_t outputIndex=0) override
 
 ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::ConstraintBaseAD (const bool &dynamicLibraryIsCompiled=false)
 
 ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::ConstraintBaseAD (const ConstraintBaseAD &rhs)
 
virtual BASEocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::clone () const final
 
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::createModels (const std::string &modelName, const std::string &libraryFolder)
 
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::loadModels (const std::string &modelName, const std::string &libraryFolder)
 
const bool & ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::isDynamicLibraryCompiled () const
 
std::string ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::getModelName () const
 
virtual void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::setCurrentStateAndControl (const scalar_t &t, const state_vector_t &x, const input_vector_t &u) final
 
virtual void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::getConstraint1 (constraint1_vector_t &e) final
 
virtual void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::getConstraint2 (constraint2_vector_t &h) final
 
virtual void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::getFinalConstraint2 (constraint2_vector_t &h_f) final
 
virtual void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::getConstraint1DerivativesState (constraint1_state_matrix_t &C) final
 
virtual void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::getConstraint1DerivativesControl (constraint1_input_matrix_t &D) final
 
virtual void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::getConstraint2DerivativesState (constraint2_state_matrix_t &F) final
 
virtual void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::getFinalConstraint2DerivativesState (constraint2_state_matrix_t &F_f) final
 
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::stateInputConstraintAD (const ad_dynamic_vector_t &tapedInput, ad_dynamic_vector_t &g1)
 
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::stateOnlyConstraintAD (const ad_dynamic_vector_t &tapedInput, ad_dynamic_vector_t &g2)
 
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::stateOnlyConstraintFinalAD (const ad_dynamic_vector_t &tapedInput, ad_dynamic_vector_t &g2Final)
 
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::setADInterfaces ()
 
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::createModels (bool verbose)
 
bool ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::loadModels (bool verbose)
 
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCost (const scalar_array_t &h, scalar_t &penalty) const
 
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCostDerivativeState (const scalar_array_t &h, const state_vector_array_t &dhdx, state_vector_t &penaltyDerivativeState) const
 
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCostDerivativeInput (const scalar_array_t &h, const input_vector_array_t &dhdu, input_vector_t &penaltyDerivativeInput) const
 
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCostSecondDerivativeState (const scalar_array_t &h, const state_vector_array_t &dhdx, const state_matrix_array_t &ddhdxdx, state_matrix_t &penaltySecondDerivativeState) const
 
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCostSecondDerivativeInput (const scalar_array_t &h, const input_vector_array_t &dhdu, const input_matrix_array_t &ddhdudu, input_matrix_t &penaltySecondDerivativeInput) const
 
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCostDerivativeInputState (const scalar_array_t &h, const state_vector_array_t &dhdx, const input_vector_array_t &dhdu, const input_state_matrix_array_t &ddhdudx, input_state_matrix_t &penaltyDerivativeInputState) const
 
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getConstraintViolationSquaredNorm (const scalar_array_t &h, scalar_t &squaredViolation) const
 
virtual void ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::setCostDesiredTrajectories (const cost_desired_trajectories_t &costDesiredTrajectories)
 
virtual void ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::getCostDesiredTrajectories (cost_desired_trajectories_t &costDesiredTrajectories) const
 
 ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::CostFunctionBaseAD (const bool &dynamicLibraryIsCompiled=false)
 
 ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::CostFunctionBaseAD (const CostFunctionBaseAD &rhs)
 
virtual BASEocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::clone () const final
 
template<typename SCALAR_T >
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::intermediateCostFunction (const SCALAR_T &time, const Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &state, const Eigen::Matrix< SCALAR_T, INPUT_DIM, 1 > &input, const Eigen::Matrix< SCALAR_T, STATE_DESIRED_DIM, 1 > &stateDesired, const Eigen::Matrix< SCALAR_T, INPUT_DESIRED_DIM, 1 > &inputDesired, const Eigen::Matrix< SCALAR_T, LOGIC_VARIABLE_DIM, 1 > &logicVariable, SCALAR_T &costValue)
 
template<typename SCALAR_T >
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::terminalCostFunction (const SCALAR_T &time, const Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &state, const Eigen::Matrix< SCALAR_T, STATE_DESIRED_DIM, 1 > &stateDesired, const Eigen::Matrix< SCALAR_T, LOGIC_VARIABLE_DIM, 1 > &logicVariable, SCALAR_T &costValue)
 
state_desired_vector_t ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getDesiredState (const scalar_t &t)
 
input_desired_vector_t ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getDesiredInput (const scalar_t &t)
 
logic_variable_t ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getlogicVariables (LogicRulesMachine< LOGIC_RULES_T > &logicRulesMachine, const size_t &partitionIndex, const char *algorithmName=nullptr)
 
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::createModels (const std::string &modelName, const std::string &libraryFolder)
 
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::loadModels (const std::string &modelName, const std::string &libraryFolder)
 
const bool & ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::isDynamicLibraryCompiled () const
 
std::string ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getModelName () const
 
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::setCurrentStateAndControl (const scalar_t &t, const state_vector_t &x, const input_vector_t &u) final
 
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::initializeModel (LogicRulesMachine< LOGIC_RULES_T > &logicRulesMachine, const size_t &partitionIndex, const char *algorithmName=nullptr) final
 
template<typename Derived_Matrix >
Derived_Matrix::Scalar & ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::timeVariable (Eigen::MatrixBase< Derived_Matrix > &tapedInput)
 
template<typename Derived_Matrix >
Eigen::Block< Derived_Matrix, STATE_DIM, 1 > ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::stateVariables (Eigen::MatrixBase< Derived_Matrix > &tapedInput)
 
template<typename Derived_Matrix >
Eigen::Block< Derived_Matrix, INPUT_DIM, 1 > ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::inputVariables (Eigen::MatrixBase< Derived_Matrix > &tapedInput)
 
template<typename Derived_Matrix >
Eigen::Block< Derived_Matrix, STATE_DESIRED_DIM, 1 > ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::desiredStateVariables (Eigen::MatrixBase< Derived_Matrix > &tapedInput)
 
template<typename Derived_Matrix >
Eigen::Block< Derived_Matrix, INPUT_DESIRED_DIM, 1 > ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::desiredInputVariables (Eigen::MatrixBase< Derived_Matrix > &tapedInput)
 
template<typename Derived_Matrix >
Eigen::Block< Derived_Matrix, LOGIC_VARIABLE_DIM, 1 > ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::logicVariables (Eigen::MatrixBase< Derived_Matrix > &tapedInput)
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCost (scalar_t &L) final
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostDerivativeTime (scalar_t &dLdt) final
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostDerivativeState (state_vector_t &dLdx) final
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostSecondDerivativeState (state_matrix_t &dLdxx) final
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostDerivativeInput (input_vector_t &dLdu) final
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostSecondDerivativeInput (input_matrix_t &dLduu) final
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostDerivativeInputState (input_state_matrix_t &dLdux) final
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getTerminalCost (scalar_t &Phi) final
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getTerminalCostDerivativeTime (scalar_t &dPhidt) final
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getTerminalCostDerivativeState (state_vector_t &dPhidx) final
 
virtual void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getTerminalCostSecondDerivativeState (state_matrix_t &dPhidxx) final
 
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::intermediateCostFunctionAD (const ad_dynamic_vector_t &tapedInput, ad_dynamic_vector_t &costValue)
 
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::terminalCostFunctionAD (const ad_dynamic_vector_t &tapedInput, ad_dynamic_vector_t &costValue)
 
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::setADInterfaces ()
 
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::createModels (bool verbose)
 
bool ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::loadModels (bool verbose)
 
 ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::SystemDynamicsBaseAD (const bool &dynamicLibraryIsCompiled=false)
 
 ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::SystemDynamicsBaseAD (const SystemDynamicsBaseAD &rhs)
 
virtual BASEocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::clone () const final
 
template<typename SCALAR_T >
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::systemFlowMap (const SCALAR_T &time, const Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &state, const Eigen::Matrix< SCALAR_T, INPUT_DIM, 1 > &input, Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &stateDerivative)
 
template<typename SCALAR_T >
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::systemJumpMap (const SCALAR_T &time, const Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &state, const Eigen::Matrix< SCALAR_T, INPUT_DIM, 1 > &input, Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &jumpedState)
 
template<typename SCALAR_T >
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::systemGuardSurfaces (const SCALAR_T &time, const Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &state, const Eigen::Matrix< SCALAR_T, INPUT_DIM, 1 > &input, Eigen::Matrix< SCALAR_T, NUM_MODES, 1 > &guardSurfacesValue)
 
size_t ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getNumModes () const
 
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::createModels (const std::string &modelName, const std::string &libraryFolder)
 
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::loadModels (const std::string &modelName, const std::string &libraryFolder)
 
const bool & ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::isDynamicLibraryCompiled () const
 
std::string ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getModelName () const
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::computeFlowMap (const scalar_t &time, const state_vector_t &state, const input_vector_t &input, state_vector_t &stateDerivative) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::computeJumpMap (const scalar_t &time, const state_vector_t &state, state_vector_t &jumpedState) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::computeGuardSurfaces (const scalar_t &time, const state_vector_t &state, dynamic_vector_t &guardSurfacesValue) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::setCurrentStateAndControl (const scalar_t &time, const state_vector_t &state, const input_vector_t &input) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getFlowMapDerivativeTime (state_vector_t &df) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getFlowMapDerivativeState (state_matrix_t &A) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getFlowMapDerivativeInput (state_input_matrix_t &B) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getJumpMapDerivativeTime (state_vector_t &dg) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getJumpMapDerivativeState (state_matrix_t &G) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getJumpMapDerivativeInput (state_input_matrix_t &H) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getGuardSurfacesDerivativeTime (dynamic_vector_t &D_t_gamma) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getGuardSurfacesDerivativeState (dynamic_state_matrix_t &D_x_gamma) final
 
virtual void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::getGuardSurfacesDerivativeInput (dynamic_input_matrix_t &D_u_gamma) final
 
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::systemFlowMapAD (const ad_dynamic_vector_t &tapedInput, ad_dynamic_vector_t &f)
 
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::systemJumpMapAD (const ad_dynamic_vector_t &tapedInput, ad_dynamic_vector_t &g)
 
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::systemGuardSurfacesAD (const ad_dynamic_vector_t &tapedInput, ad_dynamic_vector_t &gamma)
 
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::setADInterfaces ()
 
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::createModels (bool verbose)
 
bool ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >::loadModels (bool verbose)
 
 ocs2::Integrator< STATE_DIM, Stepper >::Integrator (const std::shared_ptr< OdeBase< STATE_DIM > > &systemPtr, const std::shared_ptr< SystemEventHandler< STATE_DIM > > &eventHandlerPtr=nullptr)
 
void ocs2::Integrator< STATE_DIM, Stepper >::integrate (const state_vector_t &initialState, const scalar_t &startTime, const scalar_t &finalTime, scalar_t dt, state_vector_array_t &stateTrajectory, scalar_array_t &timeTrajectory, bool concatOutput=false) final
 
void ocs2::Integrator< STATE_DIM, Stepper >::integrate (const state_vector_t &initialState, const scalar_t &startTime, const scalar_t &finalTime, state_vector_array_t &stateTrajectory, scalar_array_t &timeTrajectory, scalar_t dtInitial=0.01, scalar_t AbsTol=1e-6, scalar_t RelTol=1e-3, int maxNumSteps=std::numeric_limits< int >::max(), bool concatOutput=false) final
 
void ocs2::Integrator< STATE_DIM, Stepper >::integrate (const state_vector_t &initialState, typename scalar_array_t::const_iterator beginTimeItr, typename scalar_array_t::const_iterator endTimeItr, state_vector_array_t &stateTrajectory, scalar_t dtInitial=0.01, scalar_t AbsTol=1e-9, scalar_t RelTol=1e-6, int maxNumSteps=std::numeric_limits< int >::max(), bool concatOutput=false) final
 
void ocs2::Integrator< STATE_DIM, Stepper >::setupSystem ()
 
void ocs2::Integrator< STATE_DIM, Stepper >::initialize (state_vector_t &initialState, scalar_t &t, scalar_t dt)
 
template<typename S >
std::enable_if< std::is_same< S, runge_kutta_dopri5_t< STATE_DIM > >::value, void >::type ocs2::Integrator< STATE_DIM, Stepper >::integrate_adaptive_specialized (state_vector_t &initialState, const scalar_t &startTime, const scalar_t &finalTime, scalar_t dtInitial, scalar_t AbsTol, scalar_t RelTol)
 
template<typename S = Stepper>
std::enable_if< std::is_same< S, runge_kutta_dopri5_t< STATE_DIM > >::value, void >::type ocs2::Integrator< STATE_DIM, Stepper >::integrate_times_specialized (state_vector_t &initialState, typename scalar_array_t::const_iterator beginTimeItr, typename scalar_array_t::const_iterator endTimeItr, scalar_t dtInitial, scalar_t AbsTol, scalar_t RelTol)
 
template<typename S = Stepper>
std::enable_if< std::is_same< S, runge_kutta_dopri5_t< STATE_DIM > >::value, void >::type ocs2::Integrator< STATE_DIM, Stepper >::initializeStepper (state_vector_t &initialState, scalar_t &t, scalar_t dt)
 
void ocs2::HybridLogicRulesMachine< LOGIC_RULES_T >::setupLogicMachine (const scalar_array_t &partitioningTimes, const scalar_t &initTime, const size_t &initActivePartition, const size_t &initSubsystemID)
 
void ocs2::HybridLogicRulesMachine< LOGIC_RULES_T >::initLogicMachine (const size_t &partitionIndex)
 
void ocs2::HybridLogicRulesMachine< LOGIC_RULES_T >::pushBack (const size_t &partitionIndex, const scalar_t &eventTime, const size_t &subsystemID)
 
void ocs2::HybridLogicRulesMachine< LOGIC_RULES_T >::display () const override
 
void ocs2::LogicRulesMachine< LOGIC_RULES_T >::setLogicRules (const LOGIC_RULES_T &logicRules)
 
void ocs2::LogicRulesMachine< LOGIC_RULES_T >::logicRulesUpdated ()
 
LOGIC_RULES_T * ocs2::LogicRulesMachine< LOGIC_RULES_T >::getLogicRulesPtr ()
 
const LOGIC_RULES_T * ocs2::LogicRulesMachine< LOGIC_RULES_T >::getLogicRulesPtr () const
 
const scalar_array_tocs2::LogicRulesMachine< LOGIC_RULES_T >::getEventTimes (size_t partitionIndex) const
 
const size_array_tocs2::LogicRulesMachine< LOGIC_RULES_T >::getEventCounters (size_t partitionIndex) const
 
const scalar_array_tocs2::LogicRulesMachine< LOGIC_RULES_T >::getSwitchingTimes (size_t index) const
 
const scalar_array_tocs2::LogicRulesMachine< LOGIC_RULES_T >::getPartitioningTimes () const
 
std::function< size_t(scalar_t)> ocs2::LogicRulesMachine< LOGIC_RULES_T >::getHandleToFindActiveEventCounter (size_t partitionIndex) const
 
size_t ocs2::LogicRulesMachine< LOGIC_RULES_T >::getNumEventCounters (size_t partitionIndex) const
 
size_t ocs2::LogicRulesMachine< LOGIC_RULES_T >::getNumEvents (size_t partitionIndex) const
 
const size_t & ocs2::LogicRulesMachine< LOGIC_RULES_T >::getNumPartitions () const
 
virtual bool ocs2::LogicRulesMachine< LOGIC_RULES_T >::updateLogicRules (const scalar_array_t &partitioningTimes)
 
void ocs2::LogicRulesMachine< LOGIC_RULES_T >::findEventsDistribution (const scalar_array_t &partitioningTimes, std::vector< scalar_array_t > &eventTimesStock, std::vector< scalar_array_t > &switchingTimesStock, std::vector< size_array_t > &eventCountersStock)
 
virtual void ocs2::LogicRulesMachine< LOGIC_RULES_T >::display () const
 
void ocs2::TrajectorySpreadingController< STATE_DIM, INPUT_DIM >::findsIndicesEventTimes (const scalar_array_t &eventTimes, const controller_array_t &controllersStock, std::vector< index_t > &eventsIndices) const
 
bool ocs2::TrajectorySpreadingController< STATE_DIM, INPUT_DIM >::smallerEqualIndexFunc (const index_t &a, const index_t &b) const
 
void ocs2::TrajectorySpreadingController< STATE_DIM, INPUT_DIM >::adjustController (const scalar_array_t &eventTimes, const scalar_array_t &controllerEventTimes, controller_array_t &controllersStock)
 
void ocs2::TrajectorySpreadingController< STATE_DIM, INPUT_DIM >::spreadController (const scalar_t &eventTime, const index_t &eventTimeIndex, const index_t &controlerEventTimeIndex, controller_array_t &controllersStock) const
 

Variables

static bool ocs2::SystemEventHandler< STATE_DIM >::killIntegration_ = false
 

Typedef Documentation

◆ adams_bashforth_uncontrolled_t

template<int STATE_DIM, size_t STEPS>
using ocs2::adams_bashforth_uncontrolled_t = typedef boost::numeric::odeint::adams_bashforth< STEPS, Eigen::Matrix<double, STATE_DIM, 1>, double, Eigen::Matrix<double, STATE_DIM, 1>, double, boost::numeric::odeint::vector_space_algebra>

Adams_Bashforth stepper

◆ bulirsch_stoer_t

template<int STATE_DIM>
using ocs2::bulirsch_stoer_t = typedef boost::numeric::odeint::bulirsch_stoer < Eigen::Matrix<double, STATE_DIM, 1>, double, Eigen::Matrix<double, STATE_DIM, 1>, double, boost::numeric::odeint::vector_space_algebra>

Bulirsch_Stoer stepper

◆ dense_runge_kutta5_t

template<int STATE_DIM>
using ocs2::dense_runge_kutta5_t = typedef boost::numeric::odeint::dense_output_runge_kutta < boost::numeric::odeint::controlled_runge_kutta <runge_kutta_dopri5_t<STATE_DIM> > >

Dense_output Runge_Kutta stepper

◆ EigenLinearInterpolation

template<typename Data_T >
using ocs2::EigenLinearInterpolation = typedef LinearInterpolation<Data_T, Eigen::aligned_allocator<Data_T> >

◆ euler_t

template<int STATE_DIM>
using ocs2::euler_t = typedef boost::numeric::odeint::euler< Eigen::Matrix<double, STATE_DIM, 1>, double, Eigen::Matrix<double, STATE_DIM, 1>, double, boost::numeric::odeint::vector_space_algebra >

Euler stepper

◆ IntegratorAdamsBashforth

template<int STATE_DIM, size_t STEPS>
using ocs2::IntegratorAdamsBashforth = typedef Integrator < STATE_DIM, adams_bashforth_uncontrolled_t<STATE_DIM, STEPS> >

Adams-Bashforth integrator.

◆ IntegratorBulirschStoer

template<int STATE_DIM>
using ocs2::IntegratorBulirschStoer = typedef Integrator < STATE_DIM, bulirsch_stoer_t<STATE_DIM> >

Bulirsch-Stoer integrator.

◆ IntegratorEuler

template<int STATE_DIM>
using ocs2::IntegratorEuler = typedef Integrator<STATE_DIM, euler_t<STATE_DIM> >

Euler integrator.

◆ IntegratorModifiedMidpoint

template<int STATE_DIM>
using ocs2::IntegratorModifiedMidpoint = typedef Integrator<STATE_DIM, modified_midpoint_t<STATE_DIM> >

Modified midpoint integrator.

◆ IntegratorRK4

template<int STATE_DIM>
using ocs2::IntegratorRK4 = typedef Integrator<STATE_DIM, runge_kutta_4_t<STATE_DIM> >

RK4 integrator.

◆ IntegratorRK5Variable

template<int STATE_DIM>
using ocs2::IntegratorRK5Variable = typedef Integrator<STATE_DIM, dense_runge_kutta5_t<STATE_DIM> >

RK5 variable integrator.

◆ LoopshapingDynamicsEliminatePattern

template<size_t FULL_STATE_DIM, size_t FULL_INPUT_DIM, size_t SYSTEM_STATE_DIM, size_t SYSTEM_INPUT_DIM, size_t FILTER_STATE_DIM, size_t FILTER_INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::LoopshapingDynamicsEliminatePattern = typedef LoopshapingDynamicsInputPattern<FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM, LOGIC_RULES_T>

◆ modified_midpoint_t

template<int STATE_DIM>
using ocs2::modified_midpoint_t = typedef boost::numeric::odeint::modified_midpoint< Eigen::Matrix<double, STATE_DIM, 1>, double, Eigen::Matrix<double, STATE_DIM, 1>, double, boost::numeric::odeint::vector_space_algebra >

Modified_Midpoint stepper

◆ ODE45

template<int STATE_DIM>
using ocs2::ODE45 = typedef Integrator<STATE_DIM, runge_kutta_dopri5_t<STATE_DIM> >

ode45 integrator.

◆ runge_kutta_4_t

template<int STATE_DIM>
using ocs2::runge_kutta_4_t = typedef boost::numeric::odeint::runge_kutta4< Eigen::Matrix<double, STATE_DIM, 1>, double, Eigen::Matrix<double, STATE_DIM, 1>, double, boost::numeric::odeint::vector_space_algebra >

4th order Runge_Kutta stepper

◆ runge_kutta_dopri5_t

template<int STATE_DIM>
using ocs2::runge_kutta_dopri5_t = typedef boost::numeric::odeint::runge_kutta_dopri5 < Eigen::Matrix<double, STATE_DIM, 1>, double, Eigen::Matrix<double, STATE_DIM, 1>, double, boost::numeric::odeint::vector_space_algebra>

5th order Runge_Kutta_Dopri stepper

Enumeration Type Documentation

◆ ControllerType

enum ocs2::ControllerType
strong

Enum class for specifying controller type

Enumerator
UNKNOWN 
FEEDFORWARD 
LINEAR 
PATH_INTEGRAL 

◆ IntegratorType

enum ocs2::IntegratorType
strong

The IntegratorType enum Enum used in selecting a specific integrator.

Enumerator
EULER 
MODIFIED_MIDPOINT 
RK4 
RK5_VARIABLE 
ODE45 
ADAMS_BASHFORTH 
BULIRSCH_STOER 
ADAMS_BASHFORTH_MOULTON 

◆ LoopshapingType

enum ocs2::LoopshapingType
strong
Enumerator
outputpattern 
inputpattern 
eliminatepattern 

◆ sys_event_id

System event ID. all values are negative.

Enumerator
killIntegration 

killIntegration: kill integration due to an external signal.

maxCall 

maximum number of function calls.

Function Documentation

◆ adjustController()

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::TrajectorySpreadingController< STATE_DIM, INPUT_DIM >::adjustController ( const scalar_array_t eventTimes,
const scalar_array_t controllerEventTimes,
controller_array_t controllersStock 
)

Adjust the controller based on the last changes in the logic rules.

Parameters
[in]eventTimesThe new event times.
[in]controllerEventTimesThe control policy stock's event times.
controllerStockThe controller stock which will be modified.

◆ clone() [1/4]

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM > * ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::clone ( ) const
overridevirtual

◆ clone() [2/4]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::BASE * ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::clone ( ) const
finalvirtual

Returns pointer to the base class.

Returns
A raw pointer to the class.

Reimplemented from ocs2::ConstraintBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ clone() [3/4]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::BASE * ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::clone ( ) const
finalvirtual

Returns pointer to the base class.

Returns
A raw pointer to the class.

Implements ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ clone() [4/4]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::BASE * ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::clone ( ) const
finalvirtual

Returns pointer to the base class.

Returns
A raw pointer to the class.

Implements ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ computeFlowMap()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::computeFlowMap ( const scalar_t time,
const state_vector_t state,
const input_vector_t input,
state_vector_t stateDerivative 
)
finalvirtual

Interface method to the state flow map of the hybrid system.

Parameters
[in]timetime.
[in]statestate vector.
[in]inputinput vector
[out]stateDerivativestate vector time derivative.

Implements ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ computeForwardModel()

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::computeForwardModel ( bool  computeForwardModel)
overridevirtual

◆ computeGuardSurfaces()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::computeGuardSurfaces ( const scalar_t time,
const state_vector_t state,
dynamic_vector_t guardSurfacesValue 
)
finalvirtual

Interface method to the guard surfaces.

Parameters
[in]timetransition time
[in]statetransition state
[out]guardSurfacesValueA vector of guard surfaces values

Reimplemented from ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ computeHessianModel()

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::computeHessianModel ( bool  computeHessianModel)
overridevirtual

◆ computeJacobianModel()

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::computeJacobianModel ( bool  computeJacobianModel)
overridevirtual

◆ computeJumpMap()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::computeJumpMap ( const scalar_t time,
const state_vector_t state,
state_vector_t jumpedState 
)
finalvirtual

Interface method to the state jump map of the hybrid system.

Parameters
[in]timetime.
[in]statestate vector.
[out]jumpedStatejumped state.

Reimplemented from ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ ConstraintBaseAD() [1/2]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::ConstraintBaseAD ( const bool &  dynamicLibraryIsCompiled = false)
explicit

Default constructor.

Parameters
[in]dynamicLibraryIsCompiledWhether a library is already complied.

◆ ConstraintBaseAD() [2/2]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::ConstraintBaseAD ( const ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T > &  rhs)

Copy constructor

◆ CostFunctionBaseAD() [1/2]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::CostFunctionBaseAD ( const bool &  dynamicLibraryIsCompiled = false)
explicit

Default constructor

Parameters
[in]dynamicLibraryIsCompiledWhether a library is already complied.

◆ CostFunctionBaseAD() [2/2]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::CostFunctionBaseAD ( const CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM > &  rhs)

Copy constructor

◆ CppAdCodeGenInterface() [1/3]

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::CppAdCodeGenInterface ( const ad_funtion_t adFunction,
const range_domain_matrix_t sparsityPattern 
)

◆ CppAdCodeGenInterface() [2/3]

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::CppAdCodeGenInterface ( int  domainDim,
int  rangeDim,
int  variableDim,
const ad_funtion_t adFunction,
const range_domain_matrix_t sparsityPattern 
)

◆ CppAdCodeGenInterface() [3/3]

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::CppAdCodeGenInterface ( const CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM > &  rhs)

◆ createModels() [1/8]

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::createModels ( const std::string &  modelName,
const std::string &  libraryFolder = "",
const bool  verbose = true,
bool  cgJIT = true 
)
overridevirtual

◆ createModels() [2/8]

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::createModels ( const int &  domainDim,
const int &  rangeDim,
const std::string &  modelName,
const std::string &  libraryFolder = "",
bool  verbose = true,
bool  cgJIT = true 
)
overridevirtual

◆ createModels() [3/8]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::createModels ( const std::string &  modelName,
const std::string &  libraryFolder 
)

creates the forward model, the Jacobian model, and the Hessian model.

Parameters
modelName
libraryFolder
verbose

◆ createModels() [4/8]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::createModels ( const std::string &  modelName,
const std::string &  libraryFolder 
)

creates the forward model, the Jacobian model, and the Hessian model.

Parameters
modelName
libraryFolder
verbose

◆ createModels() [5/8]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::createModels ( const std::string &  modelName,
const std::string &  libraryFolder 
)

creates the forward model, the Jacobian model, and the Hessian model.

Parameters
modelName
libraryFolder
verbose

◆ createModels() [6/8]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::createModels ( bool  verbose)
protected

Create the forward model, the Jacobian model, and the Hessian model.

Parameters
[in]verbosedisplay information.

◆ createModels() [7/8]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::createModels ( bool  verbose)
protected

Create the forward model, the Jacobian model, and the Hessian model.

Parameters
[in]verbosedisplay information.

◆ createModels() [8/8]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::createModels ( bool  verbose)
protected

Create the forward model, the Jacobian model, and the Hessian model.

Parameters
[in]verbosedisplay information.

◆ desiredInputVariables()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
template<typename Derived_Matrix >
Eigen::Block< Derived_Matrix, INPUT_DESIRED_DIM, 1 > ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::desiredInputVariables ( Eigen::MatrixBase< Derived_Matrix > &  tapedInput)
protected

Returns a pointer to desired input variables.

Parameters
[in]tapedInputThe concatenated input of the variables.
Returns
A pointer to the desired input variables.

◆ desiredStateVariables()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
template<typename Derived_Matrix >
Eigen::Block< Derived_Matrix, STATE_DESIRED_DIM, 1 > ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::desiredStateVariables ( Eigen::MatrixBase< Derived_Matrix > &  tapedInput)
protected

Returns a pointer to desired state variables.

Parameters
[in]tapedInputThe concatenated input of the variables.
Returns
A pointer to the desired state variables.

◆ display() [1/2]

template<class logic_rules_template_t >
void ocs2::HybridLogicRulesMachine< logic_rules_template_t >::display ( ) const
overridevirtual

Displays switched systems distribution over the time partitions.

Reimplemented from ocs2::LogicRulesMachine< LOGIC_RULES_T >.

◆ display() [2/2]

template<class LOGIC_RULES_T >
void ocs2::LogicRulesMachine< LOGIC_RULES_T >::display ( ) const
virtual

Displays switched systems distribution over the time partitions.

Reimplemented in ocs2::HybridLogicRulesMachine< LOGIC_RULES_T >.

◆ findActiveIntervalIndex() [1/2]

template<typename scalar_t , typename alloc_t = std::allocator<scalar_t>>
int ocs2::findActiveIntervalIndex ( const std::vector< scalar_t, alloc_t > &  timeIntervals,
const scalar_t &  enquiryTime,
const int &  guessedIndex,
scalar_t  epsilon = OCS2NumericTraits<scalar_t>::weakEpsilon() 
)

This function finds the interval in the input timeIntervals vector to which the input time belongs to it. For an input timeIntervals vector of size n, we have n-1 intervals indexed from 0 to n-2. If enquiryTime is smaller than timeIntervals.front(), the function returns -1. If enquiryTime is greater than timeIntervals.back() it returns n-1 which is a non-existing interval index. Otherwise enquiryTime is in interval i if: timeIntervals[i] < t <= timeIntervals[i+1]. The equality is in the sense that two values are in the epsilon vicinity. Moreover as an exceptional case, if the time is equal to timeIntervals.begin(), the function returns index 0.

User can utilize the third input argument to incorporate his/her guessed output. The function then uses this guessed index to start searching from. This can potentially increase the speed of the function if the guess is reasonable. Notice that the overloaded function with two input arguments implements such a heuristic for the case that the function is called for an increasing or a decreasing sequence of enquires. However, unlike this function, the overloaded function is not atomic which is potentially problematic in multi-thread settings.

Parameters
[in]timeIntervalsa non-decreasing time sequence representing the time intervals segmentation points.
[in]enquiryTimeEnquiry time.
[in]guessedIndexUser guessed index for increasing efficiency.
[in]epsilonDefines epsilon-vicinity equality.
Returns
: The active interval index. The output is an integer from -1 to n-1 where n is the size of the timeIntervals vector.

◆ findActiveIntervalIndex() [2/2]

template<typename scalar_t , typename alloc_t = std::allocator<scalar_t>>
int ocs2::findActiveIntervalIndex ( const std::vector< scalar_t, alloc_t > &  timeIntervals,
const scalar_t &  enquiryTime,
scalar_t  epsilon = OCS2NumericTraits<scalar_t>::weakEpsilon() 
)

This function finds the interval in the input timeIntervals vector to which the input time belongs to it. For an input timeIntervals vector of size n, we have n-1 intervals indexed from 0 to n-2. If enquiryTime is smaller than timeIntervals.front(), the function returns -1. If enquiryTime is greater than timeIntervals.back() it returns n-1 which is a non-existing interval index. Otherwise enquiryTime is in interval i if: timeIntervals[i] < t <= timeIntervals[i+1]. The equality is in the sense that two values are in the epsilon vicinity. Moreover as an exceptional case, if the time is equal to timeIntervals.begin(), the function returns index 0.

Note: do not assign this call output directly to unsigned integer, since the function may also return -1.

This method also has an internal memory which remembers the output from the last call. Thus, if the enquires have an increasing or a decreasing trend it finds the solution faster. If you wish to disable this feature, use the overloaded function with three inputs and set the last argument to zero. Moreover, due to this internal memory this function call is not an atomic operation. In this case, it is advised to use the overloaded function.

Parameters
[in]timeIntervalsa non-decreasing time sequence representing the time intervals segmentation points.
[in]enquiryTimeEnquiry time.
[in]epsilonDefines epsilon-vicinity equality.
Returns
: The active interval index. The output is an integer from -1 to n-1 where n is the size of the timeIntervals vector.

◆ findEventsDistribution()

template<class LOGIC_RULES_T >
void ocs2::LogicRulesMachine< LOGIC_RULES_T >::findEventsDistribution ( const scalar_array_t partitioningTimes,
std::vector< scalar_array_t > &  eventTimesStock,
std::vector< scalar_array_t > &  switchingTimesStock,
std::vector< size_array_t > &  eventCountersStock 
)

Find distribution of the events over the time partitions.

Parameters
[in]partitioningTimesVector of time partitions.
[out]eventTimesStockDistribution of the event times over partitions.
[out]switchingTimesStockDistribution of the switching times over partitions.
[out]eventCountersStockDistribution of the event counter over partitions.

◆ findsIndicesEventTimes()

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::TrajectorySpreadingController< STATE_DIM, INPUT_DIM >::findsIndicesEventTimes ( const scalar_array_t eventTimes,
const controller_array_t controllersStock,
std::vector< index_t > &  eventsIndices 
) const
protected

Finds the indices of a event times vector.

Parameters
eventTimesEvent time vector.
controllersStockControl policy.
eventsIndicesevent time indices over the control policy time stamp.

◆ getConstraint1()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::getConstraint1 ( constraint1_vector_t e)
finalvirtual

Computes the state-input equality constraints.

Parameters
[out]eThe state-input equality constraints value.

Reimplemented from ocs2::ConstraintBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getConstraint1DerivativesControl()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::getConstraint1DerivativesControl ( constraint1_input_matrix_t D)
finalvirtual

The D matrix at a given operating point for the linearized state-input constraints, $ C(t) \delta x + D(t) \delta u + e(t) = 0 $.

Parameters
[out]D$ D(t) $ matrix.

Reimplemented from ocs2::ConstraintBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getConstraint1DerivativesState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::getConstraint1DerivativesState ( constraint1_state_matrix_t C)
finalvirtual

The C matrix at a given operating point for the linearized state-input constraints, $ C(t) \delta x + D(t) \delta u + e(t) = 0 $.

Parameters
[out]C$ C(t) $ matrix.

Reimplemented from ocs2::ConstraintBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getConstraint2()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::getConstraint2 ( constraint2_vector_t h)
finalvirtual

Compute the state-only equality constraints.

Parameters
[out]hThe state-only equality constraints value.

Reimplemented from ocs2::ConstraintBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getConstraint2DerivativesState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::getConstraint2DerivativesState ( constraint2_state_matrix_t F)
finalvirtual

The F matrix at a given operating point for the linearized state-only constraints, $ F(t) \delta x + h(t) = 0 $.

Parameters
[out]F$ F(t) $ matrix.

Reimplemented from ocs2::ConstraintBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getConstraintViolationSquaredNorm()

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getConstraintViolationSquaredNorm ( const scalar_array_t h,
scalar_t squaredViolation 
) const

Computes the sum of squared constraint violation.

Parameters
[in]hVector of inequality constraint values.
[out]squaredViolationsum of squared constraint violation.

◆ getCostDesiredTrajectories()

template<size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, logic_rules_template_t >::getCostDesiredTrajectories ( cost_desired_trajectories_t costDesiredTrajectories) const
virtual

Gets the desired state and input trajectories used in the cost function.

Parameters
[in]CostDesiredTrajectoriescost desired trajectories interface class.

◆ getDesiredInput()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::input_desired_vector_t ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getDesiredInput ( const scalar_t t)

Gets a user-defined desired input at the give time.

Parameters
[in]tCurrent time.
Returns
The desired input at the give time.

◆ getDesiredState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::state_desired_vector_t ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getDesiredState ( const scalar_t t)

Gets a user-defined desired state at the give time.

Parameters
[in]tCurrent time.
Returns
The desired state at the give time.

◆ getEventCounters()

template<class LOGIC_RULES_T >
const LogicRulesMachine< LOGIC_RULES_T >::size_array_t & ocs2::LogicRulesMachine< LOGIC_RULES_T >::getEventCounters ( size_t  partitionIndex) const

Gets the event counters associated to the partition number index.

Parameters
[in]partitionIndexindex of the time partition
Returns

◆ getEventTimes()

template<class LOGIC_RULES_T >
const LogicRulesMachine< LOGIC_RULES_T >::scalar_array_t & ocs2::LogicRulesMachine< LOGIC_RULES_T >::getEventTimes ( size_t  partitionIndex) const

Gets the event times associated to the partition number index.

Parameters
[in]partitionIndexindex of the time partition.
Returns

◆ getFinalConstraint2()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::getFinalConstraint2 ( constraint2_vector_t h_f)
finalvirtual

Compute the final state-only equality constraints.

Parameters
[out]h_fThe final state-only equality constraints value.

Reimplemented from ocs2::ConstraintBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getFinalConstraint2DerivativesState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::getFinalConstraint2DerivativesState ( constraint2_state_matrix_t F_f)
finalvirtual

The F matrix at a given operating point for the linearized terminal state-only constraints, $ F_f(t) \delta x + h_f(t) = 0 $.

Parameters
[out]F_f$ F_f(t) $ matrix.

Reimplemented from ocs2::ConstraintBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getFlowMapDerivativeInput()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getFlowMapDerivativeInput ( state_input_matrix_t B)
finalvirtual

The B matrix at a given operating point for the linearized system flow map. $ dx/dt = A(t) \delta x + B(t) \delta u $.

Parameters
[out]B$ B(t) $ matrix.

Implements ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ getFlowMapDerivativeState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getFlowMapDerivativeState ( state_matrix_t A)
finalvirtual

The A matrix at a given operating point for the linearized system flow map. $ dx/dt = A(t) \delta x + B(t) \delta u $.

Parameters
[out]A$ A(t) $ matrix.

Implements ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ getFlowMapDerivativeTime()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getFlowMapDerivativeTime ( state_vector_t df)
finalvirtual

Partial time derivative of the system flow map. $ \frac{\partial f}{\partial t} $.

Parameters
[out]df$ \frac{\partial f}{\partial t} $ matrix.

Reimplemented from ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ getFunctionValue()

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
bool ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::getFunctionValue ( const domain_vector_t x,
range_vector_t funcValue 
)
overridevirtual

◆ getGuardSurfacesDerivativeInput()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getGuardSurfacesDerivativeInput ( dynamic_input_matrix_t D_u_gamma)
finalvirtual

Get at a given operating point the derivative of the guard surfaces w.r.t. input vector.

Parameters
[out]D_u_gammaDerivative of the guard surfaces w.r.t. input vector.

Reimplemented from ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ getGuardSurfacesDerivativeState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getGuardSurfacesDerivativeState ( dynamic_state_matrix_t D_x_gamma)
finalvirtual

Get at a given operating point the derivative of the guard surfaces w.r.t. input vector.

Parameters
[out]D_x_gammaDerivative of the guard surfaces w.r.t. state vector.

Reimplemented from ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ getGuardSurfacesDerivativeTime()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getGuardSurfacesDerivativeTime ( dynamic_vector_t D_t_gamma)
finalvirtual

Get at a given operating point the derivative of the guard surfaces w.r.t. input vector.

Parameters
[out]D_t_gammaDerivative of the guard surfaces w.r.t. time.

Reimplemented from ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ getHandleToFindActiveEventCounter()

template<class LOGIC_RULES_T >
std::function< size_t(typename LogicRulesMachine< LOGIC_RULES_T >::scalar_t)> ocs2::LogicRulesMachine< LOGIC_RULES_T >::getHandleToFindActiveEventCounter ( size_t  partitionIndex) const

Returns a Lambda expression which can be used to find the current active event counter.

Parameters
partitionIndexindex of the time partition
Returns
Lambda expression

◆ getHessian()

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
bool ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::getHessian ( const domain_vector_t x,
variable_matrix_t hessian,
size_t  outputIndex = 0 
)
overridevirtual

◆ getIntermediateCost()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCost ( scalar_t L)
finalvirtual

Get the intermediate cost.

Parameters
[out]LThe intermediate cost value.

Implements ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getIntermediateCostDerivativeInput()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostDerivativeInput ( input_vector_t dLdu)
finalvirtual

Get control input derivative of the intermediate cost.

Parameters
[out]dLduFirst order derivative of the intermediate cost with respect to input vector.

Implements ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getIntermediateCostDerivativeInputState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostDerivativeInputState ( input_state_matrix_t dLdux)
finalvirtual

Get the input-state derivative of the intermediate cost.

Parameters
[out]dLduxSecond order derivative of the intermediate cost with respect to input vector and state.

Implements ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getIntermediateCostDerivativeState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostDerivativeState ( state_vector_t dLdx)
finalvirtual

Get the state derivative of the intermediate cost.

Parameters
[out]dLdxFirst order derivative of the intermediate cost with respect to state vector.

Implements ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getIntermediateCostDerivativeTime()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostDerivativeTime ( scalar_t dLdt)
finalvirtual

Get the time derivative of the intermediate cost.

Parameters
[out]dLdtThe time derivative of intermediate cost.

Reimplemented from ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getIntermediateCostSecondDerivativeInput()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostSecondDerivativeInput ( input_matrix_t dLduu)
finalvirtual

Get control input second derivative of the intermediate cost.

Parameters
[out]dLduuSecond order derivative of the intermediate cost with respect to input vector.

Implements ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getIntermediateCostSecondDerivativeState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getIntermediateCostSecondDerivativeState ( state_matrix_t dLdxx)
finalvirtual

Get state second order derivative of the intermediate cost.

Parameters
[out]dLdxxSecond order derivative of the intermediate cost with respect to state vector.

Implements ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getJacobian()

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
bool ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::getJacobian ( const domain_vector_t x,
domain_range_matrix_t jacobian 
)
overridevirtual

◆ getJumpMapDerivativeInput()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getJumpMapDerivativeInput ( state_input_matrix_t H)
finalvirtual

The H matrix at a given operating point for the linearized system jump map. $ x^+ = G \delta x + H \delta u $.

Parameters
[out]H$ H $ matrix.

Reimplemented from ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ getJumpMapDerivativeState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getJumpMapDerivativeState ( state_matrix_t G)
finalvirtual

The G matrix at a given operating point for the linearized system jump map. $ x^+ = G \delta x + H \delta u $.

Parameters
[out]G$ G $ matrix.

Reimplemented from ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ getJumpMapDerivativeTime()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getJumpMapDerivativeTime ( state_vector_t dg)
finalvirtual

Partial time derivative of the system jump map. $ \frac{\partial g}{\partial t} $.

Parameters
[out]dg$ \frac{\partial g}{\partial t} $ matrix.

Reimplemented from ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ getLogicRulesPtr() [1/2]

template<class LOGIC_RULES_T >
LOGIC_RULES_T * ocs2::LogicRulesMachine< LOGIC_RULES_T >::getLogicRulesPtr ( )

Get the pointer to the active logic rules class

Returns
pointer to active logic rules class

◆ getLogicRulesPtr() [2/2]

template<class LOGIC_RULES_T >
const LOGIC_RULES_T * ocs2::LogicRulesMachine< LOGIC_RULES_T >::getLogicRulesPtr ( ) const

Get the pointer to the active logic rules class

Returns
pointer to active logic rules class

◆ getlogicVariables()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::logic_variable_t ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getlogicVariables ( LogicRulesMachine< LOGIC_RULES_T > &  logicRulesMachine,
const size_t &  partitionIndex,
const char *  algorithmName = nullptr 
)

Gets a user-defined logic variable based on the given logic rules.

Parameters
[in]logicRulesMachineA class which contains and parse the logic rules e.g method findActiveSubsystemHandle returns a Lambda expression which can be used to find the ID of the current active subsystem.
[in]partitionIndexindex of the time partition.
[in]algorithmNameThe algorithm that class this class (default not defined).
Returns
The the logic variables.

◆ getModelName() [1/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
std::string ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getModelName ( ) const

Gets model name.

Returns
model name

◆ getModelName() [2/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
std::string ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::getModelName ( ) const

Gets model name.

Returns
model name

◆ getModelName() [3/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
std::string ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getModelName ( ) const

Gets model name.

Returns
model name

◆ getNumEventCounters()

template<class LOGIC_RULES_T >
size_t ocs2::LogicRulesMachine< LOGIC_RULES_T >::getNumEventCounters ( size_t  partitionIndex) const

Returns the number of event counters in the partition.

Parameters
partitionIndexindex of the time partition
Returns
Number of event counters.

◆ getNumEvents()

template<class LOGIC_RULES_T >
size_t ocs2::LogicRulesMachine< LOGIC_RULES_T >::getNumEvents ( size_t  partitionIndex) const

Returns the number of event in the partition.

Parameters
partitionIndexindex of the time partition
Returns
Number of events

◆ getNumModes()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
size_t ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::getNumModes ( ) const

Gets the number of the modes in the hybrid system. The minimum is one.

Returns
Number of the modes in the hybrid system.

◆ getNumPartitions()

template<class LOGIC_RULES_T >
const size_t & ocs2::LogicRulesMachine< LOGIC_RULES_T >::getNumPartitions ( ) const

Returns the number of the partitions.

Returns
Number of the partitions.

◆ getPartitioningTimes()

template<class LOGIC_RULES_T >
const LogicRulesMachine< LOGIC_RULES_T >::scalar_array_t & ocs2::LogicRulesMachine< LOGIC_RULES_T >::getPartitioningTimes ( ) const

Gets the partitioning times.

Returns
constant reference to partitioning times.

◆ getPenaltyCost()

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCost ( const scalar_array_t h,
scalar_t penalty 
) const

Get the penalty cost.

Parameters
[in]hVector of inequality constraint values
[out]penaltyThe penalty cost.

◆ getPenaltyCostDerivativeInput()

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCostDerivativeInput ( const scalar_array_t h,
const input_vector_array_t dhdu,
input_vector_t penaltyDerivativeInput 
) const

Get the derivative of the penalty cost. Implements the chain rule between the inequality constraint and penalty function.

Parameters
[in]hVector of inequality constraint values.
[in]dhduVector of inequality constraint derivatives with respect to input vector.
[out]penaltyDerivativeInputDerivative of the penalty cost with respect to input vector.

◆ getPenaltyCostDerivativeInputState()

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCostDerivativeInputState ( const scalar_array_t h,
const state_vector_array_t dhdx,
const input_vector_array_t dhdu,
const input_state_matrix_array_t ddhdudx,
input_state_matrix_t penaltyDerivativeInputState 
) const

Second derivative of penalty cost.

Parameters
[in]hVector of inequality constraint values.
[in]dhdxVector of inequality constraint derivatives with respect to state.
[in]dhduVector of inequality constraint derivatives with respect to input.
[in]ddhdudxVector of inequality constraint derivatives with respect to input and state.
[out]penaltyDerivativeInputStateDerivative of the penalty cost with respect to input and state.

◆ getPenaltyCostDerivativeState()

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCostDerivativeState ( const scalar_array_t h,
const state_vector_array_t dhdx,
state_vector_t penaltyDerivativeState 
) const

Get the derivative of the penalty cost. Implements the chain rule between the inequality constraint and penalty function.

Parameters
[in]hVector of inequality constraint values.
[in]dhdxVector of inequality constraint derivatives with respect to state.
[out]penaltyDerivativeStateDerivative of the penalty cost with respect to state.

◆ getPenaltyCostSecondDerivativeInput()

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCostSecondDerivativeInput ( const scalar_array_t h,
const input_vector_array_t dhdu,
const input_matrix_array_t ddhdudu,
input_matrix_t penaltySecondDerivativeInput 
) const

Second derivative of penalty cost.

Parameters
[in]hVector of inequality constraint values.
[in]dhduVector of inequality constraint derivatives with respect to input.
[in]ddhduduVector of inequality constraint second derivatives with respect to input.
[out]penaltySecondDerivativeInputSecond derivative of the penalty cost with respect to input.

◆ getPenaltyCostSecondDerivativeState()

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::PenaltyBase< STATE_DIM, INPUT_DIM >::getPenaltyCostSecondDerivativeState ( const scalar_array_t h,
const state_vector_array_t dhdx,
const state_matrix_array_t ddhdxdx,
state_matrix_t penaltySecondDerivativeState 
) const

Second derivative of penalty cost.

Parameters
[in]hVector of inequality constraint values.
[in]dhdxVector of inequality constraint derivatives with respect to state.
[in]ddhdxdxVector of inequality constraint second derivatives with respect to state.
[out]penaltySecondDerivativeStateSecond derivative of the penalty cost with respect to state.

◆ getSparsityPattern()

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
void ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::getSparsityPattern ( range_domain_matrix_t sparsityPattern) const
overridevirtual

◆ getSwitchingTimes()

template<class LOGIC_RULES_T >
const LogicRulesMachine< LOGIC_RULES_T >::scalar_array_t & ocs2::LogicRulesMachine< LOGIC_RULES_T >::getSwitchingTimes ( size_t  index) const

Gets the switching times associated to the partition number index.

Parameters
[in]indexindex of the time partition
Returns

◆ getTerminalCost()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getTerminalCost ( scalar_t Phi)
finalvirtual

Get the terminal cost.

Parameters
[out]PhiThe final cost value.

Implements ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getTerminalCostDerivativeState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getTerminalCostDerivativeState ( state_vector_t dPhidx)
finalvirtual

Get the terminal cost state derivative.

Parameters
[out]dPhidxFirst order final cost derivative with respect to state vector.

Implements ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getTerminalCostDerivativeTime()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getTerminalCostDerivativeTime ( scalar_t dPhidt)
finalvirtual

Get the time derivative of terminal cost.

Parameters
[out]dPhidtThe time derivative of terminal cost.

Reimplemented from ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ getTerminalCostSecondDerivativeState()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::getTerminalCostSecondDerivativeState ( state_matrix_t dPhidxx)
finalvirtual

Get the terminal cost state second derivative

Parameters
[out]dPhidxxSecond order final cost derivative with respect to state vector.

Implements ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ initialize()

template<int STATE_DIM, class Stepper >
void ocs2::Integrator< STATE_DIM, Stepper >::initialize ( state_vector_t initialState,
scalar_t t,
scalar_t  dt 
)
private

Initializes the integrator.

Parameters
[in]initialState
[in]t
[in]dt

◆ initializeModel()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::initializeModel ( LogicRulesMachine< LOGIC_RULES_T > &  logicRulesMachine,
const size_t &  partitionIndex,
const char *  algorithmName = nullptr 
)
finalvirtual

Initializes the cost function. If LOGIC_RULES_T is not of type NullLogicRules, this method will call user-defined getlogicVariables().

Parameters
[in]logicRulesMachineA class which contains and parse the logic rules.
[in]partitionIndexindex of the time partition.
[in]algorithmNameThe algorithm that class this class (default not defined).

Reimplemented from ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ initializeStepper()

template<int STATE_DIM, class Stepper >
template<typename S >
std::enable_if< std::is_same< S, runge_kutta_dopri5_t< STATE_DIM > >::value, void >::type ocs2::Integrator< STATE_DIM, Stepper >::initializeStepper ( state_vector_t initialState,
scalar_t t,
scalar_t  dt 
)
private

Functionality to reset stepper. If we integrate with ODE45, we don't need to reset the stepper, hence specialize empty function

Template Parameters
Sstepper type.
Parameters
[in]initialStateInitial state.
[in]tTime.
[in]dtTime step.
Returns

do nothing, runge_kutta_5_t does not have a init method

◆ initLogicMachine()

template<class logic_rules_template_t >
void ocs2::HybridLogicRulesMachine< logic_rules_template_t >::initLogicMachine ( const size_t &  partitionIndex)

This method should be called for each partition once, before calling push_back method

Parameters
[in]partitionIndexThe current active time partition.

◆ inputVariables()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
template<typename Derived_Matrix >
Eigen::Block< Derived_Matrix, INPUT_DIM, 1 > ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::inputVariables ( Eigen::MatrixBase< Derived_Matrix > &  tapedInput)
protected

Returns a pointer to the input variables.

Parameters
[in]tapedInputThe concatenated input of the variables.
Returns
A pointer to the input variables.

◆ integrate() [1/3]

template<int STATE_DIM, class Stepper >
void ocs2::Integrator< STATE_DIM, Stepper >::integrate ( const state_vector_t initialState,
const scalar_t startTime,
const scalar_t finalTime,
scalar_t  dt,
state_vector_array_t stateTrajectory,
scalar_array_t timeTrajectory,
bool  concatOutput = false 
)
final

Equidistant integration based on initial and final time as well as step length.

Parameters
[in]initialStateInitial state.
[in]startTimeInitial time.
[in]finalTimeFinal time.
[in]dtTime step.
[out]stateTrajectoryOutput state trajectory.
[out]timeTrajectoryOutput time stamp trajectory.
[in]concatOutputWhether to concatenate the output to the input trajectories or override (default).

◆ integrate() [2/3]

template<int STATE_DIM, class Stepper >
void ocs2::Integrator< STATE_DIM, Stepper >::integrate ( const state_vector_t initialState,
const scalar_t startTime,
const scalar_t finalTime,
state_vector_array_t stateTrajectory,
scalar_array_t timeTrajectory,
scalar_t  dtInitial = 0.01,
scalar_t  AbsTol = 1e-6,
scalar_t  RelTol = 1e-3,
int  maxNumSteps = std::numeric_limits<int>::max(),
bool  concatOutput = false 
)
final

Adaptive time integration based on start time and final time. This method can solve ODEs with time-dependent events, if eventsTime is not empty. In this case the output time-trajectory contains two identical values at the moments of event triggers. This method uses OdeBase::computeJumpMap() method for state transition at events.

Parameters
[in]initialStateInitial state.
[in]startTimeInitial time.
[in]finalTimeFinal time.
[out]stateTrajectoryOutput state trajectory.
[out]timeTrajectoryOutput time stamp trajectory.
[in]dtInitialInitial time step.
[in]AbsTolThe absolute tolerance error for ode solver.
[in]RelTolThe relative tolerance error for ode solver.
[in]maxNumStepsThe maximum number of integration points per a second for ode solver.
[in]concatOutputWhether to concatenate the output to the input trajectories or override (default).

◆ integrate() [3/3]

template<int STATE_DIM, class Stepper >
void ocs2::Integrator< STATE_DIM, Stepper >::integrate ( const state_vector_t initialState,
typename scalar_array_t::const_iterator  beginTimeItr,
typename scalar_array_t::const_iterator  endTimeItr,
state_vector_array_t stateTrajectory,
scalar_t  dtInitial = 0.01,
scalar_t  AbsTol = 1e-9,
scalar_t  RelTol = 1e-6,
int  maxNumSteps = std::numeric_limits<int>::max(),
bool  concatOutput = false 
)
final

Output integration based on a given time trajectory. This method can solve ODEs with time-dependent events. In this case, user should pass past-the-end indices of events on the input time trajectory. Moreover, this method assumes that there are two identical time values in the input time-trajectory at the moments of event triggers. This method uses OdeBase::computeJumpMap() method for state transition at events.

Parameters
[in]initialStateInitial state.
[in]beginTimeItrThe iterator to the beginning of the time stamp trajectory.
[in]endTimeItrThe iterator to the end of the time stamp trajectory.
[out]stateTrajectoryOutput state trajectory.
[in]dtInitialInitial time step.
[in]AbsTolThe absolute tolerance error for ode solver.
[in]RelTolThe relative tolerance error for ode solver.
[in]maxNumStepsThe maximum number of integration points per a second for ode solver.
[in]concatOutputWhether to concatenate the output to the input trajectories or override (default).

◆ integrate_adaptive_specialized()

template<int STATE_DIM, class Stepper >
template<typename S >
std::enable_if<!std::is_same< S, runge_kutta_dopri5_t< STATE_DIM > >::value, void >::type ocs2::Integrator< STATE_DIM, Stepper >::integrate_adaptive_specialized ( state_vector_t initialState,
const scalar_t startTime,
const scalar_t finalTime,
scalar_t  dtInitial,
scalar_t  AbsTol,
scalar_t  RelTol 
)
private

Integrate adaptive specialized.

Template Parameters
Sstepper type.
Parameters
[in]initialStateInitial state.
[in]startTimeInitial time.
[in]finalTimeFinal time.
[out]stateTrajectoryOutput state trajectory.
[out]timeTrajectoryOutput time stamp trajectory.
[in]dtInitialInitial time step.
[in]AbsTolThe absolute tolerance error for ode solver.
[in]RelTolThe relative tolerance error for ode solver.
Returns

◆ integrate_times_specialized()

template<int STATE_DIM, class Stepper >
template<typename S >
std::enable_if<!std::is_same< S, runge_kutta_dopri5_t< STATE_DIM > >::value, void >::type ocs2::Integrator< STATE_DIM, Stepper >::integrate_times_specialized ( state_vector_t initialState,
typename scalar_array_t::const_iterator  beginTimeItr,
typename scalar_array_t::const_iterator  endTimeItr,
scalar_t  dtInitial,
scalar_t  AbsTol,
scalar_t  RelTol 
)
private

Integrate times specialized function

Template Parameters
Sstepper type.
Parameters
[in]initialStateInitial state.
[in]beginTimeItrThe iterator to the beginning of the time stamp trajectory.
[in]endTimeItrThe iterator to the end of the time stamp trajectory.
[out]stateTrajectoryOutput state trajectory.
[in]dtInitialInitial time step.
[in]AbsTolThe absolute tolerance error for ode solver.
[in]RelTolThe relative tolerance error for ode solver.
Returns

◆ Integrator()

template<int STATE_DIM, class Stepper >
ocs2::Integrator< STATE_DIM, Stepper >::Integrator ( const std::shared_ptr< OdeBase< STATE_DIM > > &  systemPtr,
const std::shared_ptr< SystemEventHandler< STATE_DIM > > &  eventHandlerPtr = nullptr 
)
explicit

Constructor

Parameters
[in]systemThe system dynamics.
[in]eventHandlerThe integration event function.

◆ intermediateCostFunction()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
template<typename SCALAR_T >
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::intermediateCostFunction ( const SCALAR_T &  time,
const Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &  state,
const Eigen::Matrix< SCALAR_T, INPUT_DIM, 1 > &  input,
const Eigen::Matrix< SCALAR_T, STATE_DESIRED_DIM, 1 > &  stateDesired,
const Eigen::Matrix< SCALAR_T, INPUT_DESIRED_DIM, 1 > &  inputDesired,
const Eigen::Matrix< SCALAR_T, LOGIC_VARIABLE_DIM, 1 > &  logicVariable,
SCALAR_T &  costValue 
)

Interface method to the intermediate cost function. This method should be implemented by the derived class.

Template Parameters
scalartype. All the floating point operations should be with this type.
Parameters
[in]timetime.
[in]statestate vector.
[in]inputinput vector.
[in]stateDesireddesired state vector.
[in]inputDesireddesired input vector.
[in]logicVariablelogic variable vector.
[out]costValuecost value.

◆ intermediateCostFunctionAD()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::intermediateCostFunctionAD ( const ad_dynamic_vector_t tapedInput,
ad_dynamic_vector_t costValue 
)
protected

The intermediate cost function specialized with AD type.

Parameters
[in]tapedInputconcatenated input vector
[out]costValuecost value

◆ isDynamicLibraryCompiled() [1/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
const bool & ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::isDynamicLibraryCompiled ( ) const

Whether or not the dynamic library is compiled.

Returns
true if the dynamic library is compiled

◆ isDynamicLibraryCompiled() [2/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
const bool & ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::isDynamicLibraryCompiled ( ) const

Whether or not the dynamic library is compiled.

Returns
true if the dynamic library is compiled

◆ isDynamicLibraryCompiled() [3/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
const bool & ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::isDynamicLibraryCompiled ( ) const

Whether or not the dynamic library is compiled.

Returns
true if the dynamic library is compiled

◆ loadEigenMatrix()

template<typename Derived >
void ocs2::loadEigenMatrix ( const std::string &  filename,
const std::string &  matrixName,
Eigen::MatrixBase< Derived > &  matrix 
)
inline

An auxiliary function which loads an Eigen matrix from a file. The file uses property tree data structure with INFO format (refer to www.goo.gl/fV3yWA).

It has the following format:
matrixName
{
scaling 1e+0
(0,0) value ; M(0,0)
(1,0) value ; M(1,0)
(0,1) value ; M(0,1)
(1,1) value ; M(1,1)
}

If a value for a specific element is not defined it will set by default to zero.

Parameters
[in]filenameFile name which contains the configuration data.
[in]matrixNameThe key name assigned to the matrix in the config file.
[out]matrixThe loaded matrix.

◆ loadModels() [1/7]

template<int DOMAIN_DIM, int RANGE_DIM, typename SCALAR_T , int VARIABLE_DIM>
bool ocs2::CppAdCodeGenInterface< DOMAIN_DIM, RANGE_DIM, SCALAR_T, VARIABLE_DIM >::loadModels ( const std::string &  modelName,
const std::string &  libraryFolder = "",
bool  verbose = true 
)
overridevirtual

◆ loadModels() [2/7]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::loadModels ( const std::string &  modelName,
const std::string &  libraryFolder 
)

Loads the forward model, the Jacobian model, and the Hessian model.

Parameters
modelName
libraryFolder
verbose

◆ loadModels() [3/7]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::loadModels ( const std::string &  modelName,
const std::string &  libraryFolder 
)

Loads the forward model, the Jacobian model, and the Hessian model.

Parameters
modelName
libraryFolder
verbose

◆ loadModels() [4/7]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::loadModels ( const std::string &  modelName,
const std::string &  libraryFolder 
)

loads the forward model, the Jacobian model, and the Hessian model.

Parameters
modelName
libraryFolder
verbose

◆ loadModels() [5/7]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
bool ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::loadModels ( bool  verbose)
protected

Loads the forward model, the Jacobian model, and the Hessian model.

Parameters
[in]verbosedisplay information
Returns
true if it successfully loads the library.

◆ loadModels() [6/7]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
bool ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::loadModels ( bool  verbose)
protected

Loads the forward model, the Jacobian model, and the Hessian model.

Parameters
[in]verbosedisplay information.
Returns
true if it successfully loads the library.

◆ loadModels() [7/7]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
bool ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::loadModels ( bool  verbose)
protected

Loads the forward model, the Jacobian model, and the Hessian model.

Parameters
[in]verbosedisplay information
Returns
true if it successfully loads the library.

◆ loadScalar()

template<typename scalar_t >
void ocs2::loadScalar ( const std::string &  filename,
const std::string &  scalarName,
scalar_t &  value 
)
inline

An auxiliary function which loads a scalar value from a file. The file uses property tree data structure with INFO format (refer to www.goo.gl/fV3yWA).

Parameters
[in]filenameFile name which contains the configuration data.
[in]scalarNameThe key name assigned to the scalar in the config file.
[out]valueThe loaded value.

◆ logicRulesUpdated()

template<class LOGIC_RULES_T >
void ocs2::LogicRulesMachine< LOGIC_RULES_T >::logicRulesUpdated ( )

This causes that logicMachine updates itself in the next call of the SLQ::run().

◆ logicVariables()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
template<typename Derived_Matrix >
Eigen::Block< Derived_Matrix, LOGIC_VARIABLE_DIM, 1 > ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::logicVariables ( Eigen::MatrixBase< Derived_Matrix > &  tapedInput)
protected

Returns a pointer to the logic variables.

Parameters
[in]tapedInputThe concatenated input of the variables.
Returns
A pointer to the logic variables.

◆ multiplyPolynomials()

Eigen::VectorXd ocs2::multiplyPolynomials ( const Eigen::VectorXd &  p_lhs,
const Eigen::VectorXd &  p_rhs 
)
inline

◆ padeApproximation()

void ocs2::padeApproximation ( double  timeDelay,
Eigen::VectorXd &  numCoefficients,
Eigen::VectorXd &  denCoefficients,
size_t  numZeros,
size_t  numPoles 
)
inline

◆ pushBack()

template<class logic_rules_template_t >
void ocs2::HybridLogicRulesMachine< logic_rules_template_t >::pushBack ( const size_t &  partitionIndex,
const scalar_t eventTime,
const size_t &  subsystemID 
)

Adds a new event at the end of the current logic rules.

Parameters
[in]partitionIndexThe current active time partition.
[in]eventTimeThe time of the new event.
[in]subsystemIDThe triggered subsystem

◆ setADInterfaces() [1/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::setADInterfaces ( )
protected

Sets all the required CppAdCodeGenInterfaces

◆ setADInterfaces() [2/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::setADInterfaces ( )
protected

Sets all the required CppAdCodeGenInterfaces

◆ setADInterfaces() [3/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::setADInterfaces ( )
protected

Sets all the required CppAdCodeGenInterfaces

◆ setCostDesiredTrajectories()

template<size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, logic_rules_template_t >::setCostDesiredTrajectories ( const cost_desired_trajectories_t costDesiredTrajectories)
virtual

Sets the desired state and input trajectories used in the cost function.

Parameters
[in]CostDesiredTrajectoriescost desired trajectories interface class.

◆ setCurrentStateAndControl() [1/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::setCurrentStateAndControl ( const scalar_t t,
const state_vector_t x,
const input_vector_t u 
)
finalvirtual

Sets the current time, state, and control input.

Parameters
[in]tCurrent time.
[in]xCurrent state vector.
[in]uCurrent input vector.

Reimplemented from ocs2::CostFunctionBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ setCurrentStateAndControl() [2/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::setCurrentStateAndControl ( const scalar_t t,
const state_vector_t x,
const input_vector_t u 
)
finalvirtual

Sets the current time, state, and control input.

Parameters
[in]tCurrent time
[in]xCurrent state vector
[in]uCurrent input vector

Reimplemented from ocs2::ConstraintBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >.

◆ setCurrentStateAndControl() [3/3]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::setCurrentStateAndControl ( const scalar_t time,
const state_vector_t state,
const input_vector_t input 
)
finalvirtual

Sets the current time, state, and control input.

Parameters
[in]timeCurrent time
[in]stateCurrent state vector
[in]inputCurrent input vector

Reimplemented from ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES >.

◆ setLogicRules()

template<class LOGIC_RULES_T >
void ocs2::LogicRulesMachine< LOGIC_RULES_T >::setLogicRules ( const LOGIC_RULES_T &  logicRules)

Sets a new logic rules class.

Parameters
[in]logicRulesThe new logic rules class

◆ setThreadPriority()

void ocs2::setThreadPriority ( const int  priority,
std::thread &  thread 
)
inline

Sets the priority of the input thread.

Parameters
priorityThe priority of the thread from 0 (lowest) to 99 (highest)
threadA reference to the tread.

◆ setupLogicMachine()

template<class logic_rules_template_t >
void ocs2::HybridLogicRulesMachine< logic_rules_template_t >::setupLogicMachine ( const scalar_array_t partitioningTimes,
const scalar_t initTime,
const size_t &  initActivePartition,
const size_t &  initSubsystemID 
)

Sets up the LogicMachine. This method should be called before building-up the logic machine.

Parameters
[in]partitioningTimesThe time partition.
[in]initTimeThe initial time.
[in]initActivePartitionThe initial active time partition.
[in]initSubsystemIDThe initial active subsystem's ID.

◆ setupSystem()

template<int STATE_DIM, class Stepper >
void ocs2::Integrator< STATE_DIM, Stepper >::setupSystem ( )
private

Setup System

◆ smallerEqualIndexFunc()

template<size_t STATE_DIM, size_t INPUT_DIM>
bool ocs2::TrajectorySpreadingController< STATE_DIM, INPUT_DIM >::smallerEqualIndexFunc ( const index_t a,
const index_t b 
) const
protected

Returns true if a <= b

Parameters
a
b
Returns

◆ spreadController()

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::TrajectorySpreadingController< STATE_DIM, INPUT_DIM >::spreadController ( const scalar_t eventTime,
const index_t eventTimeIndex,
const index_t controlerEventTimeIndex,
controller_array_t controllersStock 
) const
protected
Parameters
eventTime
eventTimeIndex
ControlerEventTimeIndex
controllersStock

◆ stateInputConstraintAD()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::stateInputConstraintAD ( const ad_dynamic_vector_t tapedInput,
ad_dynamic_vector_t g1 
)
protected

The intermediate cost function specialized with AD type.

Parameters
[in]tapedInputconcatenated input vector
[out]g1The flow map value

◆ stateOnlyConstraintAD()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::stateOnlyConstraintAD ( const ad_dynamic_vector_t tapedInput,
ad_dynamic_vector_t g2 
)
protected

The terminal cost function specialized with AD type.

Parameters
[in]tapedInputconcatenated input vector
[out]g2The jump map value

◆ stateOnlyConstraintFinalAD()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t >
void ocs2::ConstraintBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t >::stateOnlyConstraintFinalAD ( const ad_dynamic_vector_t tapedInput,
ad_dynamic_vector_t g2Final 
)
protected

The terminal cost function specialized with AD type.

Parameters
[in]tapedInputconcatenated input vector
[out]g2FinalThe jump map value

◆ stateVariables()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
template<typename Derived_Matrix >
Eigen::Block< Derived_Matrix, STATE_DIM, 1 > ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::stateVariables ( Eigen::MatrixBase< Derived_Matrix > &  tapedInput)
protected

Returns a pointer to the state variables.

Parameters
[in]tapedInputThe concatenated input of the variables.
Returns
A pointer to the state variables.

◆ swap() [1/3]

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::swap ( FeedforwardController< STATE_DIM, INPUT_DIM > &  a,
FeedforwardController< STATE_DIM, INPUT_DIM > &  b 
)

◆ swap() [2/3]

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::swap ( LinearController< STATE_DIM, INPUT_DIM > &  a,
LinearController< STATE_DIM, INPUT_DIM > &  b 
)

◆ swap() [3/3]

template<size_t STATE_DIM, size_t INPUT_DIM>
void ocs2::swap ( PiController< STATE_DIM, INPUT_DIM > &  a,
PiController< STATE_DIM, INPUT_DIM > &  b 
)

◆ SystemDynamicsBaseAD() [1/2]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::SystemDynamicsBaseAD ( const bool &  dynamicLibraryIsCompiled = false)
explicit

Default constructor.

Parameters
[in]dynamicLibraryIsCompiledWhether a library is already complied.

◆ SystemDynamicsBaseAD() [2/2]

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::SystemDynamicsBaseAD ( const SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES > &  rhs)

Copy constructor

◆ systemFlowMap()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
template<typename SCALAR_T >
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::systemFlowMap ( const SCALAR_T &  time,
const Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &  state,
const Eigen::Matrix< SCALAR_T, INPUT_DIM, 1 > &  input,
Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &  stateDerivative 
)

Interface method to the state flow map of the hybrid system. This method should be implemented by the derived class.

Template Parameters
scalartype. All the floating point operations should be with this type.
Parameters
[in]timetime.
[in]statestate vector.
[in]inputinput vector.
[out]stateDerivativestate vector time derivative.

◆ systemFlowMapAD()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::systemFlowMapAD ( const ad_dynamic_vector_t tapedInput,
ad_dynamic_vector_t f 
)
protected

The flow map specialized with AD type.

Parameters
[in]tapedInputconcatenated input vector
[out]fThe flow map value

◆ systemGuardSurfaces()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
template<typename SCALAR_T >
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::systemGuardSurfaces ( const SCALAR_T &  time,
const Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &  state,
const Eigen::Matrix< SCALAR_T, INPUT_DIM, 1 > &  input,
Eigen::Matrix< SCALAR_T, NUM_MODES, 1 > &  guardSurfacesValue 
)

Interface method to the guard surfaces. This method should be implemented by the derived class. If there is no guard surfaces return a vector of size 1 with value -1 (or any other negative number).

Template Parameters
scalartype. All the floating point operations should be with this type.
Parameters
[in]timetime.
[in]statestate.
[in]inputinput vector
[out]guardSurfacesValueA vector of guard surfaces values

◆ systemGuardSurfacesAD()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::systemGuardSurfacesAD ( const ad_dynamic_vector_t tapedInput,
ad_dynamic_vector_t gamma 
)
protected

The guard surfaces specialized with AD type.

Parameters
[in]tapedInputconcatenated input vector
[out]gammaThe guard surfaces value

◆ systemJumpMap()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
template<typename SCALAR_T >
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::systemJumpMap ( const SCALAR_T &  time,
const Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &  state,
const Eigen::Matrix< SCALAR_T, INPUT_DIM, 1 > &  input,
Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &  jumpedState 
)

Interface method to the state jump map of the hybrid system. This method should be implemented by the derived class.

Template Parameters
scalartype. All the floating point operations should be with this type.
Parameters
[in]timetime.
[in]statestate vector.
[in]inputinput vector.
[out]jumpedStatejumped state.

◆ systemJumpMapAD()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class logic_rules_template_t , size_t NUM_MODES>
void ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, logic_rules_template_t, NUM_MODES >::systemJumpMapAD ( const ad_dynamic_vector_t tapedInput,
ad_dynamic_vector_t g 
)
protected

The jump map specialized with AD type.

Parameters
[in]tapedInputconcatenated input vector
[out]gThe jump map value

◆ terminalCostFunction()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
template<typename SCALAR_T >
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::terminalCostFunction ( const SCALAR_T &  time,
const Eigen::Matrix< SCALAR_T, STATE_DIM, 1 > &  state,
const Eigen::Matrix< SCALAR_T, STATE_DESIRED_DIM, 1 > &  stateDesired,
const Eigen::Matrix< SCALAR_T, LOGIC_VARIABLE_DIM, 1 > &  logicVariable,
SCALAR_T &  costValue 
)

Interface method to the terminal cost function. This method should be implemented by the derived class.

Template Parameters
scalartype. All the floating point operations should be with this type.
Parameters
[in]timetime.
[in]statestate vector.
[in]stateDesireddesired state vector.
[in]logicVariablelogic variable vector.
[out]costValuecost value.

◆ terminalCostFunctionAD()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
void ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::terminalCostFunctionAD ( const ad_dynamic_vector_t tapedInput,
ad_dynamic_vector_t costValue 
)
protected

The terminal cost function specialized with AD type.

Parameters
[in]tapedInputconcatenated input vector
[out]costValuecost value

◆ tf2ss()

void ocs2::tf2ss ( Eigen::VectorXd  numCoefficients,
Eigen::VectorXd  denCoefficients,
Eigen::MatrixXd &  A,
Eigen::MatrixXd &  B,
Eigen::MatrixXd &  C,
Eigen::MatrixXd &  D,
double  timeDelay = 0.0,
bool  balance = true 
)
inline

◆ timeVariable()

template<class Derived , size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T , size_t LOGIC_VARIABLE_DIM, size_t STATE_DESIRED_DIM, size_t INPUT_DESIRED_DIM>
template<typename Derived_Matrix >
Derived_Matrix::Scalar & ocs2::CostFunctionBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, LOGIC_VARIABLE_DIM, STATE_DESIRED_DIM, INPUT_DESIRED_DIM >::timeVariable ( Eigen::MatrixBase< Derived_Matrix > &  tapedInput)
protected

Returns a pointer to the time variable.

Parameters
[in]tapedInputThe concatenated input of the variables.
Returns
A pointer to the time variable.

◆ toString()

std::string ocs2::toString ( IntegratorType  integratorType)

◆ updateLogicRules()

template<class LOGIC_RULES_T >
bool ocs2::LogicRulesMachine< LOGIC_RULES_T >::updateLogicRules ( const scalar_array_t partitioningTimes)
virtual

Updates the active logic rules based on the last set value (using LogicRulesMachine::setLogicRules). Moreover, it recomputes the distribution of the switched systems over the time partitions.

Parameters
[in]partitioningTimesVector of time partitions.
Returns
true if the logic rules was actually updated.

Variable Documentation

◆ killIntegration_

template<int STATE_DIM>
bool ocs2::SystemEventHandler< STATE_DIM >::killIntegration_ = false
staticprotected