10#include <eigenpy/std-array.hpp>
20using context::MatrixXs;
22using context::VectorXs;
34 eigenpy::StdArrayPythonVisitor<std::array<long, 1>,
true>::expose(
36 eigenpy::StdArrayPythonVisitor<std::array<long, 2>,
true>::expose(
38 eigenpy::StdArrayPythonVisitor<std::array<long, 4>,
true>::expose(
42#ifdef ALIGATOR_WITH_CHOLMOD
44void exposeCholmodSolver();
57 bp::scope ns = get_namespace(
"gar");
61 bp::class_<knot_t>(
"LQRKnot", bp::no_init)
62 .def(bp::init<uint, uint, uint>((
"nx"_a,
"nu",
"nc")))
63 .def(bp::init<uint, uint, uint, uint>((
"nx"_a,
"nu",
"nc",
"nx2")))
91 (
"self"_a,
"prec"_a = std::numeric_limits<Scalar>::epsilon()))
96 StdVectorPythonVisitor<knot_vec_t, false>::expose(
"StdVec_LQRKnot");
98 bp::class_<lqr_t>(
"LQRProblem", bp::no_init)
99 .def(bp::init<const knot_vec_t &, long>((
"self"_a,
"stages",
"nc0")))
105 "Whether the problem is initialized.")
107 "Whether the problem is parameterized.")
112 (
"self"_a,
"xs",
"us",
"theta"_a = std::nullopt),
113 "Evaluate the problem objective.")
116 bp::class_<riccati_base_t, boost::noncopyable>(
"RiccatiSolverBase",
120 (
"self"_a,
"xs",
"us",
"vs",
"lbdas",
"theta"_a = std::nullopt));
124#ifdef ALIGATOR_WITH_CHOLMOD
125 exposeCholmodSolver();
virtual bool backward(const Scalar mudyn, const Scalar mueq)=0
virtual 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=0
Eigen::Transpose< MatrixXs >::PlainMatrix RowMatrixXs
void exposeGAR()
Expose GAR module.
RiccatiSolverBase< Scalar > riccati_base_t
lqr_t::KnotVector knot_vec_t
void exposeParallelSolver()
static void exposeBlockMatrices()
Struct describing a stage of a constrained LQ problem.
bool isApprox(const LQRKnotTpl &other, Scalar prec=std::numeric_limits< Scalar >::epsilon()) const
bool isInitialized() const
std::vector< KnotType > KnotVector
bool isParameterized() const
void addParameterization(uint nth)
Scalar evaluate(const VectorOfVectors &xs, const VectorOfVectors &us, const std::optional< ConstVectorRef > &theta_) const
Evaluate the quadratic objective.
int horizon() const noexcept