OCS2 Manual  v1.0.0
OCS2 Documentation
ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T > Class Template Referenceabstract

#include <ControlledSystemBase.h>

Detailed Description

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
class ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >

The base class for non-autonomous system dynamics.

Template Parameters
STATE_DIMDimension of the state space.
INPUT_DIMDimension of the control input space.
LOGIC_RULES_TLogic Rules type (default NullLogicRules).
Inheritance diagram for ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >:
ocs2::OdeBase< STATE_DIM > ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES > ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T > ocs2::SystemDynamicsBaseAD< Derived, STATE_DIM, INPUT_DIM, LOGIC_RULES_T, NUM_MODES > ocs2::LinearSystemDynamics< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >

Public Types

using Ptr = std::shared_ptr< ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T > >
 
using ConstPtr = std::shared_ptr< const ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T > >
 
using BASE = OdeBase< STATE_DIM >
 
using DIMENSIONS = Dimensions< STATE_DIM, INPUT_DIM >
 
using scalar_t = typename DIMENSIONS::scalar_t
 
using scalar_array_t = typename DIMENSIONS::scalar_array_t
 
using state_vector_t = typename DIMENSIONS::state_vector_t
 
using state_vector_array_t = typename DIMENSIONS::state_vector_array_t
 
using input_vector_t = typename DIMENSIONS::input_vector_t
 
using input_vector_array_t = typename DIMENSIONS::input_vector_array_t
 
using input_state_matrix_t = typename DIMENSIONS::input_state_matrix_t
 
using input_state_matrix_array_t = typename DIMENSIONS::input_state_matrix_array_t
 
using constraint1_vector_t = typename DIMENSIONS::constraint1_vector_t
 
using constraint2_vector_t = typename DIMENSIONS::constraint2_vector_t
 
using dynamic_vector_t = typename DIMENSIONS::dynamic_vector_t
 
using controller_t = ControllerBase< STATE_DIM, INPUT_DIM >
 
- Public Types inherited from ocs2::OdeBase< STATE_DIM >
using DIMENSIONS = Dimensions< STATE_DIM, 0 >
 
using scalar_t = typename DIMENSIONS::scalar_t
 
using state_vector_t = typename DIMENSIONS::state_vector_t
 
using dynamic_vector_t = typename DIMENSIONS::dynamic_vector_t
 

Public Member Functions

 ControlledSystemBase ()
 
 ControlledSystemBase (const ControlledSystemBase &rhs)
 
virtual ~ControlledSystemBase ()=default
 
virtual void reset ()
 
void setController (controller_t *controllerPtr)
 
void computeFlowMap (const scalar_t &t, const state_vector_t &x, state_vector_t &dxdt)
 
virtual void initializeModel (LogicRulesMachine< LOGIC_RULES_T > &logicRulesMachine, const size_t &partitionIndex, const char *algorithmName=nullptr)
 
virtual ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T > * clone () const =0
 
virtual void computeFlowMap (const scalar_t &t, const state_vector_t &x, const input_vector_t &u, state_vector_t &dxdt)=0
 
void computeJumpMap (const scalar_t &time, const state_vector_t &state, state_vector_t &mappedState) override
 
void computeGuardSurfaces (const scalar_t &time, const state_vector_t &state, dynamic_vector_t &guardSurfacesValue) override
 
controller_tcontrollerPtr () const
 
- Public Member Functions inherited from ocs2::OdeBase< STATE_DIM >
 OdeBase ()
 
virtual ~OdeBase ()=default
 
 OdeBase (const OdeBase &rhs)
 
int getNumFunctionCalls ()
 
void resetNumFunctionCalls ()
 

Public Attributes

 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
 

Private Attributes

controller_tcontrollerPtr_
 

Additional Inherited Members

- Protected Attributes inherited from ocs2::OdeBase< STATE_DIM >
int numFunctionCalls_
 

Member Typedef Documentation

◆ BASE

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::BASE = OdeBase<STATE_DIM>

