aligator
0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
|
Struct describing a stage of a constrained LQ problem. More...
#include <aligator/gar/lqr-problem.hpp>
Classes | |
struct | __view_base |
Public Types | |
using | MVec = ManagedMatrix<Scalar, Eigen::Dynamic, 1> |
using | MMat = ManagedMatrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> |
using | allocator_type = polymorphic_allocator |
template<typename T, bool Cond> | |
using | add_const_if_t = std::conditional_t<Cond, std::add_const_t<T>, T> |
using | view_t = __view_base<false> |
using | const_view_t = __view_base<true> |
Public Member Functions | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
view_t | to_view () |
Convert knot to an aggregate of Eigen::Map. | |
const_view_t | to_const_view () const |
Convert knot to an aggregate of Eigen::Map to const. | |
const_view_t | to_view () const |
operator view_t () | |
operator const_view_t () const | |
LqrKnotTpl (uint nx, uint nu, uint nc, uint nx2, uint nth, allocator_type alloc={}) | |
LqrKnotTpl (uint nx, uint nu, uint nc, uint nx2, allocator_type alloc={}) | |
Delegating constructor, assumes nth = 0. | |
LqrKnotTpl (uint nx, uint nu, uint nc, allocator_type alloc={}) | |
Delegating constructor, assumes nx2 = nx, and nth = 0. | |
LqrKnotTpl (const LqrKnotTpl &other, allocator_type alloc={}) | |
Copy constructor. Allocator must be given. | |
LqrKnotTpl (LqrKnotTpl &&other) | |
Move constructor. Allocator will be moved from other. Other will be have m_empty_after_move set to true. | |
LqrKnotTpl & | operator= (const LqrKnotTpl &other) |
Copy assignment. Current allocator will be reused if required. | |
LqrKnotTpl & | operator= (LqrKnotTpl &&) |
Move assignment. Other allocator will be stolen. | |
~LqrKnotTpl () | |
void | assign (const LqrKnotTpl< Scalar > &other) |
Assign matrices (and dimensions) from another LqrKnotTpl. | |
LqrKnotTpl & | addParameterization (uint nth) |
bool | isApprox (const LqrKnotTpl &other, Scalar prec=std::numeric_limits< Scalar >::epsilon()) const |
allocator_type | get_allocator () const |
Public Attributes | |
uint | nx |
uint | nu |
uint | nc |
uint | nx2 |
uint | nth |
MMat | Q |
MMat | S |
MMat | R |
MVec | q |
MVec | r |
MMat | A |
MMat | B |
MMat | E |
MVec | f |
MMat | C |
MMat | D |
MVec | d |
MMat | Gth |
MMat | Gx |
MMat | Gu |
MMat | Gv |
MVec | gamma |
Static Public Attributes | |
static constexpr int | Alignment = Eigen::AlignedMax |
Friends | |
bool | operator== (const LqrKnotTpl &lhs, const LqrKnotTpl &rhs) |
Struct describing a stage of a constrained LQ problem.
A LQ knot corresponding to cost
\[ \frac{1}{2} \begin{bmatrix}x \\ u\end{bmatrix}^\top \begin{bmatrix}Q & S \\ S^\top & R\end{bmatrix} \begin{bmatrix}x \\ u\end{bmatrix} + q^\top x + r^\top u \]
and constraints
\[ Ex' + Ax + Bu + f = 0, \quad Cx + Du + d = 0. \]
Definition at line 32 of file lqr-problem.hpp.
using aligator::gar::LqrKnotTpl< Scalar >::MVec = ManagedMatrix<Scalar, Eigen::Dynamic, 1> |
Definition at line 35 of file lqr-problem.hpp.
using aligator::gar::LqrKnotTpl< Scalar >::MMat = ManagedMatrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> |
Definition at line 36 of file lqr-problem.hpp.
using aligator::gar::LqrKnotTpl< Scalar >::allocator_type = polymorphic_allocator |
Definition at line 37 of file lqr-problem.hpp.
using aligator::gar::LqrKnotTpl< Scalar >::add_const_if_t = std::conditional_t<Cond, std::add_const_t<T>, T> |
Definition at line 59 of file lqr-problem.hpp.
using aligator::gar::LqrKnotTpl< Scalar >::view_t = __view_base<false> |
Definition at line 81 of file lqr-problem.hpp.
using aligator::gar::LqrKnotTpl< Scalar >::const_view_t = __view_base<true> |
Definition at line 82 of file lqr-problem.hpp.
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl | ( | uint | nx, |
uint | nu, | ||
uint | nc, | ||
uint | nx2, | ||
uint | nth, | ||
allocator_type | alloc = {} ) |
|
inline |
Delegating constructor, assumes nth = 0.
Definition at line 159 of file lqr-problem.hpp.
|
inline |
Delegating constructor, assumes nx2 = nx, and nth = 0.
Definition at line 163 of file lqr-problem.hpp.
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl | ( | const LqrKnotTpl< Scalar > & | other, |
allocator_type | alloc = {} ) |
Copy constructor. Allocator must be given.
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl | ( | LqrKnotTpl< Scalar > && | other | ) |
Move constructor. Allocator will be moved from other. Other will be have m_empty_after_move set to true.
aligator::gar::LqrKnotTpl< Scalar >::~LqrKnotTpl | ( | ) |
aligator::gar::LqrKnotTpl< Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS | ( | Scalar | ) |
|
inline |
Convert knot to an aggregate of Eigen::Map.
This is a convenience method for running computations.
Definition at line 87 of file lqr-problem.hpp.
|
inline |
Convert knot to an aggregate of Eigen::Map to const.
Definition at line 119 of file lqr-problem.hpp.
|
inline |
Definition at line 150 of file lqr-problem.hpp.
|
inline |
Definition at line 152 of file lqr-problem.hpp.
|
inline |
Definition at line 153 of file lqr-problem.hpp.
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::operator= | ( | const LqrKnotTpl< Scalar > & | other | ) |
Copy assignment. Current allocator will be reused if required.
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::operator= | ( | LqrKnotTpl< Scalar > && | ) |
Move assignment. Other allocator will be stolen.
void aligator::gar::LqrKnotTpl< Scalar >::assign | ( | const LqrKnotTpl< Scalar > & | other | ) |
Assign matrices (and dimensions) from another LqrKnotTpl.
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::addParameterization | ( | uint | nth | ) |
bool aligator::gar::LqrKnotTpl< Scalar >::isApprox | ( | const LqrKnotTpl< Scalar > & | other, |
Scalar | prec = std::numeric_limits< Scalar >::epsilon() ) const |
|
inline |
Definition at line 191 of file lqr-problem.hpp.
|
friend |
Definition at line 187 of file lqr-problem.hpp.
|
staticconstexpr |
Definition at line 34 of file lqr-problem.hpp.
uint aligator::gar::LqrKnotTpl< Scalar >::nx |
Definition at line 39 of file lqr-problem.hpp.
uint aligator::gar::LqrKnotTpl< Scalar >::nu |
Definition at line 40 of file lqr-problem.hpp.
uint aligator::gar::LqrKnotTpl< Scalar >::nc |
Definition at line 41 of file lqr-problem.hpp.
uint aligator::gar::LqrKnotTpl< Scalar >::nx2 |
Definition at line 42 of file lqr-problem.hpp.
uint aligator::gar::LqrKnotTpl< Scalar >::nth |
Definition at line 43 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::Q |
Definition at line 45 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::S |
Definition at line 45 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::R |
Definition at line 45 of file lqr-problem.hpp.
MVec aligator::gar::LqrKnotTpl< Scalar >::q |
Definition at line 46 of file lqr-problem.hpp.
MVec aligator::gar::LqrKnotTpl< Scalar >::r |
Definition at line 46 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::A |
Definition at line 47 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::B |
Definition at line 47 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::E |
Definition at line 47 of file lqr-problem.hpp.
MVec aligator::gar::LqrKnotTpl< Scalar >::f |
Definition at line 48 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::C |
Definition at line 49 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::D |
Definition at line 49 of file lqr-problem.hpp.
MVec aligator::gar::LqrKnotTpl< Scalar >::d |
Definition at line 50 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::Gth |
Definition at line 52 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::Gx |
Definition at line 53 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::Gu |
Definition at line 54 of file lqr-problem.hpp.
MMat aligator::gar::LqrKnotTpl< Scalar >::Gv |
Definition at line 55 of file lqr-problem.hpp.
MVec aligator::gar::LqrKnotTpl< Scalar >::gamma |
Definition at line 56 of file lqr-problem.hpp.