- 3.0.2 optimal control module.
|
#include <MpcSettings.h>
Public Member Functions | |
void | print () |
Print MPC settings to console. More... | |
Public Attributes | |
bool | stateForwardIntegration_ = false |
ct::core::IntegrationType | stateForwardIntegratorType_ = ct::core::IntegrationType::RK4 |
double | stateForwardIntegration_dt_ = 0.001 |
bool | measureDelay_ = false |
double | delayMeasurementMultiplier_ = 0.7 |
int | fixedDelayUs_ = 0 |
int | additionalDelayUs_ = 0 |
bool | postTruncation_ = false |
MPC_MODE | mpc_mode = CONSTANT_RECEDING_HORIZON |
core::Time | minimumTimeHorizonMpc_ = 1.0 |
bool | coldStart_ = false |
bool | useExternalTiming_ = false |
MPC Settings struct.
|
inline |
Print MPC settings to console.
bool ct::optcon::mpc_settings::stateForwardIntegration_ = false |
State prediction. Use state prediction (based on a given delay, the given initial state and a given policy)? If set to true, MPC will either use a measurement of the delay or use the fixed delay given below as "fixedDelayUs_".
Referenced by ct::optcon::MPC< OPTCON_SOLVER >::doForwardIntegration(), ct::optcon::loadMpcSettings(), main(), and ct::optcon::example::TEST().
ct::core::IntegrationType ct::optcon::mpc_settings::stateForwardIntegratorType_ = ct::core::IntegrationType::RK4 |
Integrator type to use for the state prediction
Referenced by ct::optcon::loadMpcSettings(), ct::optcon::example::TEST(), and ct::optcon::MPC< OPTCON_SOLVER >::updateSettings().
double ct::optcon::mpc_settings::stateForwardIntegration_dt_ = 0.001 |
time step size employed for the forward integration
Referenced by ct::optcon::loadMpcSettings(), ct::optcon::MPC< OPTCON_SOLVER >::printMpcSummary(), and ct::optcon::example::TEST().
bool ct::optcon::mpc_settings::measureDelay_ = false |
Delay compensation. If measureDelay_ is set to true, the MPC timer automatically keeps track of the planning times and uses them for the state forward prediction. Only applies if stateForwardIntegration_ is set to true.
Referenced by ct::optcon::tpl::MpcTimeKeeper< Scalar_t >::getSummedDelay(), ct::optcon::loadMpcSettings(), main(), ct::optcon::MPC< OPTCON_SOLVER >::printMpcSummary(), ct::optcon::tpl::MpcTimeKeeper< Scalar_t >::startDelayMeasurement(), and ct::optcon::example::TEST().
double ct::optcon::mpc_settings::delayMeasurementMultiplier_ = 0.7 |
The delayMeasurementMultiplier_ quantifies the level of trust you have in our planning time measurement. In case you wish to be conservative, for example because the planning times vary a lot, reduce this multiplier. Maximum confidence means, set it to 1.0. In essence, this number says "how much of our measured delay do we use for pre-integration".
Referenced by ct::optcon::tpl::MpcTimeKeeper< Scalar_t >::getSummedDelay(), ct::optcon::loadMpcSettings(), main(), and ct::optcon::example::TEST().
int ct::optcon::mpc_settings::fixedDelayUs_ = 0 |
If not using measureDelay_ = true, we can instead set a fixed, known delay in microseconds (!) here.
Referenced by ct::optcon::tpl::MpcTimeKeeper< Scalar_t >::getSummedDelay(), ct::optcon::loadMpcSettings(), ct::optcon::MPC< OPTCON_SOLVER >::printMpcSummary(), and ct::optcon::example::TEST().
int ct::optcon::mpc_settings::additionalDelayUs_ = 0 |
Additional delay in microseconds (!), which gets added to either the measured delay of above fixedDelay.
Referenced by ct::optcon::tpl::MpcTimeKeeper< Scalar_t >::getSummedDelay(), ct::optcon::loadMpcSettings(), and ct::optcon::example::TEST().
bool ct::optcon::mpc_settings::postTruncation_ = false |
If solving the problem takes longer than predicted, we can post-truncate the solution trajectories.
Referenced by ct::optcon::MPC< OPTCON_SOLVER >::finishIteration(), ct::optcon::loadMpcSettings(), main(), and ct::optcon::example::TEST().
MPC_MODE ct::optcon::mpc_settings::mpc_mode = CONSTANT_RECEDING_HORIZON |
MPC Time horizon modus
Referenced by ct::optcon::tpl::MpcTimeHorizon< SCALAR >::computeNewTimeHorizon(), main(), and ct::optcon::example::TEST().
core::Time ct::optcon::mpc_settings::minimumTimeHorizonMpc_ = 1.0 |
see description of the different modes above
Referenced by ct::optcon::tpl::MpcTimeHorizon< SCALAR >::computeNewTimeHorizon(), and ct::optcon::loadMpcSettings().
bool ct::optcon::mpc_settings::coldStart_ = false |
cold starting or warm starting. Warm starting will either use a default strategy for common controller types, or a user specified custom warm starting strategy.
Referenced by ct::optcon::loadMpcSettings(), main(), ct::optcon::MPC< OPTCON_SOLVER >::MPC(), and ct::optcon::example::TEST().
bool ct::optcon::mpc_settings::useExternalTiming_ = false |
override the internal clock with external timing.
Referenced by ct::optcon::tpl::MpcTimeKeeper< Scalar_t >::computeNewTimings(), ct::optcon::loadMpcSettings(), ct::optcon::MPC< OPTCON_SOLVER >::printMpcSummary(), ct::optcon::tpl::MpcTimeKeeper< Scalar_t >::startDelayMeasurement(), ct::optcon::tpl::MpcTimeKeeper< Scalar_t >::stopDelayMeasurement(), ct::optcon::example::TEST(), ct::optcon::tpl::MpcTimeKeeper< Scalar_t >::timeSinceFirstSuccessfulSolve(), and ct::optcon::tpl::MpcTimeKeeper< Scalar_t >::timeSincePreviousSuccessfulSolve().