aligator  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
utils.hpp File Reference
#include "lqr-problem.hpp"
#include "aligator/third-party/boost/core/span.hpp"
#include <Eigen/SparseCore>
Include dependency graph for utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  aligator
 Main package namespace.
 
namespace  aligator::gar
 
namespace  aligator::gar::helpers
 

Functions

template<typename InType , typename OutScalar >
void aligator::gar::helpers::sparseAssignDenseBlock (Eigen::Index i0, Eigen::Index j0, const Eigen::DenseBase< InType > &input, Eigen::SparseMatrix< OutScalar > &out, bool update)
 Helper to assign a dense matrix into a range of coefficients of a sparse matrix.
 
template<typename Scalar >
void aligator::gar::helpers::sparseAssignDiagonal (Eigen::Index i0, Eigen::Index i1, Scalar value, Eigen::SparseMatrix< Scalar > &out, bool update)
 
template<typename Scalar >
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)
 
template<typename Scalar >
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)
 
template<typename Scalar >
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.
 
template<typename Scalar >
uint aligator::gar::lqrNumRows (const LQRProblemTpl< Scalar > &problem)
 Compute the number of rows in the problem matrix.
 
template<typename Scalar >
auto aligator::gar::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 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)
 Convert dense RHS solution to its trajectory [x,u,v,lambda] solution.
 
template<typename Scalar >
auto aligator::gar::lqrInitializeSolution (const LQRProblemTpl< Scalar > &problem)