differential_equation.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 
27 
34 #ifndef ACADO_TOOLKIT_DIFFERENTIAL_EQUATION_HPP
35 #define ACADO_TOOLKIT_DIFFERENTIAL_EQUATION_HPP
36 
37 
40 
41 
43 
44 
56 
57  //
58  // PUBLIC MEMBER FUNCTIONS:
59  //
60  public:
61 
62 
65 
67  DifferentialEquation( const double &tStart, const double &tEnd );
68 
70  DifferentialEquation( const double &tStart, const Parameter &tEnd );
71 
73  DifferentialEquation( const Parameter &tStart, const double &tEnd );
74 
76  DifferentialEquation( const Parameter &tStart, const Parameter &tEnd );
77 
78 
81 
83  virtual ~DifferentialEquation( );
84 
87 
88 
90  virtual DifferentialEquation* clone() const;
91 
92 
95 
97  DifferentialEquation& operator<<( const int& arg );
98 
101 
103  DifferentialEquation& operator==( const double &arg );
104 
106  DifferentialEquation& operator==( const DVector& arg );
107 
109  DifferentialEquation& operator==( const DMatrix& arg );
110 
111 
113  BooleanType isDAE( ) const;
114 
116  BooleanType isODE( ) const;
117 
119  inline BooleanType isImplicit( ) const;
120 
121 
128  virtual BooleanType makeImplicit();
129 
130 
131 
134  inline int getNumDynamicEquations() const;
135 
136 
139  inline int getNumAlgebraicEquations() const;
140 
141 
143  virtual BooleanType isDiscretized( ) const;
144 
145 
151  inline double getStartTime() const;
152 
153 
159  inline double getEndTime() const;
160 
161 
168  inline int getStartTimeIdx() const;
169 
170 
177  inline int getEndTimeIdx() const;
178 
179 
180 
183  virtual double getStepLength() const;
184 
185 
186  inline int getStateEnumerationIndex( int index_ );
187 
188 
190 
191 
192 
195 
197  DifferentialEquation& addDifferential( const double &arg );
198 
201 
203  DifferentialEquation& addAlgebraic( const double &arg );
204 
207 
210 
213 
216 
218 
219  Lyapunov getLyapunovObject( ) const;
220 
222 
223 
234  Expression getODEexpansion( const int &order ) const;
235 
236 
237  inline int* getComponents() const;
238 
239 
240 
241  // PROTECTED MEMBER FUNCTIONS:
242  // ---------------------------
243  protected:
244 
245 
247  void setup();
248 
249 
251  void copy( const DifferentialEquation &arg );
252 
253 
254 
255 
256 
257  // PROTECTED MEMBERS:
258  // ------------------
259 
260  protected:
261 
265 
266  int counter ;
267  int *component;
268 
270  double t1, t2;
271 
272  double stepLength; // for discretized dynamic equations only
274 };
275 
276 
278 
279 
280 
281 #include <acado/function/differential_equation.ipp>
282 
283 
284 #endif // ACADO_TOOLKIT_DIFFERENTIAL_EQUATION_HPP
285 
286 // end of file.
int getStateEnumerationIndex(int index_)
virtual double getStepLength() const
int * getComponents() const
Allows to setup and evaluate a general function based on SymbolicExpressions.
Definition: function_.hpp:59
double getStartTime() const
int getNumDynamicEquations() const
virtual BooleanType isDiscretized() const
DVector getDifferentialStateComponents() const
DifferentialEquation & operator=(const DifferentialEquation &arg)
DifferentialEquation & addAlgebraic(const Expression &arg)
int getNumAlgebraicEquations() const
BooleanType isImplicit() const
#define CLOSE_NAMESPACE_ACADO
int getStartTimeIdx() const
BooleanType isODE() const
Lyapunov getLyapunovObject() const
Base class for all variables within the symbolic expressions family.
Definition: expression.hpp:56
Expression getODEexpansion(const int &order) const
BooleanType isDAE() const
void copy(const DifferentialEquation &arg)
DifferentialEquationType det
double getEndTime() const
virtual BooleanType makeImplicit()
DifferentialEquationType
BooleanType hasLyapunovEquation() const
DifferentialEquation & operator<<(const Expression &arg)
DifferentialEquation & addDifferential(const Expression &arg)
DifferentialEquation & operator==(const Expression &arg)
virtual DifferentialEquation * clone() const
#define BEGIN_NAMESPACE_ACADO
Implements a parameter.
Definition: lyapunov.hpp:54
int getEndTimeIdx() const
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:32