- 3.0.2 optimal control module.
ct::optcon::example::SpringLoadedMassLinear Class Reference

Linear system class for the GNMS unit test. More...

#include <SpringLoadedMass.h>

Inheritance diagram for ct::optcon::example::SpringLoadedMassLinear:
ct::core::LinearSystem< 2, 1 > ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > ControlledSystem< STATE_DIM, CONTROL_DIM, double > ct::core::System< STATE_DIM, SCALAR > System< STATE_DIM, double >

Public Member Functions

const state_matrix_tgetDerivativeState (const core::StateVector< state_dim > &x, const core::ControlVector< control_dim > &u, const double t=0.0) override
 
const state_control_matrix_tgetDerivativeControl (const core::StateVector< state_dim > &x, const core::ControlVector< control_dim > &u, const double t=0.0) override
 
SpringLoadedMassLinearclone () const override
 
- Public Member Functions inherited from ct::core::LinearSystem< 2, 1 >
 LinearSystem (const ct::core::SYSTEM_TYPE &type=ct::core::SYSTEM_TYPE::GENERAL)
 
virtual ~LinearSystem ()
 
virtual void computeControlledDynamics (const state_vector_t &state, const time_t &t, const control_vector_t &control, state_vector_t &derivative) override
 
virtual const state_matrix_tgetDerivativeState (const state_vector_t &x, const control_vector_t &u, const time_t t=time_t(0.0))=0
 
virtual const state_control_matrix_tgetDerivativeControl (const state_vector_t &x, const control_vector_t &u, const time_t t=time_t(0.0))=0
 
virtual void getDerivatives (state_matrix_t &A, state_control_matrix_t &B, const state_vector_t &x, const control_vector_t &u, const time_t t=time_t(0.0))
 
