dynamic_system.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 
34 #ifndef ACADO_TOOLKIT_DYNAMIC_SYSTEM_HPP
35 #define ACADO_TOOLKIT_DYNAMIC_SYSTEM_HPP
36 
37 
40 
41 
43 
44 
58 {
59  //
60  // PUBLIC MEMBER FUNCTIONS:
61  //
62  public:
63 
66  DynamicSystem( );
67 
72  DynamicSystem( const DifferentialEquation& _diffEqn
73  );
74 
81  DynamicSystem( const DifferentialEquation& _diffEqn,
82  const OutputFcn& _outputFcn
83  );
84 
90  );
91 
94  ~DynamicSystem( );
95 
101  );
102 
103 
112  );
113 
124  const OutputFcn& _outputFcn
125  );
126 
127 
134  returnValue addSwitchFunction( const Function& _switchFcn
135  );
136 
143  returnValue setSelectFunction( const Function& _selectFcn
144  );
145 
146 
155  inline returnValue getSubsystem( uint stageIdx,
156  DifferentialEquation& _diffEqn,
157  OutputFcn& _outputFcn
158  ) const;
159 
166  inline const DifferentialEquation& getDifferentialEquation( uint stageIdx = 0
167  ) const;
168 
175  inline const OutputFcn& getOutputFcn( uint stageIdx = 0
176  ) const;
177 
184  inline returnValue getSwitchFunction( uint idx,
185  Function& _switchFcn
186  ) const;
187 
194  inline returnValue getSelectFunction( Function& _selectFcn
195  ) const;
196 
197 
203  inline BooleanType isODE( ) const;
204 
210  inline BooleanType isDAE( ) const;
211 
212 
218  inline BooleanType isDiscretized( ) const;
219 
225  inline BooleanType isContinuous( ) const;
226 
232  inline double getSampleTime( ) const;
233 
234 
239  inline uint getNumDynamicEquations( ) const;
240 
245  inline uint getNumAlgebraicEquations( ) const;
246 
251  inline uint getNumOutputs( ) const;
252 
253 
258  inline uint getNumControls( ) const;
259 
264  inline uint getNumParameters( ) const;
265 
270  inline uint getNumDisturbances( ) const;
271 
272 
277  inline uint getNumSubsystems( ) const;
278 
283  inline uint getNumSwitchFunctions( ) const;
284 
290  inline BooleanType hasImplicitSwitches( ) const;
291 
292 
293 
294  //
295  // PROTECTED MEMBER FUNCTIONS:
296  //
297  protected:
298 
308  ) const;
309 
318  BooleanType isConsistentOutputFcn( const OutputFcn& _outputFcn
319  ) const;
320 
321 
322 
323  //
324  // DATA MEMBERS:
325  //
326  protected:
327 
336 };
337 
338 
340 
341 
342 
343 #include <acado/dynamic_system/dynamic_system.ipp>
344 
345 
346 #endif // ACADO_TOOLKIT_DYNAMIC_SYSTEM_HPP
347 
348 
349 /*
350  * end of file
351  */
uint getNumControls() const
returnValue addSubsystem(const DifferentialEquation &_diffEqn)
Allows to setup and evaluate a general function based on SymbolicExpressions.
Definition: function_.hpp:59
Allows to setup and evaluate output functions based on SymbolicExpressions.
Definition: output_fcn.hpp:55
double getSampleTime() const
Stores a DifferentialEquation together with an OutputFcn.
uint getNumDynamicEquations() const
uint getNumDisturbances() const
BooleanType isDiscretized() const
Allows to pass back messages to the calling function.
uint getNumOutputs() const
returnValue getSelectFunction(Function &_selectFcn) const
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
const DifferentialEquation & getDifferentialEquation(uint stageIdx=0) const
uint getNumAlgebraicEquations() const
#define CLOSE_NAMESPACE_ACADO
returnValue getSubsystem(uint stageIdx, DifferentialEquation &_diffEqn, OutputFcn &_outputFcn) const
BooleanType isConsistentOutputFcn(const OutputFcn &_outputFcn) const
const OutputFcn & getOutputFcn(uint stageIdx=0) const
returnValue getSwitchFunction(uint idx, Function &_switchFcn) const
BooleanType isConsistentDiffEqn(const DifferentialEquation &_diffEqn) const
BooleanType isContinuous() const
BooleanType isODE() const
DifferentialEquation ** diffEqn
void rhs(const real_t *x, real_t *f)
BooleanType isDAE() const
uint getNumSwitchFunctions() const
BooleanType hasImplicitSwitches() const
uint getNumParameters() const
OutputFcn ** outputFcn
uint getNumSubsystems() const
#define BEGIN_NAMESPACE_ACADO
returnValue setSelectFunction(const Function &_selectFcn)
returnValue addSwitchFunction(const Function &_switchFcn)
DynamicSystem & operator=(const DynamicSystem &rhs)
Function * selectFcn
Function ** switchFcn
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