- 3.0.2 optimal control module.
DisturbedSystem.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 
21 template <size_t STATE_DIM, size_t DIST_DIM, size_t CONTROL_DIM, typename SCALAR = double>
22 class DisturbedSystem : public ct::core::ControlledSystem<STATE_DIM + DIST_DIM, CONTROL_DIM, SCALAR>
23 {
24 public:
25  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
26 
27  static const size_t AUGMENTED_DIM = STATE_DIM + DIST_DIM;
28 
31 
32  virtual ~DisturbedSystem() = default;
33 
36 
37  // Not overloaded. This is a completely new method.
38  void setController(const std::shared_ptr<ct::core::Controller<STATE_DIM, CONTROL_DIM, SCALAR>> controller);
39 
42  const SCALAR& t,
45 };
46 
47 } // namespace optcon
48 } // namespace ct
clear all close all load ct GNMSLog0 mat reformat t
Definition: gnmsPlot.m:6
void setController(const std::shared_ptr< ct::core::Controller< STATE_DIM, CONTROL_DIM, SCALAR >> controller)
Definition: DisturbedSystem-impl.h:29
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t AUGMENTED_DIM
Definition: DisturbedSystem.h:27
CppAD::AD< CppAD::cg::CG< double > > SCALAR
Disturbed system augments the nominal system so that all the CT interfaces and dimensions are satisfi...
Definition: DisturbedSystem.h:22
virtual ~DisturbedSystem()=default
DisturbedSystem()
Constructor.
Definition: DisturbedSystem-impl.h:12
virtual void computeControlledDynamics(const ct::core::StateVector< AUGMENTED_DIM, SCALAR > &state, const SCALAR &t, const ct::core::ControlVector< CONTROL_DIM, SCALAR > &control, ct::core::StateVector< AUGMENTED_DIM, SCALAR > &derivative)=0
Implementation of the base computeControlledDynamics method.