- 3.0.2 optimal control module.
ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR > Class Template Reference

This class performs the state and the sensitivity integration on a shot. More...

#include <ShotContainer.h>

Public Types

typedef DIMENSIONS::state_vector_t state_vector_t
 
typedef DIMENSIONS::control_vector_t control_vector_t
 
typedef DIMENSIONS::state_vector_array_t state_vector_array_t
 
typedef DIMENSIONS::control_vector_array_t control_vector_array_t
 
typedef DIMENSIONS::time_array_t time_array_t
 
typedef DIMENSIONS::state_matrix_t state_matrix_t
 
typedef DIMENSIONS::state_control_matrix_t state_control_matrix_t
 
typedef DIMENSIONS::state_matrix_array_t state_matrix_array_t
 
typedef DIMENSIONS::state_control_matrix_array_t state_control_matrix_array_t
 

Public Member Functions

 ShotContainer ()=delete
 
 ShotContainer (std::shared_ptr< ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >> controlledSystem, std::shared_ptr< ct::core::LinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >> linearSystem, std::shared_ptr< ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >> costFct, std::shared_ptr< OptVectorDms< STATE_DIM, CONTROL_DIM, SCALAR >> w, std::shared_ptr< SplinerBase< control_vector_t, SCALAR >> controlSpliner, std::shared_ptr< tpl::TimeGrid< SCALAR >> timeGrid, size_t shotNr, DmsSettings settings, size_t nIntegrationSteps)
 Custom constructor. More...
 
void integrateShot ()
 Performs the state integration between the shots. More...
 
void integrateCost ()
 
void integrateSensitivities ()
 Performs the state and the sensitivity integration between the shots. More...
 
void integrateCostSensitivities ()
 
void reset ()
 
const state_vector_tgetStateIntegrated ()
 Returns the integrated state. More...
 
const SCALAR getIntegrationTimeFinal ()
 Returns the end time of the integration. More...
 
const state_matrix_tgetdXdSiIntegrated ()
 Returns the integrated ODE sensitivity with respect to the discretized state s_i. More...
 
const state_control_matrix_tgetdXdQiIntegrated ()
 Returns the integrated ODE sensitivity with respect to the discretized inputs q_i. More...
 
const state_control_matrix_tgetdXdQip1Integrated ()
 Returns the integrated ODE sensitivity with respect to the discretized inputs q_{i+1}. More...
 
const state_vector_array_tgetXHistory () const
 Returns the integrated ODE sensitivity with respect to the time segments h_i. More...
 
const control_vector_array_tgetUHistory ()
 Returns the control input trajectory used during the state integration. More...
 
const time_array_tgetTHistory () const
 Returns the time trajectory used during the integration. More...
 
const SCALAR getCostIntegrated () const
 Gets the cost integrated. More...
 
const state_vector_tgetdLdSiIntegrated () const
 Returns the cost gradient with respect to s_i integrated over the shot. More...
 
const control_vector_tgetdLdQiIntegrated () const
 Returns the cost gradient with respect to q_i integrated over the shot. More...
 
const control_vector_tgetdLdQip1Integrated () const
 Returns to cost gradient with respect to q_{i+1} integrated over the shot. More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef DmsDimensions< STATE_DIM, CONTROL_DIM, SCALARDIMENSIONS
 

Detailed Description

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
class ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >

This class performs the state and the sensitivity integration on a shot.

Template Parameters
STATE_DIMThe state dimension
CONTROL_DIMThe control dimension

Member Typedef Documentation

◆ state_vector_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef DIMENSIONS::state_vector_t ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_t

◆ control_vector_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef DIMENSIONS::control_vector_t ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::control_vector_t

◆ state_vector_array_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef DIMENSIONS::state_vector_array_t ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::state_vector_array_t

◆ control_vector_array_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef DIMENSIONS::control_vector_array_t ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::control_vector_array_t

◆ time_array_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef DIMENSIONS::time_array_t ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::time_array_t

◆ state_matrix_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef DIMENSIONS::state_matrix_t ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::state_matrix_t

◆ state_control_matrix_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef DIMENSIONS::state_control_matrix_t ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::state_control_matrix_t

◆ state_matrix_array_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef DIMENSIONS::state_matrix_array_t ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::state_matrix_array_t

◆ state_control_matrix_array_t

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef DIMENSIONS::state_control_matrix_array_t ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::state_control_matrix_array_t

Constructor & Destructor Documentation

