symbolic_index_list.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 
28 
36 #ifndef ACADO_TOOLKIT_SYMBOLIC_INDEX_LIST_HPP
37 #define ACADO_TOOLKIT_SYMBOLIC_INDEX_LIST_HPP
38 
39 
41 
42 
44 
45 
46 // Forward Declarations:
47  class Operator;
48 
49 
61 
62 public:
63 
66 
69 
72 
75 
76 
77 
78 //
79 // PUBLIC MEMBER FUNCTIONS:
80 // ------------------------
81 
87  BooleanType addNewElement( VariableType variableType_ ,
89  int index_ );
91 
92 
103  int determineVariableIndex( VariableType variableType_ ,
105  int index_ ,
107  double scale );
109 
110 
116  uint ID ,
117  int *idx );
118 
119 
125 
126 
127 //
128 // INLINE FUNCTIONS:
129 // -----------------
130 
136  inline int index( VariableType variableType_, int index_ ) const;
137 
138 
143  inline double scale( VariableType variableType_, int index_ ) const;
144 
145 
149  inline int getNumberOfVariables() const;
150 
151 
155  inline int getNX () const;
156 
160  inline int getNXA () const;
161 
165  inline int getNDX () const;
166 
170  inline int getNU () const;
171 
175  inline int getNUI () const;
176 
180  inline int getNP () const;
181 
185  inline int getNPI () const;
186 
190  inline int getNW () const;
191 
195  inline int getNT () const;
196 
198  inline int getOD () const;
199 
200 
201  inline int makeImplicit( int dim );
202 
203 
204 
209  int addOperatorPointer( Operator* intermediateOperator,
213  int comp_ );
215 
216 
221  inline int getNumberOfOperators();
222 
223 
228  returnValue getOperators( Operator **sub, int *comp_, int *n );
229 
230 
235  inline SymbolicIndexList* substitute( VariableType variableType_, int index_ );
236 
237 
238 //
239 // PROTECTED MEMBERS:
240 // ------------------
241 
242 protected:
243 
247  int *comp ;
257  int nC ;
264  int **cIdx ;
267  uint *cDim ;
269  int **variableIndex ;
270  double **variableScale ;
272  // INTERNAL USE / ONLY FOR MEMORY ALLOCATION:
281 private:
282 
283 
284 };
285 
286 
288 
289 
290 
291 #include <acado/symbolic_operator/symbolic_index_list.ipp>
292 
293 
294 #endif
int getOD() const
int getNUI() const
Abstract base class for all scalar-valued symbolic operators.
Definition: operator.hpp:60
SymbolicIndexList * substitute(VariableType variableType_, int index_)
BooleanType ** entryExists
SymbolicIndexList & operator=(const SymbolicIndexList &arg)
Allows to pass back messages to the calling function.
int getNumberOfOperators()
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
double scale(VariableType variableType_, int index_) const
int index(VariableType variableType_, int index_) const
BooleanType determineCExpressionIndices(uint dimension, uint ID, int *idx)
int getNDX() const
#define CLOSE_NAMESPACE_ACADO
int getNumberOfVariables() const
Manages the indices of SymbolicVariables.
VariableType
Definition: acado_types.hpp:95
int determineVariableIndex(VariableType variableType_, int index_, double scale)
int getNW() const
int getNPI() const
int getNP() const
int getNXA() const
#define BEGIN_NAMESPACE_ACADO
returnValue clearVariableIndexList()
int makeImplicit(int dim)
BooleanType addNewElement(VariableType variableType_, int index_)
returnValue getOperators(Operator **sub, int *comp_, int *n)
int getNU() const
int getNT() const
int getNX() const
int addOperatorPointer(Operator *intermediateOperator, int comp_)


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