- 3.0.2 optimal control module.
|
#include <MpcTimeHorizon.h>
Public Member Functions | |
MpcTimeHorizon (const mpc_settings &settings, const SCALAR &initialTimeHorizon) | |
virtual | ~MpcTimeHorizon () |
virtual bool | computeNewTimeHorizon (const SCALAR &t_since_ended_first_solve, const SCALAR &t_forward_prediction_stop, SCALAR &new_T) |
compute new MPC time horizon More... | |
void | updateSettings (const mpc_settings &mpcsettings) |
void | updateInitialTimeHorizon (const SCALAR &initTimeHorizon) |
update the time horizon which is used during the first call to the solver More... | |
Protected Attributes | |
mpc_settings | mpc_settings_ |
SCALAR | initialTimeHorizon_ |
This class implements the four default strategies for the time horizon in ct's MPC. In case a different time horizon strategy is required, the user can derive from this class and override the virtual functions
ct::optcon::tpl::MpcTimeHorizon< SCALAR >::MpcTimeHorizon | ( | const mpc_settings & | settings, |
const SCALAR & | initialTimeHorizon | ||
) |
|
virtual |
|
virtual |
compute new MPC time horizon
t_since_ended_first_solve | Time since the first successful solve |
t_forward_prediction_stop | Relative time where to stop forward integration w.r.t. previous controller |
new_T | Resulting, new time horizon provided to the solver |
compute desired end time and the time we have left from now. Will be ignored below, if not required in the scenario.
References ct::optcon::CONSTANT_RECEDING_HORIZON, ct::optcon::FIXED_FINAL_TIME, ct::optcon::FIXED_FINAL_TIME_WITH_MIN_TIME_HORIZON, ct::optcon::tpl::MpcTimeHorizon< SCALAR >::initialTimeHorizon_, ct::optcon::mpc_settings::minimumTimeHorizonMpc_, ct::optcon::mpc_settings::mpc_mode, ct::optcon::tpl::MpcTimeHorizon< SCALAR >::mpc_settings_, and ct::optcon::RECEDING_HORIZON_WITH_FIXED_FINAL_TIME.
void ct::optcon::tpl::MpcTimeHorizon< SCALAR >::updateSettings | ( | const mpc_settings & | mpcsettings | ) |
void ct::optcon::tpl::MpcTimeHorizon< SCALAR >::updateInitialTimeHorizon | ( | const SCALAR & | initTimeHorizon | ) |
update the time horizon which is used during the first call to the solver
References ct::optcon::tpl::MpcTimeHorizon< SCALAR >::initialTimeHorizon_.
|
protected |
|
protected |