robotoc
robotoc - efficient ROBOT Optimal Control solvers
|
Riccati recursion solver for optimal control problems. Solves the KKT system in linear time complexity w.r.t. the length of the horizon. More...
#include <riccati_recursion.hpp>
Public Member Functions | |
RiccatiRecursion (const OCP &ocp, const double max_dts0=0.1) | |
Construct a Riccati recursion solver. More... | |
RiccatiRecursion () | |
Default constructor. More... | |
~RiccatiRecursion ()=default | |
Destructor. More... | |
RiccatiRecursion (const RiccatiRecursion &)=default | |
Default copy constructor. More... | |
RiccatiRecursion & | operator= (const RiccatiRecursion &)=default |
Default copy operator. More... | |
RiccatiRecursion (RiccatiRecursion &&) noexcept=default | |
Default move constructor. More... | |
RiccatiRecursion & | operator= (RiccatiRecursion &&) noexcept=default |
Default move assign operator. More... | |
void | setRegularization (const double max_dts0) |
Sets the regularization on the STO. More... | |
void | backwardRiccatiRecursion (const TimeDiscretization &time_discretization, KKTMatrix &kkt_matrix, KKTResidual &kkt_residual, RiccatiFactorization &factorization) |
Performs the backward Riccati recursion. More... | |
void | forwardRiccatiRecursion (const TimeDiscretization &time_discretization, const KKTMatrix &kkt_matrix, const KKTResidual &kkt_residual, const RiccatiFactorization &factorization, Direction &d) const |
Performs the backward Riccati recursion. More... | |
const aligned_vector< LQRPolicy > & | getLQRPolicy () const |
Gets of the LQR policies over the horizon. More... | |
void | resizeData (const TimeDiscretization &time_discretization) |
Resizes the internal data. More... | |
Riccati recursion solver for optimal control problems. Solves the KKT system in linear time complexity w.r.t. the length of the horizon.
robotoc::RiccatiRecursion::RiccatiRecursion | ( | const OCP & | ocp, |
const double | max_dts0 = 0.1 |
||
) |
Construct a Riccati recursion solver.
[in] | ocp | Optimal control problem. |
[in] | max_dts0 | Maximum magnitude of the nominal direction of the switching time. Used in a heuristic regularization on the dynamic programming recursion. Must be positive. Default is 0.1. |
robotoc::RiccatiRecursion::RiccatiRecursion | ( | ) |
Default constructor.
|
default |
Destructor.
|
default |
Default copy constructor.
|
defaultnoexcept |
Default move constructor.
void robotoc::RiccatiRecursion::backwardRiccatiRecursion | ( | const TimeDiscretization & | time_discretization, |
KKTMatrix & | kkt_matrix, | ||
KKTResidual & | kkt_residual, | ||
RiccatiFactorization & | factorization | ||
) |
Performs the backward Riccati recursion.
[in] | time_discretization | Time discretization. |
[in,out] | kkt_matrix | KKT matrix. |
[in,out] | kkt_residual | KKT residual. |
[in,out] | factorization | Riccati factorization. |
void robotoc::RiccatiRecursion::forwardRiccatiRecursion | ( | const TimeDiscretization & | time_discretization, |
const KKTMatrix & | kkt_matrix, | ||
const KKTResidual & | kkt_residual, | ||
const RiccatiFactorization & | factorization, | ||
Direction & | d | ||
) | const |
Performs the backward Riccati recursion.
[in] | time_discretization | Time discretization. |
[in] | kkt_matrix | KKT matrix. |
[in] | kkt_residual | KKT residual. |
[in,out] | factorization | Riccati factorization. |
[in] | d | Direction. |
const aligned_vector< LQRPolicy > & robotoc::RiccatiRecursion::getLQRPolicy | ( | ) | const |
Gets of the LQR policies over the horizon.
|
default |
Default copy operator.
|
defaultnoexcept |
Default move assign operator.
void robotoc::RiccatiRecursion::resizeData | ( | const TimeDiscretization & | time_discretization | ) |
Resizes the internal data.
[in] | time_discretization | Time discretization. |
void robotoc::RiccatiRecursion::setRegularization | ( | const double | max_dts0 | ) |
Sets the regularization on the STO.
[in] | max_dts0 | Maximum magnitude of the nominal direction of the switching time. Used in a heuristic regularization on the dynamic programming recursion. Must be positive. |