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

Dynamics class for the GNMS unit test. More...

#include <SpringLoadedMass.h>

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

Public Member Functions

 SpringLoadedMass ()
 
void computeControlledDynamics (const core::StateVector< state_dim > &state, const core::Time &t, const core::ControlVector< control_dim > &control, core::StateVector< state_dim > &derivative) override
 
SpringLoadedMassclone () const override
 
- Public Member Functions inherited from ct::core::ControlledSystem< 2, 1 >
 ControlledSystem (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 
 ControlledSystem (std::shared_ptr< ct::core::Controller< 2, 1, SCALAR >> controller, const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 
 ControlledSystem (const ControlledSystem &arg)
 
virtual ~ControlledSystem ()
 
void setController (const std::shared_ptr< Controller< 2, 1, SCALAR >> &controller)
 
void getController (std::shared_ptr< Controller< 2, 1, SCALAR >> &controller) const
 
std::shared_ptr< Controller< 2, 1, SCALAR > > getController ()
 
virtual void computeDynamics (const StateVector< 2, SCALAR > &state, const time_t &t, StateVector< 2, SCALAR > &derivative) override
 
virtual void computeControlledDynamics (const StateVector< 2, SCALAR > &state, const time_t &t, const ControlVector< 1, SCALAR > &control, StateVector< 2, SCALAR > &derivative)=0
 
ControlVector< 1, 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 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
 

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::ControlledSystem< 2, 1 >
typedef std::shared_ptr< ControlledSystem< 2, 1, 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 System< STATE_DIM, double >
typedef double time_t
 
- Public Attributes inherited from ct::core::ControlledSystem< 2, 1 >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef System< 2, SCALARBase
 
- Public Attributes inherited from ct::core::System< STATE_DIM, SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR S
 
- Public Attributes inherited from System< STATE_DIM, double >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef double S
 
- Protected Attributes inherited from ct::core::ControlledSystem< 2, 1 >
std::shared_ptr< Controller< 2, 1, SCALAR > > controller_
 
ControlVector< 1, SCALARcontrolAction_
 
- Protected Attributes inherited from ct::core::System< STATE_DIM, SCALAR >
SYSTEM_TYPE type_
 
- Protected Attributes inherited from System< STATE_DIM, double >
SYSTEM_TYPE type_
 

Detailed Description

Dynamics class for the GNMS unit test.

Constructor & Destructor Documentation

◆ SpringLoadedMass()

ct::optcon::example::SpringLoadedMass::SpringLoadedMass ( )
inline

References SECOND_ORDER.

Referenced by clone().

Member Function Documentation

◆ computeControlledDynamics()

void ct::optcon::example::SpringLoadedMass::computeControlledDynamics ( const core::StateVector< state_dim > &  state,
const core::Time t,
const core::ControlVector< control_dim > &  control,
core::StateVector< state_dim > &  derivative 
)
inlineoverride

References kStiffness.

◆ clone()

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

Member Data Documentation

◆ state_dim

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

◆ control_dim

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

◆ kStiffness

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

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