◆ ShotContainer() [1/2]

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::ShotContainer ( )
delete

◆ ShotContainer() [2/2]

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::ShotContainer ( std::shared_ptr< ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >>  controlledSystem,
std::shared_ptr< ct::core::LinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >>  linearSystem,
std::shared_ptr< ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >>  costFct,
std::shared_ptr< OptVectorDms< STATE_DIM, CONTROL_DIM, SCALAR >>  w,
std::shared_ptr< SplinerBase< control_vector_t, SCALAR >>  controlSpliner,
std::shared_ptr< tpl::TimeGrid< SCALAR >>  timeGrid,
size_t  shotNr,
DmsSettings  settings,
size_t  nIntegrationSteps 
)
inline

Custom constructor.

Parameters
[in]controlledSystemThe nonlinear system
[in]linearSystemThe linearized system
[in]costFctThe costfunction
[in]wThe optimization vector
[in]controlSplinerThe control input spliner
[in]timeGridThe timegrid
[in]shotNrThe shot number
[in]settingsThe dms settings

References ct::optcon::DmsSettings::costEvaluationType_, ct::optcon::DmsSettings::EULER, ct::core::EULERCT, ct::optcon::DmsSettings::FULL, ct::optcon::DmsSettings::integrationType_, ct::optcon::DmsSettings::N_, ct::optcon::DmsSettings::RK4, ct::core::RK4CT, and ct::optcon::DmsSettings::RK5.

Member Function Documentation

◆ integrateShot()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
void ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::integrateShot ( )
inline

◆ integrateCost()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
void ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::integrateCost ( )
inline

◆ integrateSensitivities()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
void ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::integrateSensitivities ( )
inline

◆ integrateCostSensitivities()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
void ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::integrateCostSensitivities ( )
inline

◆ reset()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
void ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::reset ( )
inline

◆ getStateIntegrated()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const state_vector_t& ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getStateIntegrated ( )
inline

Returns the integrated state.

Returns
The integrated state

◆ getIntegrationTimeFinal()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const SCALAR ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getIntegrationTimeFinal ( )
inline

Returns the end time of the integration.

Returns
The end time of the integration.

◆ getdXdSiIntegrated()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const state_matrix_t& ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getdXdSiIntegrated ( )
inline

Returns the integrated ODE sensitivity with respect to the discretized state s_i.

Returns
The integrated sensitivity

◆ getdXdQiIntegrated()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const state_control_matrix_t& ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getdXdQiIntegrated ( )
inline

Returns the integrated ODE sensitivity with respect to the discretized inputs q_i.

Returns
The integrated sensitivity

◆ getdXdQip1Integrated()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const state_control_matrix_t& ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getdXdQip1Integrated ( )
inline

Returns the integrated ODE sensitivity with respect to the discretized inputs q_{i+1}.

Returns
The integrated sensitivity

◆ getXHistory()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const state_vector_array_t& ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getXHistory ( ) const
inline

Returns the integrated ODE sensitivity with respect to the time segments h_i.

Returns
The integrated sensitivity Gets the full integrated state trajectory.
The integrated state trajectory

◆ getUHistory()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const control_vector_array_t& ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getUHistory ( )
inline

Returns the control input trajectory used during the state integration.

Returns
The control trajectory

References t.

◆ getTHistory()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const time_array_t& ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getTHistory ( ) const
inline

Returns the time trajectory used during the integration.

Returns
The time trajectory

◆ getCostIntegrated()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const SCALAR ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getCostIntegrated ( ) const
inline

Gets the cost integrated.

Returns
The integrated cost.

◆ getdLdSiIntegrated()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const state_vector_t& ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getdLdSiIntegrated ( ) const
inline

Returns the cost gradient with respect to s_i integrated over the shot.

Returns
The cost gradient

◆ getdLdQiIntegrated()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const control_vector_t& ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getdLdQiIntegrated ( ) const
inline

Returns the cost gradient with respect to q_i integrated over the shot.

Returns
The cost gradient

◆ getdLdQip1Integrated()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
const control_vector_t& ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::getdLdQip1Integrated ( ) const
inline

Returns to cost gradient with respect to q_{i+1} integrated over the shot.

Returns
The cost gradient

Member Data Documentation

◆ DIMENSIONS

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef DmsDimensions<STATE_DIM, CONTROL_DIM, SCALAR> ct::optcon::ShotContainer< STATE_DIM, CONTROL_DIM, SCALAR >::DIMENSIONS

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