narx_export.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 
35 #ifndef ACADO_TOOLKIT_NARX_EXPORT_HPP
36 #define ACADO_TOOLKIT_NARX_EXPORT_HPP
37 
39 
40 
42 
43 
55 {
56  //
57  // PUBLIC MEMBER FUNCTIONS:
58  //
59 
60  public:
61 
67  NARXExport( UserInteraction* _userInteraction = 0,
68  const std::string& _commonHeaderName = ""
69  );
70 
75  NARXExport( const NARXExport& arg
76  );
77 
80  virtual ~NARXExport( );
81 
82 
87  virtual returnValue setup( );
88 
89 
98 
99 
108  returnValue setModel( const std::string& _rhs, const std::string& _diffs_rhs );
109 
110 
118  ExportStruct dataStruct = ACADO_ANY
119  ) const;
120 
121 
129  const ExportIndex& index1,
130  const ExportIndex& index2,
131  const ExportIndex& tmp_index );
132 
133 
141  const ExportIndex& index1,
142  const ExportIndex& index2,
143  const ExportIndex& tmp_index );
144 
145 
153  const ExportIndex& index1,
154  const ExportIndex& index2,
155  const ExportIndex& tmp_index );
156 
157 
165  const ExportIndex& index1,
166  const ExportIndex& index2,
167  const ExportIndex& index3,
168  const ExportIndex& tmp_index );
169 
170 
178  const ExportIndex& index1,
179  const ExportIndex& index2,
180  const ExportIndex& index3,
181  const ExportIndex& tmp_index );
182 
183 
191  const ExportIndex& index1,
192  const ExportIndex& index2,
193  const ExportIndex& index3,
194  const ExportIndex& tmp_index );
195 
196 
205  returnValue setNARXmodel( const uint _delay, const DMatrix& _parms );
206 
207 
214  virtual returnValue setLinearOutput( const DMatrix& M3, const DMatrix& A3, const Expression& rhs );
215 
216 
223  virtual returnValue setLinearOutput( const DMatrix& M3, const DMatrix& A3, const std::string& _rhs3, const std::string& _diffs_rhs3 );
224 
225 
226  protected:
227 
228 
234 
235 
239  returnValue formNARXpolynomial( const uint num, const uint order, uint& base, const uint index, IntermediateState& result );
240 
241 
242  protected:
243 
246 
247 };
248 
250  const std::string &_commonHeaderName);
251 
252 
254 
255 
256 #endif // ACADO_TOOLKIT_NARX_EXPORT_HPP
257 
258 // end of file.
returnValue updateImplicitSystem(ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2, const ExportIndex &tmp_index)
virtual returnValue updateOutputSystem(ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2, const ExportIndex &tmp_index)
returnValue propagateInputSystem(ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2, const ExportIndex &index3, const ExportIndex &tmp_index)
Allows to pass back messages to the calling function.
returnValue setNARXmodel(const uint _delay, const DMatrix &_parms)
Block< Derived > block(Index startRow, Index startCol, Index blockRows, Index blockCols)
Definition: BlockMethods.h:56
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
IntegratorExport * createNARXExport(UserInteraction *_userInteraction, const std::string &_commonHeaderName)
#define CLOSE_NAMESPACE_ACADO
Defines a scalar-valued index variable to be used for exporting code.
virtual ~NARXExport()
Definition: narx_export.cpp:62
Base class for all variables within the symbolic expressions family.
Definition: expression.hpp:56
ExportStruct
returnValue prepareFullRhs()
NARXExport(UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
Definition: narx_export.cpp:44
Allows to export a tailored discrete-time &#39;integrator&#39; for fast model predictive control.
Encapsulates all user interaction for setting options, logging data and plotting results.
virtual returnValue propagateOutputSystem(ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2, const ExportIndex &index3, const ExportIndex &tmp_index)
returnValue setModel(const std::string &_rhs, const std::string &_diffs_rhs)
virtual returnValue setup()
Definition: narx_export.cpp:68
Allows to export a tailored integrator for fast model predictive control.
virtual returnValue setDifferentialEquation(const Expression &rhs)
Allows to export a tailored polynomial NARX integrator for fast model predictive control.
Definition: narx_export.hpp:54
#define BEGIN_NAMESPACE_ACADO
Allows to export code for a block of statements.
returnValue formNARXpolynomial(const uint num, const uint order, uint &base, const uint index, IntermediateState &result)
DMatrix parms
returnValue propagateImplicitSystem(ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2, const ExportIndex &index3, const ExportIndex &tmp_index)
virtual returnValue setLinearOutput(const DMatrix &M3, const DMatrix &A3, const Expression &rhs)
virtual returnValue getDataDeclarations(ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
ExportAcadoFunction rhs
returnValue updateInputSystem(ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2, const ExportIndex &tmp_index)


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