aligator  0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
dense-riccati.hpp
Go to the documentation of this file.
1
4#pragma once
5
6#include "riccati-base.hpp"
7#include "dense-kernel.hpp"
8
9namespace aligator::gar {
10
15template <typename _Scalar>
16class RiccatiSolverDense : public RiccatiSolverBase<_Scalar> {
17public:
18 using Scalar = _Scalar;
26 using Data = typename Kernel::Data;
27
28 std::vector<Data> stage_factors;
29 std::vector<MatrixXs> Pxx;
30 std::vector<MatrixXs> Pxt;
31 std::vector<MatrixXs> Ptt;
32 std::vector<VectorXs> px;
33 std::vector<VectorXs> pt;
34 struct {
37 BlkMatrix<MatrixXs, 2, 1> fth; // parametric rhs
40 VectorXs thGrad;
41 MatrixXs thHess;
42
43 explicit RiccatiSolverDense(const LqrProblemTpl<Scalar> &problem);
44
45 bool backward(const Scalar mudyn, const Scalar mueq);
46
47 bool forward(std::vector<VectorXs> &xs, std::vector<VectorXs> &us,
48 std::vector<VectorXs> &vs, std::vector<VectorXs> &lbdas,
49 const std::optional<ConstVectorRef> &theta = std::nullopt) const;
50
51 void cycleAppend(const KnotType &knot);
52 VectorRef getFeedforward(size_t i) { return stage_factors[i].ff; }
53 RowMatrixRef getFeedback(size_t i) { return stage_factors[i].fb; }
54
55protected:
57};
58
59#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
60extern template class RiccatiSolverDense<context::Scalar>;
61#endif
62} // namespace aligator::gar
Block matrix class, with a fixed-size number of row and column blocks.
A stagewise-dense Riccati solver. This algorithm uses a dense Bunch-Kaufman factorization at every st...
void cycleAppend(const KnotType &knot)
BlkMatrix< VectorXs, 4, 1 > BlkVec4
BlkMatrix< VectorXs, 2, 1 > ff
BlkMatrix< RowMatrixXs, 4, 1 > BlkRowMat41
RiccatiSolverBase< Scalar > Base
struct aligator::gar::RiccatiSolverDense::@331356351357076052247076001133223062057032131163 kkt0
bool forward(std::vector< VectorXs > &xs, std::vector< VectorXs > &us, std::vector< VectorXs > &vs, std::vector< VectorXs > &lbdas, const std::optional< ConstVectorRef > &theta=std::nullopt) const
BlkMatrix< MatrixXs, 4, 4 > BlkMat44
BlkMatrix< MatrixXs, 2, 2 > mat
const LqrProblemTpl< Scalar > * problem_
BlkMatrix< MatrixXs, 2, 1 > fth
RiccatiSolverDense(const LqrProblemTpl< Scalar > &problem)
Eigen::BunchKaufman< MatrixXs > ldl
RowMatrixRef getFeedback(size_t i)
bool backward(const Scalar mudyn, const Scalar mueq)
A dense Bunch-Kaufman based kernel.
Struct describing a stage of a constrained LQ problem.