- 3.0.2 optimal control module.
ct::optcon::tpl::TimeGrid< SCALAR > Class Template Reference

#include <TimeGrid.h>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW TimeGrid ()=delete
 
 TimeGrid (const size_t numberOfShots, const SCALAR timeHorizon)
 Custom constructor. More...
 
void changeShotCount (const size_t numberOfShots)
 Updates the timegrid when the number of shots changes. More...
 
void changeTimeHorizon (const SCALAR timeHorizon)
 Updates the timegrid when the timehorizon changes. More...
 
void updateTimeGrid (const Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > &h_segment)
 This method updates the timegrid when new optimized time segments arrive from the nlp solver. Only gets called when using timegrid optimization, otherwise the timegrid stays fixed. More...
 
void makeUniformGrid ()
 Creates a uniform timegrid. More...
 
const SCALAR getShotStartTime (const size_t shot_index) const
 Returns to start time of a shot. More...
 
const SCALAR getShotEndTime (const size_t shot_index) const
 Returns the end time of a shot. More...
 
const SCALAR getShotDuration (const size_t shot_index) const
 Returns to duration of a shot. More...
 
const ct::core::tpl::TimeArray< SCALAR > & toImplementation ()
 Returns the underlying TimeArray. More...
 
const SCALAR getTimeHorizon () const
 Returns the initial timehorizon of the problem. More...
 
const SCALAR getOptimizedTimeHorizon () const
 Returns the optimized timehorizon. More...
 

Detailed Description

template<typename SCALAR>
class ct::optcon::tpl::TimeGrid< SCALAR >

This class describes the time-grid underlying the shots in the dms problem In total, we have N+1 pairs of (s_i, q_i) and N shots between them.

We assume that starting time t_0 = 0.0 [sec]

Constructor & Destructor Documentation

◆ TimeGrid() [1/2]

template<typename SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ct::optcon::tpl::TimeGrid< SCALAR >::TimeGrid ( )
delete

◆ TimeGrid() [2/2]

template<typename SCALAR >
ct::optcon::tpl::TimeGrid< SCALAR >::TimeGrid ( const size_t  numberOfShots,
const SCALAR  timeHorizon 
)
inline

Custom constructor.

Parameters
[in]numberOfShotsThe number of shots
[in]timeHorizonThe dms time horizon

References ct::optcon::tpl::TimeGrid< SCALAR >::makeUniformGrid().

Member Function Documentation

◆ changeShotCount()

template<typename SCALAR >
void ct::optcon::tpl::TimeGrid< SCALAR >::changeShotCount ( const size_t  numberOfShots)
inline

Updates the timegrid when the number of shots changes.

Parameters
[in]numberOfShotsThe new number of shots

References ct::optcon::tpl::TimeGrid< SCALAR >::makeUniformGrid().

◆ changeTimeHorizon()

template<typename SCALAR >
void ct::optcon::tpl::TimeGrid< SCALAR >::changeTimeHorizon ( const SCALAR  timeHorizon)
inline

Updates the timegrid when the timehorizon changes.

Parameters
[in]timeHorizonThe new time horizon

References ct::optcon::tpl::TimeGrid< SCALAR >::makeUniformGrid(), and timeHorizon.

◆ updateTimeGrid()

template<typename SCALAR >
void ct::optcon::tpl::TimeGrid< SCALAR >::updateTimeGrid ( const Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > &  h_segment)
inline

This method updates the timegrid when new optimized time segments arrive from the nlp solver. Only gets called when using timegrid optimization, otherwise the timegrid stays fixed.

Parameters
[in]h_segmentThe vector of the new optimized time segments

References i.

◆ makeUniformGrid()

template<typename SCALAR >
void ct::optcon::tpl::TimeGrid< SCALAR >::makeUniformGrid ( )
inline

◆ getShotStartTime()

template<typename SCALAR >
const SCALAR ct::optcon::tpl::TimeGrid< SCALAR >::getShotStartTime ( const size_t  shot_index) const
inline

Returns to start time of a shot.

Parameters
[in]shot_indexThe shot number
Returns
The start time

◆ getShotEndTime()

template<typename SCALAR >
const SCALAR ct::optcon::tpl::TimeGrid< SCALAR >::getShotEndTime ( const size_t  shot_index) const
inline

Returns the end time of a shot.

Parameters
[in]shot_indexThe shot number
Returns
The end time

◆ getShotDuration()

template<typename SCALAR >
const SCALAR ct::optcon::tpl::TimeGrid< SCALAR >::getShotDuration ( const size_t  shot_index) const
inline

Returns to duration of a shot.

Parameters
[in]shot_indexThe shot index
Returns
The duration

◆ toImplementation()

template<typename SCALAR >
const ct::core::tpl::TimeArray<SCALAR>& ct::optcon::tpl::TimeGrid< SCALAR >::toImplementation ( )
inline

Returns the underlying TimeArray.

Returns
The underlying TimeArray

◆ getTimeHorizon()

template<typename SCALAR >
const SCALAR ct::optcon::tpl::TimeGrid< SCALAR >::getTimeHorizon ( ) const
inline

Returns the initial timehorizon of the problem.

Returns
The initial time horizon

◆ getOptimizedTimeHorizon()

template<typename SCALAR >
const SCALAR ct::optcon::tpl::TimeGrid< SCALAR >::getOptimizedTimeHorizon ( ) const
inline

Returns the optimized timehorizon.

Returns
The optimized timehorizon

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