8#include "aligator/tracy.hpp"
10#ifdef ALIGATOR_MULTITHREADING
25template <
typename _Scalar>
37 const uint num_threads);
50 K.noalias() -= Kth * Up1t;
61 std::pmr::vector<BunchKaufman<ArMat>>
ldlt;
75 forward(VectorOfVectors &xs, VectorOfVectors &us, VectorOfVectors &vs,
76 VectorOfVectors &lbdas,
77 const std::optional<ConstVectorRef> & = std::nullopt)
const override;
85 std::pmr::vector<StageFactor<Scalar>>
datas;
110template <
typename Scalar>
114#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
Block matrix class, with a fixed or dynamic-size number of row and column blocks.
A parallel-condensing LQ solver.
Scalar condensedThreshold
Tolerance on condensed KKT system.
ArenaMatrix< VectorXs > condensedErr
ParallelRiccatiSolver(LqrProblemTpl< Scalar > &problem, const uint num_threads)
ProximalRiccatiKernel< Scalar > Kernel
void collapseFeedback() override
uint getNumThreads() const noexcept
Number of parallel divisions in the problem: in the math.
std::vector< long > rhsDims_
BlkMatrix< VectorRef, -1, 1 > BlkView
bool backward(const Scalar mueq) override
VectorRef getFeedforward(size_t i) override
ALIGATOR_DYNAMIC_TYPEDEFS_WITH_ROW_TYPES(Scalar)
uint maxRefinementSteps
Max number of refinement steps (condensed solver)
void initializeTridiagSystem()
Initialize the buffers for the block-tridiagonal system.
void assembleCondensedSystem(const Scalar mudyn)
Create the sparse representation of the reduced KKT system.
RowMatrixRef getFeedback(size_t i) override
ArenaMatrix< VectorXs > condensedKktRhs
Contains the right-hand side and solution of the condensed KKT system.
allocator_type get_allocator() const
CondensedKkt condensedKktSystem
Block-sparse condensed KKT system.
::aligator::polymorphic_allocator allocator_type
std::pmr::vector< StageFactor< Scalar > > datas
LqrKnotTpl< Scalar > KnotType
ArenaMatrix< VectorXs > condensedKktSolution
void cycleAppend(const KnotType &knot) override
Cycle the solver data, given the specs from a given new knot.
RiccatiSolverBase< Scalar > Base
bool forward(VectorOfVectors &xs, VectorOfVectors &us, VectorOfVectors &vs, VectorOfVectors &lbdas, const std::optional< ConstVectorRef > &=std::nullopt) const override
LqrProblemTpl< Scalar > * problem_
A convenience subclass of std::pmr::polymorphic_allocator for bytes.
ParallelRiccatiSolver(LqrProblemTpl< Scalar > &, const uint) -> ParallelRiccatiSolver< Scalar >
Struct describing a stage of a constrained LQ problem.
ArenaMatrix< MatrixXs > ArMat
std::pmr::vector< ArMat > diagonal
std::pmr::vector< ArMat > diagonalFacs
std::pmr::vector< ArMat > superdiagonal
std::pmr::vector< ArMat > upFacs
std::pmr::vector< ArMat > subdiagonal
CondensedKkt(const allocator_type &alloc)
std::pmr::vector< BunchKaufman< ArMat > > ldlt
Kernel for use in Riccati-like algorithms for the proximal LQ subproblem.
Per-node struct for all computations in the factorization.
BlkMatrix< RowMatrixXs, 3, 1 > fb
BlkMatrix< RowMatrixXs, 3, 1 > fth