irk_forward_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_IRK_FORWARD_EXPORT_HPP
00036 #define ACADO_TOOLKIT_IRK_FORWARD_EXPORT_HPP
00037 
00038 #include <acado/code_generation/integrators/irk_export.hpp>
00039 #include <acado/code_generation/integrators/rk_sensitivities_export.hpp>
00040 #include <acado/code_generation/linear_solvers/linear_solver_generation.hpp>
00041 
00042 
00043 BEGIN_NAMESPACE_ACADO
00044 
00055 class ForwardIRKExport : public ImplicitRungeKuttaExport, public RKSensitivitiesExport
00056 {
00057     //
00058     // PUBLIC MEMBER FUNCTIONS:
00059     //
00060 
00061     public:
00062 
00068         ForwardIRKExport(       UserInteraction* _userInteraction = 0,
00069                                                         const std::string& _commonHeaderName = ""
00070                                                         );
00071 
00076         ForwardIRKExport(       const ForwardIRKExport& arg
00077                                                         );
00078 
00081         virtual ~ForwardIRKExport( );
00082 
00083 
00088                 ForwardIRKExport& operator=(    const ForwardIRKExport& arg
00089                                                                                 );
00090 
00091 
00096                 virtual returnValue setup( );
00097         
00098 
00105                 virtual returnValue getDataDeclarations(        ExportStatementBlock& declarations,
00106                                                                                                         ExportStruct dataStruct = ACADO_ANY
00107                                                                                                         ) const;
00108 
00109 
00116                 virtual returnValue getFunctionDeclarations(    ExportStatementBlock& declarations
00117                                                                                                                 ) const;
00118 
00119 
00120 
00127                 virtual returnValue getCode(    ExportStatementBlock& code
00128                                                                                 );
00129 
00130 
00131         protected:
00132                 
00133                 
00142                 returnValue getCRSIndex( uint output, ExportIndex row, ExportIndex col );
00143 
00144 
00151                 virtual returnValue prepareInputSystem( ExportStatementBlock& code );
00152 
00153 
00160                 virtual returnValue prepareOutputSystem( ExportStatementBlock& code );
00161 
00162 
00171                 virtual returnValue sensitivitiesInputSystem(   ExportStatementBlock* block,
00172                                                                                                                 const ExportIndex& index1,
00173                                                                                                                 const ExportIndex& index2,
00174                                                                                                                 const ExportVariable& Bh,
00175                                                                                                                 bool STATES     );
00176 
00177 
00189                 virtual returnValue sensitivitiesImplicitSystem(        ExportStatementBlock* block,
00190                                                                                                         const ExportIndex& index1,
00191                                                                                                         const ExportIndex& index2,
00192                                                                                                         const ExportIndex& index3,
00193                                                                                                         const ExportIndex& tmp_index1,
00194                                                                                                         const ExportIndex& tmp_index2,
00195                                                                                                         const ExportVariable& Ah,
00196                                                                                                         const ExportVariable& Bh,
00197                                                                                                         const ExportVariable& det,
00198                                                                                                         bool STATES,
00199                                                                                                         uint number             );
00200 
00201 
00212                 virtual returnValue sensitivitiesOutputSystem(  ExportStatementBlock* block,
00213                                                                                                 const ExportIndex& index1,
00214                                                                                                 const ExportIndex& index2,
00215                                                                                                 const ExportIndex& index3,
00216                                                                                                 const ExportIndex& index4,
00217                                                                                                 const ExportIndex& tmp_index1,
00218                                                                                                 const ExportIndex& tmp_index2,
00219                                                                                                 const ExportVariable& Ah,
00220                                                                                                 const ExportVariable& Bh,
00221                                                                                                 bool STATES,
00222                                                                                                 uint number             );
00223 
00224 
00236                 returnValue sensitivitiesOutputs(       ExportStatementBlock* block,
00237                                                                                         const ExportIndex& index0,
00238                                                                                         const ExportIndex& index1,
00239                                                                                         const ExportIndex& index2,
00240                                                                                         const ExportIndex& tmp_index1,
00241                                                                                         const ExportIndex& tmp_index2,
00242                                                                                         const ExportIndex& tmp_index3,
00243                                                                                         const ExportVariable& tmp_meas,
00244                                                                                         const ExportVariable& time_tmp,
00245                                                                                         bool STATES,
00246                                                                                         uint base                       );
00247 
00248 
00256                 virtual returnValue propagateOutputs(   ExportStatementBlock* block,
00257                                                                                                 const ExportIndex& index,
00258                                                                                                 const ExportIndex& index0,
00259                                                                                                 const ExportIndex& index1,
00260                                                                                                 const ExportIndex& index2,
00261                                                                                                 const ExportIndex& index3,
00262                                                                                                 const ExportIndex& tmp_index1,
00263                                                                                                 const ExportIndex& tmp_index2,
00264                                                                                                 const ExportIndex& tmp_index3,
00265                                                                                                 const ExportIndex& tmp_index4,
00266                                                                                                 const ExportVariable& tmp_meas );
00267 
00268 
00273                 ExportVariable getAuxVariable() const;
00274 
00275 
00276     protected:
00277                 
00278 
00279 };
00280 
00281 
00282 CLOSE_NAMESPACE_ACADO
00283 
00284 
00285 #endif  // ACADO_TOOLKIT_IRK_FORWARD_EXPORT_HPP
00286 
00287 // end of file.


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