tree_projection.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_TREE_PROJECTION_HPP
35 #define ACADO_TOOLKIT_TREE_PROJECTION_HPP
36 
37 
39 
40 
42 
43 
44 class Expression;
46 
47 
58 class TreeProjection : public Projection{
59 
60 public:
61 
64 
66  TreeProjection( const std::string& name_ );
67 
69  TreeProjection( const TreeProjection &arg );
70 
72  virtual ~TreeProjection();
73 
75  Operator& operator=( const Operator &arg );
76 
77 
79  virtual Operator& operator=( const Expression& arg );
80  virtual Operator& operator=( const double& arg );
81 
82 
83 
87  virtual TreeProjection* clone() const;
88 
89 
93  virtual TreeProjection* cloneTreeProjection() const;
94 
95 
96 
115  virtual returnValue loadIndices( SymbolicIndexList *indexList );
118 
119 
125  virtual BooleanType isDependingOn( int dim ,
126  VariableType *varType ,
127  int *component,
128  BooleanType *implicit_dep );
129 
130 
131 
132 
140  virtual BooleanType isLinearIn( int dim ,
141  VariableType *varType ,
142  int *component,
143  BooleanType *implicit_dep );
144 
145 
146 
153  virtual BooleanType isPolynomialIn( int dim ,
154  VariableType *varType ,
155  int *component,
156  BooleanType *implicit_dep );
157 
158 
159 
166  virtual BooleanType isRationalIn( int dim ,
167  VariableType *varType ,
168  int *component,
169  BooleanType *implicit_dep );
170 
171 
180 
181 
182 
184  Operator *getArgument() const;
185 
186 
187 
194  virtual NeutralElement isOneOrZero() const;
195 
196 
197 
199  virtual Operator* passArgument() const;
200 
201 
202  virtual BooleanType isTrivial() const;
203 
204  virtual returnValue initDerivative();
205 
206 //
207 // PROTECTED FUNCTIONS:
208 //
209 
210 protected:
211 
212 
213 
219  virtual Operator* ADforwardProtected( int dim ,
220  VariableType *varType ,
221  int *component,
222  Operator **seed ,
223  int &nNewIS ,
224  TreeProjection ***newIS );
225 
226 
227 
233  virtual returnValue ADbackwardProtected( int dim ,
234  VariableType *varType ,
235  int *component,
236  Operator *seed ,
237  Operator **df ,
238  int &nNewIS ,
239  TreeProjection ***newIS );
240 
241 
247  virtual returnValue ADsymmetricProtected( int dim ,
248  VariableType *varType ,
249  int *component ,
250  Operator *l ,
251  Operator **S ,
252  int dimS ,
253  Operator **dfS ,
254  Operator **ldf ,
255  Operator **H ,
256  int &nNewLIS ,
257  TreeProjection ***newLIS ,
258  int &nNewSIS ,
259  TreeProjection ***newSIS ,
260  int &nNewHIS ,
261  TreeProjection ***newHIS );
262 
263 
264 
266  virtual void copy( const Projection &arg );
267 
268 
272  virtual returnValue setVariableExportName( const VariableType &_type,
273  const std::vector< std::string >& _name
274  );
275 
276  //
277  // PROTECTED MEMBERS:
278  //
279  protected:
280 
282  static int count ;
284 };
285 
286 
288 
289 
291 
292 
293 
294 #endif
virtual BooleanType isDependingOn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
virtual BooleanType isPolynomialIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
virtual returnValue loadIndices(SymbolicIndexList *indexList)
virtual ~TreeProjection()
Abstract base class for all scalar-valued symbolic operators.
Definition: operator.hpp:60
Allows to pass back messages to the calling function.
virtual returnValue ADsymmetricProtected(int dim, VariableType *varType, int *component, Operator *l, Operator **S, int dimS, Operator **dfS, Operator **ldf, Operator **H, int &nNewLIS, TreeProjection ***newLIS, int &nNewSIS, TreeProjection ***newSIS, int &nNewHIS, TreeProjection ***newHIS)
virtual BooleanType isTrivial() const
virtual Operator * ADforwardProtected(int dim, VariableType *varType, int *component, Operator **seed, int &nNewIS, TreeProjection ***newIS)
virtual TreeProjection * cloneTreeProjection() const
virtual returnValue ADbackwardProtected(int dim, VariableType *varType, int *component, Operator *seed, Operator **df, int &nNewIS, TreeProjection ***newIS)
#define CLOSE_NAMESPACE_ACADO
Manages the indices of SymbolicVariables.
Data class for symbolically formulating constraints within optimal control problems.
VariableType
Definition: acado_types.hpp:95
Base class for all variables within the symbolic expressions family.
Definition: expression.hpp:56
NeutralElement ne
Operator * getArgument() const
virtual returnValue initDerivative()
static TreeProjection emptyTreeProjection
Implements the projection operator within the symbolic operators family.
Definition: projection.hpp:55
virtual NeutralElement isOneOrZero() const
virtual BooleanType isLinearIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
NeutralElement
Definition: acado_types.hpp:64
returnValue clearStaticCounters()
virtual Operator * passArgument() const
Implements the tree-projection operator within the family of SymbolicOperators.
virtual returnValue setVariableExportName(const VariableType &_type, const std::vector< std::string > &_name)
virtual void copy(const Projection &arg)
#define BEGIN_NAMESPACE_ACADO
virtual TreeProjection * clone() const
virtual BooleanType isRationalIn(int dim, VariableType *varType, int *component, BooleanType *implicit_dep)
Operator & operator=(const Operator &arg)


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