52 problem_data.stage_data.pop_back();
58template <
typename Scalar>
60 const TrajOptProblemTpl<Scalar> &problem)
61 : m_isInitialized(true), nsteps(problem.numSteps()), problem_data(problem) {
79#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
80#include "./workspace-base.txx"
void rotate_vec_left(std::vector< T, Alloc > &v, long n_head=0, long n_tail=0)
Simply rotate an entire std::vector to the left.
void us_default_init(const TrajOptProblemTpl< Scalar > &problem, std::vector< typename math_types< Scalar >::VectorXs > &us)
Default-initialize a controls trajectory from the neutral element of each control space.
void xs_default_init(const TrajOptProblemTpl< Scalar > &problem, std::vector< typename math_types< Scalar >::VectorXs > &xs)
Default-intialize a trajectory to the neutral states for each state space at each stage.
Common utilities for all solvers.
std::vector< shared_ptr< StageData > > stage_data
Data structs for each stage of the problem.
Base workspace struct for the algorithms.
std::size_t nsteps
Number of steps in the problem.
bool isInitialized() const
std::vector< VectorXs > trial_us
~WorkspaceBaseTpl()=default
TrajOptDataTpl< Scalar > problem_data
Problem data.
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
void cycleLeft()
Cycle the workspace data to the left.
std::vector< VectorXs > dyn_slacks
Dynamical infeasibility gaps.
void cycleAppend(shared_ptr< StageDataTpl< Scalar > > data)
Same as cycleLeft(), but add a StageDataTpl to problem_data.
std::vector< VectorXs > trial_xs