Time discretization of the optimal control problem.
More...
#include <time_discretization.hpp>
Time discretization of the optimal control problem.
◆ TimeDiscretization() [1/4]
robotoc::TimeDiscretization::TimeDiscretization |
( |
const double |
T, |
|
|
const int |
N, |
|
|
const int |
reserved_num_discrete_events = 0 |
|
) |
| |
Constructor.
- Parameters
-
[in] | T | Length of the horizon. Must be positive. |
[in] | N | Number of the discretization grids of the horizon except for the discrete events. Must be positive. |
[in] | reserved_num_discrete_events | Reserved size of each discrete events (impact and lift) to avoid dynamic memory allocation. Must be non-negative. Default is 0. |
◆ TimeDiscretization() [2/4]
robotoc::TimeDiscretization::TimeDiscretization |
( |
| ) |
|
◆ ~TimeDiscretization()
robotoc::TimeDiscretization::~TimeDiscretization |
( |
| ) |
|
|
default |
◆ TimeDiscretization() [3/4]
Default copy constructor.
◆ TimeDiscretization() [4/4]
Default move constructor.
◆ back()
const GridInfo & robotoc::TimeDiscretization::back |
( |
| ) |
const |
|
inline |
Returns the grid info of the terminal stage.
- Returns
- const reference to the grid info of the terminal stage.
◆ correctTimeSteps()
void robotoc::TimeDiscretization::correctTimeSteps |
( |
const std::shared_ptr< ContactSequence > & |
contact_sequence, |
|
|
const double |
t |
|
) |
| |
Discretizes the finite horizon taking into account the discrete events.
- Parameters
-
[in] | contact_sequence | Shared ptr to the contact sequence. |
[in] | t | Initial time of the horizon. |
◆ discretize()
void robotoc::TimeDiscretization::discretize |
( |
const std::shared_ptr< ContactSequence > & |
contact_sequence, |
|
|
const double |
t |
|
) |
| |
Discretizes the finite horizon taking into account the discrete events.
- Parameters
-
[in] | contact_sequence | Shared ptr to the contact sequence. |
[in] | t | Initial time of the horizon. |
◆ disp()
void robotoc::TimeDiscretization::disp |
( |
std::ostream & |
os | ) |
const |
Displays the time discretization onto a ostream.
◆ front()
const GridInfo & robotoc::TimeDiscretization::front |
( |
| ) |
const |
|
inline |
Returns the grid info of the initial stage.
- Returns
- const reference to the grid info of the intial stage.
◆ grid()
const GridInfo & robotoc::TimeDiscretization::grid |
( |
const int |
i | ) |
const |
|
inline |
Returns the grid info of the specified stage.
- Parameters
-
- Returns
- const reference to the grid info of the stage of interest.
◆ maxTimeStep()
double robotoc::TimeDiscretization::maxTimeStep |
( |
| ) |
const |
|
inline |
Gets the maximum time step of the discretization.
- Returns
- The maximum time step of the discretization.
◆ N()
int robotoc::TimeDiscretization::N |
( |
| ) |
const |
|
inline |
- Returns
- Number of the time stages on the horizon.
◆ operator=() [1/2]
Default copy assign operator.
◆ operator=() [2/2]
Default move assign operator.
◆ operator[]()
const GridInfo & robotoc::TimeDiscretization::operator[] |
( |
const int |
i | ) |
const |
|
inline |
Returns the grid info of the specified stage.
- Parameters
-
- Returns
- const reference to the grid info of the stage of interest.
◆ reserve()
void robotoc::TimeDiscretization::reserve |
( |
const int |
reserved_num_discrete_events | ) |
|
Reserve the discrete-event data.
- Parameters
-
[in] | reserved_num_discrete_events | Reserved size of discrete events
on the horizon. Must be non-negative. |
◆ reservedNumDiscreteEvents()
int robotoc::TimeDiscretization::reservedNumDiscreteEvents |
( |
| ) |
const |
- Returns
- Reserved size of the discrete-event data.
◆ size()
int robotoc::TimeDiscretization::size |
( |
| ) |
const |
|
inline |
Returns the number of grids.
- Returns
- The number of grids..
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const TimeDiscretization & |
discretization |
|
) |
| |
|
friend |
The documentation for this class was generated from the following file: