10#include <proxsuite-nlp/modelling/constraints.hpp>
14template <
typename Scalar>
16 std::vector<xyz::polymorphic<ConstraintSetTpl<Scalar>>> components;
17 for (
size_t i = 0; i < constraints.size(); i++) {
18 components.push_back(constraints.sets[i]);
20 return proxsuite::nlp::ConstraintSetProductTpl<Scalar>{components,
32 using VecBool = Eigen::Matrix<bool, Eigen::Dynamic, 1>;
47 std::vector<VectorXs>
Lxs;
48 std::vector<VectorXs>
Lus;
49 std::vector<VectorXs>
Lvs;
50 std::vector<VectorXs>
Lds;
82 std::vector<VectorXs>
dxs;
83 std::vector<VectorXs>
dus;
84 std::vector<VectorXs>
dvs;
121 template <
typename T>
126template <
typename Scalar>
128 oss <<
"Workspace {" << fmt::format(
"\n nsteps: {:d}", self.
nsteps)
129 << fmt::format(
"\n n_multipliers: {:d}", self.
lams_pdal.size());
136template <
typename Scalar>
137struct fmt::formatter<
aligator::WorkspaceTpl<Scalar>> : fmt::ostream_formatter {
140#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
141#include "./workspace.txx"
Block matrix class, with a fixed-size number of row and column blocks.
std::ostream & operator<<(std::ostream &oss, const ExplicitDynamicsDataTpl< S > &self)
auto getConstraintProductSet(const ConstraintStackTpl< Scalar > &constraints)
Convenience class to manage a stack of constraints.
Data struct for stage models StageModelTpl.
A stage in the control problem.
Trajectory optimization problem.
Base workspace struct for the algorithms.
std::size_t nsteps
Number of steps in the problem.
std::vector< VectorXs > trial_us
TrajOptDataTpl< Scalar > problem_data
Problem data.
std::vector< VectorXs > dyn_slacks
Dynamical infeasibility gaps.
std::vector< VectorXs > trial_xs
Workspace for solver SolverProxDDP.
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
WorkspaceTpl(const WorkspaceTpl &)=delete
VectorXs state_dual_infeas
Dual infeasibility in the states for each stage of the problem.
gar::LQRProblemTpl< Scalar > lqr_problem
std::vector< VectorXs > dlams
std::vector< VectorXs > dvs
std::size_t nsteps
Number of steps in the problem.
std::vector< VectorXs > trial_lams
std::vector< VectorXs > vs_plus
std::vector< VecBool > active_constraints
Masks for active constraint sets.
friend std::ostream & operator<<(std::ostream &oss, const WorkspaceTpl< T > &self)
LQRProblemType::KnotVector knots
std::vector< VectorXs > dxs
std::vector< VectorXs > lams_plus
std::vector< VectorXs > Lus
std::vector< VectorXs > shifted_constraints
Shifted constraints the projection operators should be applied to.
std::vector< VectorXs > prev_lams
std::vector< VectorXs > Lxs
WorkspaceTpl(const TrajOptProblemTpl< Scalar > &problem)
std::vector< VectorXs > Lvs
std::vector< VectorXs > lams_pdal
Eigen::Matrix< bool, Eigen::Dynamic, 1 > VecBool
VectorXs stage_cstr_violations
Constraint violation measures for each stage and constraint.
std::vector< BlkJacobianType > cstr_proj_jacs
Projected path constraint Jacobians (used to symmetrize the LQ subproblem)
std::vector< VectorXs > vs_pdal
std::vector< VectorXs > prev_vs
std::vector< VectorXs > prev_us
std::vector< VectorXs > dus
VectorXs stage_inner_crits
Subproblem termination criterion for each stage.
std::vector< VectorXs > stage_infeasibilities
Stagewise infeasibilities.
WorkspaceTpl & operator=(const WorkspaceTpl &)=delete
WorkspaceTpl & operator=(WorkspaceTpl &&)=default
std::vector< ConstraintSetProduct > cstr_product_sets
Cartesian products of the constraint sets of each stage.
proxsuite::nlp::ConstraintSetProductTpl< Scalar > ConstraintSetProduct
std::vector< VectorXs > cstr_lu_corr
Scalar inner_criterion
Overall subproblem termination criterion.
std::vector< VectorXs > prev_xs
std::vector< VectorXs > cstr_lx_corr
WorkspaceTpl(WorkspaceTpl &&)=default
void cycleAppend(const TrajOptProblemTpl< Scalar > &problem, shared_ptr< StageDataTpl< Scalar > > data)
VectorXs control_dual_infeas
Dual infeasibility in the controls for each stage of the problem.
std::vector< VectorXs > trial_vs
std::vector< VectorXs > Lds
Struct describing a stage of a constrained LQ problem.
std::vector< KnotType > KnotVector