14 template<
class SystemType,
class SolverType> requires
15 std::derived_from<SystemType, System<SystemType::NUM_STATES, SystemType::NUM_CONT_INPUTS, SystemType::NUM_BIN_INPUTS>> &&
16 std::derived_from<SolverType, Solver<SystemType, SolverType::PRED_STEPS, SolverType::MIN_STEPS_ON, SolverType::MIN_STEPS_OFF, SolverType::MAX_STEPS_ON, SolverType::NUM_STEPS_SOLVER_DELAY, SolverType::INTEGRATION_SCHEME>>
19 using SYSTEM_TYPE = SystemType;
20 using SOLVER_TYPE = SolverType;
23 Eigen::Matrix<double, SystemType::NUM_STATES, SolverType::PRED_STEPS + 1, Eigen::RowMajor> last_x_;
24 Eigen::Matrix<double, SystemType::NUM_CONT_INPUTS +
25 SystemType::NUM_BIN_INPUTS, SolverType::PRED_STEPS, Eigen::RowMajor> last_u_;
27 SystemType::NUM_CONT_INPUTS + SystemType::NUM_BIN_INPUTS,
28 SolverType::history_depth + SolverType::NUM_STEPS_SOLVER_DELAY> history_;
35 explicit MPC(SolverType &solver);
48 virtual ~
MPC() =
default;
Abstract class that represents any solver interface and provides a low-lever mpc solver interface.
SOLVER_RETURN
Definition: Solver.hpp:18
SOLVER_RETURN control(const SystemType::StateVec &state, SystemType::InputVec &input, std::string &stats)