- Public Member Functions inherited from ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
 ControlledSystem (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 
 ControlledSystem (std::shared_ptr< ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >> controller, const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 
 ControlledSystem (const ControlledSystem &arg)
 
virtual ~ControlledSystem ()
 
void setController (const std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, SCALAR >> &controller)
 
void getController (std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, SCALAR >> &controller) const
 
std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, SCALAR > > getController ()
 
virtual void computeDynamics (const StateVector< STATE_DIM, SCALAR > &state, const time_t &t, StateVector< STATE_DIM, SCALAR > &derivative) override
 
virtual void computeControlledDynamics (const StateVector< STATE_DIM, SCALAR > &state, const time_t &t, const ControlVector< CONTROL_DIM, SCALAR > &control, StateVector< STATE_DIM, SCALAR > &derivative)=0
 
ControlVector< CONTROL_DIM, SCALARgetLastControlAction ()
 
- Public Member Functions inherited from ct::core::System< STATE_DIM, SCALAR >
 System (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 
 System (const System &other)
 
virtual ~System ()
 
virtual void computeDynamics (const StateVector< STATE_DIM, SCALAR > &state, const time_t &t, StateVector< STATE_DIM, SCALAR > &derivative)=0
 
SYSTEM_TYPE getType () const
 
virtual bool isSymplectic () const
 
- Public Member Functions inherited from ControlledSystem< STATE_DIM, CONTROL_DIM, double >
 ControlledSystem (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 
 ControlledSystem (std::shared_ptr< ct::core::Controller< STATE_DIM, CONTROL_DIM, double >> controller, const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 
 ControlledSystem (const ControlledSystem &arg)
 
virtual ~ControlledSystem ()
 
void setController (const std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, double >> &controller)
 
void getController (std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, double >> &controller) const
 
std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, double > > getController ()
 
virtual void computeDynamics (const StateVector< STATE_DIM, double > &state, const time_t &t, StateVector< STATE_DIM, double > &derivative) override
 
virtual void computeControlledDynamics (const StateVector< STATE_DIM, double > &state, const time_t &t, const ControlVector< CONTROL_DIM, double > &control, StateVector< STATE_DIM, double > &derivative)=0
 
ControlVector< CONTROL_DIM, double > getLastControlAction ()
 
- Public Member Functions inherited from System< STATE_DIM, double >
 System (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 
 System (const System &other)
 
virtual ~System ()
 
virtual void computeDynamics (const StateVector< STATE_DIM, double > &state, const time_t &t, StateVector< STATE_DIM, double > &derivative)=0
 
SYSTEM_TYPE getType () const
 
virtual bool isSymplectic () const
 

Public Attributes

state_matrix_t A_
 
state_control_matrix_t B_
 
- Public Attributes inherited from ct::core::LinearSystem< 2, 1 >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef ControlledSystem< 2, 1, SCALARBase
 
- Public Attributes inherited from ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef System< STATE_DIM, SCALARBase
 
- Public Attributes inherited from ct::core::System< STATE_DIM, SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR S
 
- Public Attributes inherited from ControlledSystem< STATE_DIM, CONTROL_DIM, double >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef System< STATE_DIM, double > Base
 
- Public Attributes inherited from System< STATE_DIM, double >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef double S
 

Static Public Attributes

static const size_t state_dim = 2
 
static const size_t control_dim = 1
 
static constexpr double kStiffness = 10
 

Additional Inherited Members

- Public Types inherited from ct::core::LinearSystem< 2, 1 >
typedef Base::time_t time_t
 
typedef StateVector< 2, SCALARstate_vector_t
 
typedef ControlVector< 1, SCALARcontrol_vector_t
 
typedef StateMatrix< 2, SCALARstate_matrix_t
 
typedef StateControlMatrix< 2, 1, SCALARstate_control_matrix_t
 
- Public Types inherited from ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
typedef std::shared_ptr< ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > > Ptr
 
typedef Base::time_t time_t
 
- Public Types inherited from ct::core::System< STATE_DIM, SCALAR >
typedef SCALAR time_t
 
- Public Types inherited from ControlledSystem< STATE_DIM, CONTROL_DIM, double >
typedef std::shared_ptr< ControlledSystem< STATE_DIM, CONTROL_DIM, double > > Ptr
 
typedef Base::time_t time_t
 
- Public Types inherited from System< STATE_DIM, double >
typedef double time_t
 
- Protected Attributes inherited from ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, SCALAR > > controller_
 
ControlVector< CONTROL_DIM, SCALARcontrolAction_
 
- Protected Attributes inherited from ct::core::System< STATE_DIM, SCALAR >
SYSTEM_TYPE type_
 
- Protected Attributes inherited from ControlledSystem< STATE_DIM, CONTROL_DIM, double >
std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, double > > controller_
 
ControlVector< CONTROL_DIM, double > controlAction_
 
- Protected Attributes inherited from System< STATE_DIM, double >
SYSTEM_TYPE type_
 

Detailed Description

Linear system class for the GNMS unit test.

Member Function Documentation

◆ getDerivativeState()

const state_matrix_t& ct::optcon::example::SpringLoadedMassLinear::getDerivativeState ( const core::StateVector< state_dim > &  x,
const core::ControlVector< control_dim > &  u,
const double  t = 0.0 
)
inlineoverride

◆ getDerivativeControl()

const state_control_matrix_t& ct::optcon::example::SpringLoadedMassLinear::getDerivativeControl ( const core::StateVector< state_dim > &  x,
const core::ControlVector< control_dim > &  u,
const double  t = 0.0 
)
inlineoverride

◆ clone()

SpringLoadedMassLinear* ct::optcon::example::SpringLoadedMassLinear::clone ( ) const
inlineoverridevirtual

Member Data Documentation

◆ state_dim

const size_t ct::optcon::example::SpringLoadedMassLinear::state_dim = 2
static

◆ control_dim

const size_t ct::optcon::example::SpringLoadedMassLinear::control_dim = 1
static

◆ kStiffness

constexpr double ct::optcon::example::SpringLoadedMassLinear::kStiffness = 10
static

◆ A_

state_matrix_t ct::optcon::example::SpringLoadedMassLinear::A_

◆ B_

state_control_matrix_t ct::optcon::example::SpringLoadedMassLinear::B_

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