◆ ConstPtr

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::ConstPtr = std::shared_ptr<const ControlledSystemBase<STATE_DIM, INPUT_DIM, LOGIC_RULES_T> >

◆ constraint1_vector_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::constraint1_vector_t = typename DIMENSIONS::constraint1_vector_t

◆ constraint2_vector_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::constraint2_vector_t = typename DIMENSIONS::constraint2_vector_t

◆ controller_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::controller_t = ControllerBase<STATE_DIM, INPUT_DIM>

◆ DIMENSIONS

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::DIMENSIONS = Dimensions<STATE_DIM, INPUT_DIM>

◆ dynamic_vector_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::dynamic_vector_t = typename DIMENSIONS::dynamic_vector_t

◆ input_state_matrix_array_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::input_state_matrix_array_t = typename DIMENSIONS::input_state_matrix_array_t

◆ input_state_matrix_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::input_state_matrix_t = typename DIMENSIONS::input_state_matrix_t

◆ input_vector_array_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::input_vector_array_t = typename DIMENSIONS::input_vector_array_t

◆ input_vector_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::input_vector_t = typename DIMENSIONS::input_vector_t

◆ Ptr

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::Ptr = std::shared_ptr<ControlledSystemBase<STATE_DIM, INPUT_DIM, LOGIC_RULES_T> >

◆ scalar_array_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::scalar_array_t = typename DIMENSIONS::scalar_array_t

◆ scalar_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::scalar_t = typename DIMENSIONS::scalar_t

◆ state_vector_array_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::state_vector_array_t = typename DIMENSIONS::state_vector_array_t

◆ state_vector_t

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
using ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::state_vector_t = typename DIMENSIONS::state_vector_t

Constructor & Destructor Documentation

◆ ControlledSystemBase() [1/2]

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::ControlledSystemBase ( )
inline

Default constructor.

◆ ControlledSystemBase() [2/2]

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::ControlledSystemBase ( const ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T > &  rhs)
inline

Copy constructor.

◆ ~ControlledSystemBase()

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
virtual ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::~ControlledSystemBase ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ clone()

◆ computeFlowMap() [1/2]

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
void ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::computeFlowMap ( const scalar_t t,
const state_vector_t x,
state_vector_t dxdt 
)
inlinevirtual

Computes derivative of the autonomous system dynamics with the given control policy.

Parameters
[in]tCurrent time.
[in]xCurrent state.
[out]dxdtCurrent state time derivative.

Implements ocs2::OdeBase< STATE_DIM >.

◆ computeFlowMap() [2/2]

◆ computeGuardSurfaces()

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
void ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::computeGuardSurfaces ( const scalar_t time,
const state_vector_t state,
dynamic_vector_t guardSurfacesValue 
)
inlineoverridevirtual

◆ computeJumpMap()

◆ controllerPtr()

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
controller_t* ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::controllerPtr ( ) const
inline

Returns the controller pointer.

Returns
A pointer to controller.

◆ initializeModel()

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
virtual void ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::initializeModel ( LogicRulesMachine< LOGIC_RULES_T > &  logicRulesMachine,
const size_t &  partitionIndex,
const char *  algorithmName = nullptr 
)
inlinevirtual

◆ reset()

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
virtual void ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::reset ( )
inlinevirtual

Resets the internal classes.

Reimplemented in ocs2::RolloutSensitivityEquations< STATE_DIM, INPUT_DIM >.

◆ setController()

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
void ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::setController ( controller_t controllerPtr)
inline

Sets the control policy using the controller class.

Parameters
[in]controllerPtrA pointer to the control policy.

Member Data Documentation

◆ controllerPtr_

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
controller_t* ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::controllerPtr_
private

◆ EIGEN_MAKE_ALIGNED_OPERATOR_NEW

template<size_t STATE_DIM, size_t INPUT_DIM, class LOGIC_RULES_T = NullLogicRules>
ocs2::ControlledSystemBase< STATE_DIM, INPUT_DIM, LOGIC_RULES_T >::EIGEN_MAKE_ALIGNED_OPERATOR_NEW

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