- 3.0.2 optimal control module.
MpcTimeHorizon.h
Go to the documentation of this file.
1 /**********************************************************************************************************************
2 This file is part of the Control Toolbox (https://github.com/ethz-adrl/control-toolbox), copyright by ETH Zurich.
3 Licensed under the BSD-2 license (see LICENSE file in main directory)
4 **********************************************************************************************************************/
5 
6 #pragma once
7 
8 #include "../MpcSettings.h"
9 
10 namespace ct {
11 namespace optcon {
12 namespace tpl {
13 
19 template <typename SCALAR = double>
21 {
22 public:
23  MpcTimeHorizon(const mpc_settings& settings, const SCALAR& initialTimeHorizon);
24 
25  virtual ~MpcTimeHorizon();
26 
28 
37  virtual bool computeNewTimeHorizon(const SCALAR& t_since_ended_first_solve,
38  const SCALAR& t_forward_prediction_stop,
39  SCALAR& new_T);
40 
41  void updateSettings(const mpc_settings& mpcsettings);
42 
44  void updateInitialTimeHorizon(const SCALAR& initTimeHorizon);
45 
46 
47 protected:
49 
51 };
52 
53 } // namespace tpl
54 
56 
57 } // namespace optcon
58 } // namespace ct
void updateSettings(const mpc_settings &mpcsettings)
Definition: MpcTimeHorizon-impl.h:77
SCALAR initialTimeHorizon_
Definition: MpcTimeHorizon.h:50
MpcTimeHorizon(const mpc_settings &settings, const SCALAR &initialTimeHorizon)
Definition: MpcTimeHorizon-impl.h:13
CppAD::AD< CppAD::cg::CG< double > > SCALAR
MPC Settings struct.
Definition: MpcSettings.h:45
Definition: MpcTimeHorizon.h:20
void updateInitialTimeHorizon(const SCALAR &initTimeHorizon)
update the time horizon which is used during the first call to the solver
Definition: MpcTimeHorizon-impl.h:83
virtual ~MpcTimeHorizon()
Definition: MpcTimeHorizon-impl.h:19
virtual bool computeNewTimeHorizon(const SCALAR &t_since_ended_first_solve, const SCALAR &t_forward_prediction_stop, SCALAR &new_T)
compute new MPC time horizon
Definition: MpcTimeHorizon-impl.h:24
mpc_settings mpc_settings_
Definition: MpcTimeHorizon.h:48