narx_export.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_NARX_EXPORT_HPP
00036 #define ACADO_TOOLKIT_NARX_EXPORT_HPP
00037 
00038 #include <acado/code_generation/integrators/discrete_export.hpp>
00039 
00040 
00041 BEGIN_NAMESPACE_ACADO
00042 
00043 
00054 class NARXExport : public DiscreteTimeExport
00055 {
00056     //
00057     // PUBLIC MEMBER FUNCTIONS:
00058     //
00059 
00060     public:
00061 
00067         NARXExport(     UserInteraction* _userInteraction = 0,
00068                                                         const std::string& _commonHeaderName = ""
00069                                                         );
00070 
00075         NARXExport(     const NARXExport& arg
00076                                                         );
00077 
00080         virtual ~NARXExport( );
00081 
00082 
00087                 virtual returnValue setup( );
00088 
00089 
00097                 virtual returnValue setDifferentialEquation( const Expression& rhs );
00098 
00099 
00108                 returnValue setModel( const std::string& _rhs, const std::string& _diffs_rhs );
00109 
00110 
00117                 virtual returnValue getDataDeclarations(        ExportStatementBlock& declarations,
00118                                                                                                         ExportStruct dataStruct = ACADO_ANY
00119                                                                                                         ) const;
00120 
00121 
00128                 returnValue updateInputSystem(  ExportStatementBlock* block,
00129                                                                                 const ExportIndex& index1,
00130                                                                                 const ExportIndex& index2,
00131                                                                                 const ExportIndex& tmp_index    );
00132 
00133 
00140                 returnValue updateImplicitSystem(       ExportStatementBlock* block,
00141                                                                                         const ExportIndex& index1,
00142                                                                                         const ExportIndex& index2,
00143                                                                                         const ExportIndex& tmp_index    );
00144 
00145 
00152                 virtual returnValue updateOutputSystem(         ExportStatementBlock* block,
00153                                                                                                         const ExportIndex& index1,
00154                                                                                                         const ExportIndex& index2,
00155                                                                                                         const ExportIndex& tmp_index    );
00156 
00157 
00164                 returnValue propagateInputSystem(       ExportStatementBlock* block,
00165                                                                                         const ExportIndex& index1,
00166                                                                                         const ExportIndex& index2,
00167                                                                                         const ExportIndex& index3,
00168                                                                                         const ExportIndex& tmp_index    );
00169 
00170 
00177                 returnValue propagateImplicitSystem(    ExportStatementBlock* block,
00178                                                                                                 const ExportIndex& index1,
00179                                                                                                 const ExportIndex& index2,
00180                                                                                                 const ExportIndex& index3,
00181                                                                                                 const ExportIndex& tmp_index    );
00182 
00183 
00190                 virtual returnValue propagateOutputSystem(      ExportStatementBlock* block,
00191                                                                                                         const ExportIndex& index1,
00192                                                                                                         const ExportIndex& index2,
00193                                                                                                         const ExportIndex& index3,
00194                                                                                                         const ExportIndex& tmp_index    );
00195 
00196 
00205                 returnValue setNARXmodel( const uint _delay, const DMatrix& _parms );
00206 
00207 
00214                 virtual returnValue setLinearOutput( const DMatrix& M3, const DMatrix& A3, const Expression& rhs );
00215 
00216 
00223                 virtual returnValue setLinearOutput( const DMatrix& M3, const DMatrix& A3, const std::string& _rhs3, const std::string& _diffs_rhs3 );
00224 
00225 
00226         protected:
00227 
00228 
00233                 returnValue prepareFullRhs( );
00234 
00235 
00239                 returnValue formNARXpolynomial( const uint num, const uint order, uint& base, const uint index, IntermediateState& result );
00240 
00241 
00242     protected:
00243 
00244                 uint delay;
00245                 DMatrix parms;
00246 
00247 };
00248 
00249 IntegratorExport* createNARXExport(     UserInteraction* _userInteraction,
00250                                                                                                         const std::string &_commonHeaderName);
00251 
00252 
00253 CLOSE_NAMESPACE_ACADO
00254 
00255 
00256 #endif  // ACADO_TOOLKIT_NARX_EXPORT_HPP
00257 
00258 // end of file.


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:38:14