symbolic_index_list.hpp
Go to the documentation of this file.
00001 /*
00002  *    This file is part of ACADO Toolkit.
00003  *
00004  *    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
00005  *    Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
00006  *    Milan Vukov, Rien Quirynen, KU Leuven.
00007  *    Developed within the Optimization in Engineering Center (OPTEC)
00008  *    under supervision of Moritz Diehl. All rights reserved.
00009  *
00010  *    ACADO Toolkit is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 3 of the License, or (at your option) any later version.
00014  *
00015  *    ACADO Toolkit is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with ACADO Toolkit; if not, write to the Free Software
00022  *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023  *
00024  */
00025 
00026 
00027 
00028 
00036 #ifndef ACADO_TOOLKIT_SYMBOLIC_INDEX_LIST_HPP
00037 #define ACADO_TOOLKIT_SYMBOLIC_INDEX_LIST_HPP
00038 
00039 
00040 #include <acado/symbolic_operator/symbolic_operator_fwd.hpp>
00041 
00042 
00043 BEGIN_NAMESPACE_ACADO
00044 
00045 
00046 // Forward Declarations:
00047    class Operator;
00048 
00049 
00060 class SymbolicIndexList{
00061 
00062 public:
00063 
00065     SymbolicIndexList();
00066 
00068     ~SymbolicIndexList();
00069 
00071     SymbolicIndexList( const SymbolicIndexList &arg );
00072 
00074     SymbolicIndexList& operator=( const SymbolicIndexList &arg );
00075 
00076 
00077 
00078 //
00079 //  PUBLIC MEMBER FUNCTIONS:
00080 //  ------------------------
00081 
00087     BooleanType addNewElement( VariableType variableType_  ,
00089                                int index_                   );
00091 
00092 
00103     int determineVariableIndex( VariableType variableType_  ,
00105                                  int index_                  ,
00107                                  double scale                );
00109 
00110 
00115     BooleanType determineCExpressionIndices( uint  dimension,  
00116                                              uint  ID       ,  
00117                                               int *idx          );
00118 
00119 
00124     returnValue clearVariableIndexList();
00125 
00126 
00127 //
00128 //  INLINE FUNCTIONS:
00129 //  -----------------
00130 
00136     inline int index( VariableType variableType_, int index_ ) const;
00137 
00138 
00143     inline double scale( VariableType variableType_, int index_ ) const;
00144 
00145 
00149     inline int getNumberOfVariables() const;
00150 
00151 
00155     inline int getNX    () const;
00156 
00160     inline int getNXA   () const;
00161 
00165     inline int getNDX   () const;
00166 
00170     inline int getNU   () const;
00171 
00175     inline int getNUI  () const;
00176 
00180     inline int getNP   () const;
00181 
00185     inline int getNPI  () const;
00186 
00190     inline int getNW  () const;
00191 
00195     inline int getNT  () const;
00196 
00198     inline int getOD  () const;
00199 
00200 
00201     inline int makeImplicit( int dim );
00202 
00203 
00204 
00209     int addOperatorPointer( Operator* intermediateOperator,
00213                                       int comp_             );
00215 
00216 
00221     inline int getNumberOfOperators();
00222 
00223 
00228     returnValue getOperators( Operator **sub, int *comp_, int *n );
00229 
00230 
00235     inline SymbolicIndexList* substitute( VariableType variableType_, int index_ );
00236 
00237 
00238 //
00239 //  PROTECTED MEMBERS:
00240 //  ------------------
00241 
00242 protected:
00243 
00244     Operator  **expression     ;   
00247     int          *comp           ;   
00250     int numberOfOperators      ;   
00254     BooleanType **entryExists    ;   
00257     int           nC             ;   
00260     BooleanType  *cExist         ;   
00264     int         **cIdx           ;   
00267     uint         *cDim           ;   
00269     int         **variableIndex  ;   
00270     double      **variableScale  ;   
00272     // INTERNAL USE / ONLY FOR MEMORY ALLOCATION:
00273     int       *maxNumberOfEntries;   
00276     int           variableCounter;   
00281 private:
00282 
00283 
00284 };
00285 
00286 
00287 CLOSE_NAMESPACE_ACADO
00288 
00289 
00290 
00291 #include <acado/symbolic_operator/symbolic_index_list.ipp>
00292 
00293 
00294 #endif


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:10