38 Eigen::VectorXd &lb = getLowerBounds();
39 Eigen::VectorXd &ub = getUpperBounds();
41 I.resize (loc_var.length_);
42 lb.resize(loc_var.length_);
43 ub.resize(loc_var.length_);
45 for (std::size_t i = 0; i < loc_var.length_/2; ++i)
47 I[i*2] = loc_var.offset_ + i*2;
48 I[i*2+1] = loc_var.offset_ + i*2 + 1;
71 if (getActualActiveSet().size() == 0)
78 "The number of base velocity variables is not supposed to change.");
80 getActiveSetGuess() = getActualActiveSet();
Abstract base class (for control problems)
static const char * BASE_VEL_VARIABLES_ID
std::size_t getPreviewHorizonLength() const
Get preview horizon length.
virtual void guessActiveSet(const humoto::SolutionStructure &sol_structure, const humoto::Model &model_base, const humoto::ControlProblem &control_problem)
Initialize active set guess with defaults.
#define HUMOTO_ASSERT(condition, message)
Analog of 'sol_structure' struct in Octave code. [determine_solution_structure.m].
Eigen::Matrix< unsigned int, Eigen::Dynamic, 1 > IndexVector
void guessActiveSet(const humoto::SolutionStructure &sol_structure, const humoto::Model &model_base, const humoto::ControlProblem &control_problem)
Initialize active set guess with defaults.
Task for bounding base velocity to a square.
std::size_t sampling_time_ms_
Sampling time in milliseconds (T_ms)
std::size_t subsampling_time_ms_
Subsampling time in milliseconds (Ts_ms)
Location getSolutionPartLocation(const std::string &id) const
Get location of a data in the solution vector.
etools::Matrix2 getNominalBaseVelocityBounds(const std::size_t interval_index) const
Get nominal base velocity bounds for a given interval.
The root namespace of HuMoTo.
Instances of this class are passed to a virtual method 'humoto::TaskBase::form()', so even though this class is basically useless in its present form we cannot avoid its definition using a template.
void form(const humoto::SolutionStructure &sol_structure, const humoto::Model &model_base, const humoto::ControlProblem &control_problem)
Form the task.
Location of a data chunk (offset + length).