export_algorithm.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 
00035 #ifndef ACADO_TOOLKIT_EXPORT_ALGORITHM_HPP
00036 #define ACADO_TOOLKIT_EXPORT_ALGORITHM_HPP
00037 
00038 #include <acado/utils/acado_utils.hpp>
00039 #include <acado/user_interaction/algorithmic_base.hpp>
00040 #include <acado/matrix_vector/matrix_vector.hpp>
00041 
00042 #include <acado/code_generation/export_variable.hpp>
00043 #include <acado/code_generation/export_function.hpp>
00044 #include <acado/code_generation/export_acado_function.hpp>
00045 #include <acado/code_generation/export_arithmetic_statement.hpp>
00046 #include <acado/code_generation/export_function_call.hpp>
00047 #include <acado/code_generation/export_for_loop.hpp>
00048 
00049 BEGIN_NAMESPACE_ACADO
00050 
00061 class ExportAlgorithm : public AlgorithmicBase
00062 {
00063     //
00064     // PUBLIC MEMBER FUNCTIONS:
00065     //
00066 
00067     public:
00068 
00074         ExportAlgorithm(        UserInteraction* _userInteraction = 0,
00075                                                         const std::string& _commonHeaderName = std::string()
00076                                                         );
00077 
00079         virtual ~ExportAlgorithm( );
00080 
00085                 virtual returnValue setup( );
00086 
00087 
00094                 virtual returnValue getDataDeclarations(        ExportStatementBlock& declarations,
00095                                                                                                         ExportStruct dataStruct = ACADO_ANY
00096                                                                                                         ) const = 0;
00097 
00104                 virtual returnValue getFunctionDeclarations(    ExportStatementBlock& declarations
00105                                                                                                                 ) const = 0;
00106 
00107 
00114                 virtual returnValue getCode(    ExportStatementBlock& code
00115                                                                                 ) = 0;
00116 
00117 
00127                 returnValue setDimensions(      uint _NX = 0,
00128                                                                         uint _NU = 0,
00129                                                                         uint _NP = 0,
00130                                                                         uint _NI = 0,
00131                                                                         uint _NOD = 0
00132                                                                         );
00133 
00134 
00146                 returnValue setDimensions(      uint _NX,
00147                                                                         uint _NDX,
00148                                                                         uint _NXA,
00149                                                                         uint _NU,
00150                                                                         uint _NP,
00151                                                                         uint _NI,
00152                                                                         uint _NOD
00153                                                                         );
00154 
00155 
00160                 uint getNX( ) const;
00161                 
00166                 uint getNXA( ) const;
00167 
00172                 uint getNDX( ) const;
00173 
00178                 uint getNU( ) const;
00179 
00184                 uint getNP( ) const;
00185 
00190                 uint getNOD( ) const;
00191 
00196                 uint getN( ) const;
00197                 
00198                 void setNY( uint NY_ );
00199                 uint getNY( ) const;
00200 
00201                 void setNYN( uint NYN_ );
00202                 uint getNYN( ) const;
00203 
00204     protected:
00205 
00206                 uint NX;                                                        
00207                 uint NDX;                                                       
00208                 uint NXA;                                                       
00209                 uint NU;                                                        
00210                 uint NP;                                                        
00211                 uint NOD;                                                       
00212                 uint N;                                                         
00214                 uint NY;                                                        
00215                 uint NYN;                                                       
00217                 std::string commonHeaderName;           
00218 };
00219 
00220 
00221 CLOSE_NAMESPACE_ACADO
00222 
00223 
00224 #endif  // ACADO_TOOLKIT_EXPORT_ALGORITHM_HPP
00225 
00226 // end of file.


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 11:58:09