MPC¶
ssqp::solvers::MPC is a thin helper around ssqp for receding-horizon control. See
MPC in Concepts for the conceptual explanation. The reference below is generated directly from
include/solvers/mpc.hpp's own doc comments.
Class ssqp::solvers::MPC¶
ClassList > ssqp > solvers > MPC
#include <mpc.hpp>
Classes¶
| Type | Name |
|---|---|
| struct | Params |
Public Functions¶
| Type | Name |
|---|---|
| MPC (model::Model & model, const Params & params=Params::Default(), const ssqp::Params & ssqp_params=ssqp::Params::Default()) |
|
| MatX | feedbackGain (const uint k) const |
| const std::vector< ssqp::ConvergenceData > | getConvergenceData () const |
| void | reinitialize (const VecX & state) |
| void | reinitialize (const FlatVec & states, const FlatVec & controls) |
| void | reinitialize (const std::vector< VecX > & states, const std::vector< VecX > & controls) |
| std::pair< FlatVec, FlatVec > | step (const VecX & state) |
| std::pair< FlatVec, FlatVec > | step (const FlatVec & states, const FlatVec & controls) |
| std::pair< FlatVec, FlatVec > | step (const std::vector< VecX > & states, const std::vector< VecX > & controls) |
| std::pair< FlatVec, FlatVec > | step () |
Detailed Description¶
MPC class Helper class which utilizes SSQP to perform MPC for real-time SSQP-based control.
Repeatedly uses SSQP with low iterations to solve a problem for the current state of a system, applies the first of the generated controls, updates the initial guess using feedback from the system and a warm start using the previous solution and repeats the process.
Public Functions Documentation¶
function MPC¶
ssqp::solvers::MPC::MPC (
model::Model & model,
const Params & params=Params::Default(),
const ssqp::Params & ssqp_params=ssqp::Params::Default()
)
function feedbackGain¶
function getConvergenceData¶
function reinitialize [1/3]¶
function reinitialize [2/3]¶
function reinitialize [3/3]¶
void ssqp::solvers::MPC::reinitialize (
const std::vector< VecX > & states,
const std::vector< VecX > & controls
)
function step [1/4]¶
function step [2/4]¶
std::pair< FlatVec, FlatVec > ssqp::solvers::MPC::step (
const FlatVec & states,
const FlatVec & controls
)
function step [3/4]¶
std::pair< FlatVec, FlatVec > ssqp::solvers::MPC::step (
const std::vector< VecX > & states,
const std::vector< VecX > & controls
)
function step [4/4]¶
The documentation for this class was generated from the following file /home/runner/work/ssqp/ssqp/include/solvers/mpc.hpp