- 3.0.2 optimal control module.
SystemModelBase.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 namespace ct {
9 namespace optcon {
10 
20 template <size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
22 {
23 public:
27  using Time_t = SCALAR;
28 
30  virtual ~SystemModelBase() = default;
31 
33  virtual state_vector_t computeDynamics(const state_vector_t& state,
34  const control_vector_t& control,
35  const Time_t dt,
36  Time_t t) = 0;
37 
40  const control_vector_t& control,
41  const Time_t dt,
42  Time_t t) = 0;
43 
46  const control_vector_t& control,
47  const Time_t dt,
48  Time_t t) = 0;
49 };
50 
51 } // namespace optcon
52 } // namespace ct
virtual ~SystemModelBase()=default
Virtual destructor.
virtual state_vector_t computeDynamics(const state_vector_t &state, const control_vector_t &control, const Time_t dt, Time_t t)=0
Propagates the system giving the next state as output.
clear all close all load ct GNMSLog0 mat reformat t
Definition: gnmsPlot.m:6
const double dt
Definition: LQOCSolverTiming.cpp:18
CppAD::AD< CppAD::cg::CG< double > > SCALAR
virtual state_matrix_t computeDerivativeNoise(const state_vector_t &state, const control_vector_t &control, const Time_t dt, Time_t t)=0
Computes the derivative w.r.t noise.
System model is an interface that encapsulates the integrator to be able to propagate the system...
Definition: SystemModelBase.h:21
virtual state_matrix_t computeDerivativeState(const state_vector_t &state, const control_vector_t &control, const Time_t dt, Time_t t)=0
Computes the derivative w.r.t state.
SCALAR Time_t
Definition: SystemModelBase.h:27