variable_types.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 
32 #ifndef ACADO_TOOLKIT_VARIABLE_TYPES_HPP
33 #define ACADO_TOOLKIT_VARIABLE_TYPES_HPP
34 
36 
38 
40 class AlgebraicState : public ExpressionType<AlgebraicState, VT_ALGEBRAIC_STATE>
41 {
43 
44 public:
45  AlgebraicState() : Base() {}
46 
47  AlgebraicState(const std::string& _name, unsigned _nRows, unsigned _nCols)
48  : Base(_name, _nRows, _nCols)
49  {}
50 };
51 
53 class Control : public ExpressionType<Control, VT_CONTROL>
54 {
56 
57 public:
58  Control() : Base() {}
59 
60  Control(const std::string& _name, unsigned _nRows, unsigned _nCols)
61  : Base(_name, _nRows, _nCols)
62  {}
63 };
64 
66 class DifferentialStateDerivative : public ExpressionType<DifferentialStateDerivative, VT_DDIFFERENTIAL_STATE>
67 {
69 
70 public:
72 
73  DifferentialStateDerivative(const std::string& _name, unsigned _nRows, unsigned _nCols)
74  : Base(_name, _nRows, _nCols)
75  {}
76 };
77 
79 class DifferentialState: public ExpressionType<DifferentialState, VT_DIFFERENTIAL_STATE>
80 {
82 
83 public:
84  DifferentialState() : Base() {}
85 
86  DifferentialState(const std::string& _name, unsigned _nRows, unsigned _nCols)
87  : Base(_name, _nRows, _nCols)
88  {}
89 };
90 
92 class Disturbance : public ExpressionType<Disturbance, VT_DISTURBANCE>
93 {
95 
96 public:
97  Disturbance() : Base() {}
98 
99  Disturbance(const std::string& _name, unsigned _nRows, unsigned _nCols)
100  : Base(_name, _nRows, _nCols)
101  {}
102 };
103 
105 class IntegerControl : public ExpressionType<IntegerControl, VT_INTEGER_CONTROL>
106 {
108 
109 public:
110  IntegerControl() : Base() {}
111 
112  IntegerControl(const std::string& _name, unsigned _nRows, unsigned _nCols)
113  : Base(_name, _nRows, _nCols)
114  {}
115 };
116 
118 class IntegerParameter : public ExpressionType<IntegerParameter, VT_INTEGER_PARAMETER>
119 {
121 
122 public:
123  IntegerParameter() : Base() {}
124 
125  IntegerParameter(const std::string& _name, unsigned _nRows, unsigned _nCols)
126  : Base(_name, _nRows, _nCols)
127  {}
128 };
129 
131 class OnlineData : public ExpressionType<OnlineData, VT_ONLINE_DATA>
132 {
134 
135 public:
136  OnlineData() : Base() {}
137 
138  OnlineData(const std::string& _name, unsigned _nRows, unsigned _nCols)
139  : Base(_name, _nRows, _nCols)
140  {}
141 };
142 
144 class Output : public ExpressionType<Output, VT_OUTPUT>
145 {
147 
148 public:
149  Output() : Base() {}
150 
151  Output(const std::string& _name, unsigned _nRows, unsigned _nCols)
152  : Base(_name, _nRows, _nCols)
153  {}
154 
156  Output(const Expression& _expression, unsigned _componentIdx = 0)
157  : Base(_expression, _componentIdx)
158  {}
159 };
160 
162 class Parameter : public ExpressionType<Parameter, VT_PARAMETER>
163 {
165 
166 public:
167  Parameter() : Base() {}
168 
169  Parameter(const std::string& _name, unsigned _nRows, unsigned _nCols)
170  : Base(_name, _nRows, _nCols)
171  {}
172 };
173 
175 class TIME : public ExpressionType<TIME, VT_TIME, false>
176 {
178 
179 public:
180  TIME() : Base() {}
181 };
182 
184 class IntermediateState : public ExpressionType<IntermediateState, VT_INTERMEDIATE_STATE>
185 {
187 
188 public:
189  IntermediateState() : Base() {}
190 
192  explicit IntermediateState(const std::string& _name, uint _nRows, uint _nCols)
193  : Base(_name, _nRows, _nCols)
194  {}
195 
197  explicit IntermediateState(const std::string& _name)
198  : Base(_name, 1, 1)
199  {}
200 
202  explicit IntermediateState( unsigned _nRows, unsigned _nCols = 1)
203  : Base("", _nRows, _nCols)
204  {}
205 
207  explicit IntermediateState( int _nRows, int _nCols = 1)
208  : Base("", _nRows, _nCols)
209  {}
210 
212  IntermediateState( const double& _arg )
213  : Base( )
214  {
215  assignmentSetup( _arg );
216  }
217 
218  IntermediateState( const DVector& _arg )
219  : Base( )
220  {
221  assignmentSetup( _arg );
222  }
223 
224  IntermediateState( const DMatrix& _arg )
225  : Base( )
226  {
227  assignmentSetup( _arg );
228  }
229 
231  : Base( )
232  {
233  assignmentSetup( _arg );
234  }
235 
237  : Base( )
238  {
239  assignmentSetup( _arg );
240  }
241 };
242 
244 
245 #endif // ACADO_TOOLKIT_VARIABLE_TYPES_HPP
IntermediateState(const DMatrix &_arg)
Output(const std::string &_name, unsigned _nRows, unsigned _nCols)
ExpressionType< DifferentialStateDerivative, VT_DDIFFERENTIAL_STATE > Base
ExpressionType< IntegerParameter, VT_INTEGER_PARAMETER > Base
ExpressionType< IntegerControl, VT_INTEGER_CONTROL > Base
ExpressionType< AlgebraicState, VT_ALGEBRAIC_STATE > Base
IntermediateState(unsigned _nRows, unsigned _nCols=1)
Abstract base class for all scalar-valued symbolic operators.
Definition: operator.hpp:60
IntermediateState(const Operator &_arg)
IntermediateState(int _nRows, int _nCols=1)
ExpressionType< DifferentialState, VT_DIFFERENTIAL_STATE > Base
IntermediateState(const double &_arg)
AlgebraicState(const std::string &_name, unsigned _nRows, unsigned _nCols)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
Parameter(const std::string &_name, unsigned _nRows, unsigned _nCols)
IntegerControl(const std::string &_name, unsigned _nRows, unsigned _nCols)
#define CLOSE_NAMESPACE_ACADO
Base class for all variables within the symbolic expressions family.
Definition: expression.hpp:56
Control(const std::string &_name, unsigned _nRows, unsigned _nCols)
ExpressionType< TIME, VT_TIME, false > Base
Disturbance(const std::string &_name, unsigned _nRows, unsigned _nCols)
ExpressionType< Disturbance, VT_DISTURBANCE > Base
IntermediateState(const Expression &_arg)
ExpressionType< Parameter, VT_PARAMETER > Base
DifferentialStateDerivative(const std::string &_name, unsigned _nRows, unsigned _nCols)
ExpressionType< Output, VT_OUTPUT > Base
IntermediateState(const std::string &_name)
IntegerParameter(const std::string &_name, unsigned _nRows, unsigned _nCols)
OnlineData(const std::string &_name, unsigned _nRows, unsigned _nCols)
ExpressionType< IntermediateState, VT_INTERMEDIATE_STATE > Base
DifferentialState(const std::string &_name, unsigned _nRows, unsigned _nCols)
Expression & assignmentSetup(const Expression &arg)
ExpressionType< OnlineData, VT_ONLINE_DATA > Base
Output(const Expression &_expression, unsigned _componentIdx=0)
ExpressionType< Control, VT_CONTROL > Base
IntermediateState(const std::string &_name, uint _nRows, uint _nCols)
#define BEGIN_NAMESPACE_ACADO
IntermediateState(const DVector &_arg)


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