aligator
0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
|
Namespaces | |
namespace | helpers |
Classes | |
struct | LQRKnotTpl |
Struct describing a stage of a constrained LQ problem. More... | |
struct | LQRProblemTpl |
struct | ProximalRiccatiKernel |
Kernel for use in Riccati-like algorithms for the proximal LQ subproblem. More... | |
class | ProximalRiccatiSolver |
A Riccati-like solver for the proximal LQ subproblem in ProxDDP. More... | |
class | RiccatiSolverBase |
class | RiccatiSolverDense |
A stagewise-dense Riccati solver. This algorithm uses a dense Bunch-Kaufman factorization at every stage. More... | |
struct | StageFactor |
Per-node struct for all computations in the factorization. More... | |
struct | workrange_t |
Typedefs | |
using | uint = unsigned int |
Functions | |
template<typename MatrixType > | |
MatrixType::PlainObject | blockTridiagToDenseMatrix (const std::vector< MatrixType > &subdiagonal, const std::vector< MatrixType > &diagonal, const std::vector< MatrixType > &superdiagonal) |
template<typename MatrixType , typename InputType , typename OutType , typename Scalar = typename MatrixType::Scalar> | |
bool | blockTridiagMatMul (const std::vector< MatrixType > &Asub, const std::vector< MatrixType > &Adiag, const std::vector< MatrixType > &Asuper, const BlkMatrix< InputType, -1, 1 > &b, BlkMatrix< OutType, -1, 1 > &c, const Scalar beta) |
template<typename MatrixType , typename RhsType , typename DecType > | |
bool | symmetricBlockTridiagSolve (std::vector< MatrixType > &subdiagonal, std::vector< MatrixType > &diagonal, const std::vector< MatrixType > &superdiagonal, BlkMatrix< RhsType, -1, 1 > &rhs, std::vector< DecType > &facs) |
Solve a symmetric block-tridiagonal \(Ax=b\) problem by in-place factorization. The subdiagonal will be used to store factorization coefficients. | |
template<typename MatrixType , typename RhsType , typename DecType > | |
bool | blockTridiagRefinementStep (const std::vector< MatrixType > &transposedUfacs, const std::vector< MatrixType > &superdiagonal, const std::vector< DecType > &diagonalFacs, BlkMatrix< RhsType, -1, 1 > &rhs) |
Given the decomposed matrix data, just perform the backward-forward step of the algorithm. | |
template<typename MatrixType , typename RhsType , typename DecType > | |
bool | symmetricBlockTridiagSolveDownLooking (std::vector< MatrixType > &subdiagonal, std::vector< MatrixType > &diagonal, std::vector< MatrixType > &superdiagonal, BlkMatrix< RhsType, -1, 1 > &rhs, std::vector< DecType > &facs) |
Solve a symmetric block-tridiagonal \(Ax=b\) problem by in-place factorization. The subdiagonal will be used to store factorization coefficients. This version starts by looking down from the top-left corner of the matrix. | |
template<typename Scalar > | |
std::ostream & | operator<< (std::ostream &oss, const LQRKnotTpl< Scalar > &self) |
template<class T , class A > | |
boost::span< T > | make_span_from_indices (std::vector< T, A > &vec, size_t i0, size_t i1) |
Create a boost::span object from a vector and two indices. | |
template<class T , class A > | |
boost::span< const T > | make_span_from_indices (const std::vector< T, A > &vec, size_t i0, size_t i1) |
Create a boost::span object from a vector and two indices. | |
template<typename Scalar > | |
void | lqrCreateSparseMatrix (const LQRProblemTpl< Scalar > &problem, const Scalar mudyn, const Scalar mueq, Eigen::SparseMatrix< Scalar > &mat, Eigen::Matrix< Scalar, -1, 1 > &rhs, bool update) |
template<typename Scalar > | |
std::array< Scalar, 3 > | lqrComputeKktError (const LQRProblemTpl< Scalar > &problem, boost::span< const typename math_types< Scalar >::VectorXs > xs, boost::span< const typename math_types< Scalar >::VectorXs > us, boost::span< const typename math_types< Scalar >::VectorXs > vs, boost::span< const typename math_types< Scalar >::VectorXs > lbdas, const Scalar mudyn, const Scalar mueq, const std::optional< typename math_types< Scalar >::ConstVectorRef > &theta_, bool verbose=false) |
template<typename Scalar > | |
bool | lqrDenseMatrix (const LQRProblemTpl< Scalar > &problem, Scalar mudyn, Scalar mueq, typename math_types< Scalar >::MatrixXs &mat, typename math_types< Scalar >::VectorXs &rhs) |
Fill in a KKT constraint matrix and vector for the given LQ problem with the given dual-regularization parameters mudyn and mueq . | |
template<typename Scalar > | |
uint | lqrNumRows (const LQRProblemTpl< Scalar > &problem) |
Compute the number of rows in the problem matrix. | |
template<typename Scalar > | |
auto | lqrDenseMatrix (const LQRProblemTpl< Scalar > &problem, Scalar mudyn, Scalar mueq) |
Fill in a KKT constraint matrix and vector for the given LQ problem with the given dual-regularization parameters mudyn and mueq . | |
template<typename Scalar > | |
void | lqrDenseSolutionToTraj (const LQRProblemTpl< Scalar > &problem, const typename math_types< Scalar >::ConstVectorRef solution, std::vector< typename math_types< Scalar >::VectorXs > &xs, std::vector< typename math_types< Scalar >::VectorXs > &us, std::vector< typename math_types< Scalar >::VectorXs > &vs, std::vector< typename math_types< Scalar >::VectorXs > &lbdas) |
Convert dense RHS solution to its trajectory [x,u,v,lambda] solution. | |
template<typename Scalar > | |
auto | lqrInitializeSolution (const LQRProblemTpl< Scalar > &problem) |
workrange_t | get_work (uint horz, uint tid, uint num_threads) |
template void | lqrCreateSparseMatrix< context::Scalar > (const LQRProblemTpl< context::Scalar > &problem, const context::Scalar mudyn, const context::Scalar mueq, Eigen::SparseMatrix< context::Scalar > &mat, context::VectorXs &rhs, bool update) |
template std::array< context::Scalar, 3 > | lqrComputeKktError< context::Scalar > (const LQRProblemTpl< context::Scalar > &, boost::span< const context::VectorXs >, boost::span< const context::VectorXs >, boost::span< const context::VectorXs >, boost::span< const context::VectorXs >, const context::Scalar, const context::Scalar, const std::optional< context::ConstVectorRef > &, bool) |
template auto | lqrDenseMatrix< context::Scalar > (const LQRProblemTpl< context::Scalar > &, context::Scalar, context::Scalar) |
using aligator::gar::uint = unsigned int |
MatrixType::PlainObject aligator::gar::blockTridiagToDenseMatrix | ( | const std::vector< MatrixType > & | subdiagonal, |
const std::vector< MatrixType > & | diagonal, | ||
const std::vector< MatrixType > & | superdiagonal ) |
Definition at line 14 of file block-tridiagonal.hpp.
bool aligator::gar::blockTridiagMatMul | ( | const std::vector< MatrixType > & | Asub, |
const std::vector< MatrixType > & | Adiag, | ||
const std::vector< MatrixType > & | Asuper, | ||
const BlkMatrix< InputType, -1, 1 > & | b, | ||
BlkMatrix< OutType, -1, 1 > & | c, | ||
const Scalar | beta ) |
Definition at line 50 of file block-tridiagonal.hpp.
bool aligator::gar::symmetricBlockTridiagSolve | ( | std::vector< MatrixType > & | subdiagonal, |
std::vector< MatrixType > & | diagonal, | ||
const std::vector< MatrixType > & | superdiagonal, | ||
BlkMatrix< RhsType, -1, 1 > & | rhs, | ||
std::vector< DecType > & | facs ) |
Solve a symmetric block-tridiagonal \(Ax=b\) problem by in-place factorization. The subdiagonal will be used to store factorization coefficients.
Definition at line 79 of file block-tridiagonal.hpp.
bool aligator::gar::blockTridiagRefinementStep | ( | const std::vector< MatrixType > & | transposedUfacs, |
const std::vector< MatrixType > & | superdiagonal, | ||
const std::vector< DecType > & | diagonalFacs, | ||
BlkMatrix< RhsType, -1, 1 > & | rhs ) |
Given the decomposed matrix data, just perform the backward-forward step of the algorithm.
transposedUfacs | - transposed U factors in the decomposition |
superdiagonal | - superdiagonal of the original matrix |
diagonalFacs | - diagonal factor decompositions |
Definition at line 143 of file block-tridiagonal.hpp.
bool aligator::gar::symmetricBlockTridiagSolveDownLooking | ( | std::vector< MatrixType > & | subdiagonal, |
std::vector< MatrixType > & | diagonal, | ||
std::vector< MatrixType > & | superdiagonal, | ||
BlkMatrix< RhsType, -1, 1 > & | rhs, | ||
std::vector< DecType > & | facs ) |
Solve a symmetric block-tridiagonal \(Ax=b\) problem by in-place factorization. The subdiagonal will be used to store factorization coefficients. This version starts by looking down from the top-left corner of the matrix.
Definition at line 182 of file block-tridiagonal.hpp.
std::ostream & aligator::gar::operator<< | ( | std::ostream & | oss, |
const LQRKnotTpl< Scalar > & | self ) |
Definition at line 110 of file lqr-problem.hpp.
|
inline |
Create a boost::span object from a vector and two indices.
Definition at line 22 of file riccati-impl.hpp.
|
inline |
Create a boost::span object from a vector and two indices.
Definition at line 29 of file riccati-impl.hpp.
void aligator::gar::lqrCreateSparseMatrix | ( | const LQRProblemTpl< Scalar > & | problem, |
const Scalar | mudyn, | ||
const Scalar | mueq, | ||
Eigen::SparseMatrix< Scalar > & | mat, | ||
Eigen::Matrix< Scalar, -1, 1 > & | rhs, | ||
bool | update ) |
std::array< Scalar, 3 > aligator::gar::lqrComputeKktError | ( | const LQRProblemTpl< Scalar > & | problem, |
boost::span< const typename math_types< Scalar >::VectorXs > | xs, | ||
boost::span< const typename math_types< Scalar >::VectorXs > | us, | ||
boost::span< const typename math_types< Scalar >::VectorXs > | vs, | ||
boost::span< const typename math_types< Scalar >::VectorXs > | lbdas, | ||
const Scalar | mudyn, | ||
const Scalar | mueq, | ||
const std::optional< typename math_types< Scalar >::ConstVectorRef > & | theta_, | ||
bool | verbose = false ) |
bool aligator::gar::lqrDenseMatrix | ( | const LQRProblemTpl< Scalar > & | problem, |
Scalar | mudyn, | ||
Scalar | mueq, | ||
typename math_types< Scalar >::MatrixXs & | mat, | ||
typename math_types< Scalar >::VectorXs & | rhs ) |
Fill in a KKT constraint matrix and vector for the given LQ problem with the given dual-regularization parameters mudyn
and mueq
.
uint aligator::gar::lqrNumRows | ( | const LQRProblemTpl< Scalar > & | problem | ) |
auto aligator::gar::lqrDenseMatrix | ( | const LQRProblemTpl< Scalar > & | problem, |
Scalar | mudyn, | ||
Scalar | mueq ) |
void aligator::gar::lqrDenseSolutionToTraj | ( | const LQRProblemTpl< Scalar > & | problem, |
const typename math_types< Scalar >::ConstVectorRef | solution, | ||
std::vector< typename math_types< Scalar >::VectorXs > & | xs, | ||
std::vector< typename math_types< Scalar >::VectorXs > & | us, | ||
std::vector< typename math_types< Scalar >::VectorXs > & | vs, | ||
std::vector< typename math_types< Scalar >::VectorXs > & | lbdas ) |
auto aligator::gar::lqrInitializeSolution | ( | const LQRProblemTpl< Scalar > & | problem | ) |
|
inline |
template void aligator::gar::lqrCreateSparseMatrix< context::Scalar > | ( | const LQRProblemTpl< context::Scalar > & | problem, |
const context::Scalar | mudyn, | ||
const context::Scalar | mueq, | ||
Eigen::SparseMatrix< context::Scalar > & | mat, | ||
context::VectorXs & | rhs, | ||
bool | update ) |
template std::array< context::Scalar, 3 > aligator::gar::lqrComputeKktError< context::Scalar > | ( | const LQRProblemTpl< context::Scalar > & | , |
boost::span< const context::VectorXs > | , | ||
boost::span< const context::VectorXs > | , | ||
boost::span< const context::VectorXs > | , | ||
boost::span< const context::VectorXs > | , | ||
const context::Scalar | , | ||
const context::Scalar | , | ||
const std::optional< context::ConstVectorRef > & | , | ||
bool | ) |
template auto aligator::gar::lqrDenseMatrix< context::Scalar > | ( | const LQRProblemTpl< context::Scalar > & | , |
context::Scalar | , | ||
context::Scalar | ) |