irk_symmetric_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_IRK_SYMMETRIC_EXPORT_HPP
36 #define ACADO_TOOLKIT_IRK_SYMMETRIC_EXPORT_HPP
37 
39 
40 
42 
54 {
55  //
56  // PUBLIC MEMBER FUNCTIONS:
57  //
58 
59  public:
60 
66  SymmetricIRKExport( UserInteraction* _userInteraction = 0,
67  const std::string& _commonHeaderName = ""
68  );
69 
75  );
76 
79  virtual ~SymmetricIRKExport( );
80 
81 
87  );
88 
89 
94  virtual returnValue setup( );
95 
96 
104 
105 
113  ExportStruct dataStruct = ACADO_ANY
114  ) const;
115 
116 
124  ) const;
125 
126 
127 
135  );
136 
137 
138  protected:
139 
140 
150  const ExportIndex& k_index,
151  const ExportVariable& Ah,
152  const ExportVariable& C,
153  const ExportIndex& stage,
154  const ExportIndex& i,
155  const ExportIndex& tmp_index,
156  const ExportIndex& tmp_index2 );
157 
158 
166  const ExportIndex& index1,
167  const ExportIndex& index2,
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 
196  const ExportIndex& index1,
197  const ExportIndex& index2,
198  const ExportIndex& index3,
199  const ExportIndex& tmp_index1,
200  const ExportIndex& tmp_index2,
201  const ExportIndex& stepI,
202  const ExportVariable& Ah,
203  const ExportVariable& Bh,
204  const ExportVariable& det,
205  bool STATES,
206  uint number );
207 
208 
210 
211 
212  returnValue updateHessianTerm( ExportStatementBlock* block, const ExportIndex& index1, const ExportIndex& index2 );
213 
214 
220 
221 
222  protected:
223 
224 
229 
234 // ExportVariable rk_adj_traj; /**< Variable containing the adjoint trajectory of the lambda_hat values. */
239 // ExportVariable rk_diff_mu; /**< Sensitivities to update the mu variables. */
240 // ExportVariable rk_diff_lam; /**< Sensitivities to propagate the lambda variables. */
241 
242 // ExportVariable rk_lambda; /**< The lambda variables over the shooting interval. */
243 // ExportVariable rk_b_mu; /**< The lambda variables over the shooting interval. */
244 
247 };
248 
249 
251 
252 
253 #endif // ACADO_TOOLKIT_IRK_SYMMETRIC_EXPORT_HPP
254 
255 // end of file.
virtual returnValue setup()
ExportAcadoFunction adjoint_sweep
virtual returnValue propagateImplicitSystem(ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2, const ExportIndex &_index3, const ExportIndex &tmp_index)
virtual returnValue updateImplicitSystem(ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2, const ExportIndex &tmp_index)
Expression returnLowerTriangular(const Expression &expr)
Allows to export code of an ACADO function.
Allows to pass back messages to the calling function.
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
#define CLOSE_NAMESPACE_ACADO
virtual returnValue sensitivitiesImplicitSystem(ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2, const ExportIndex &index3, const ExportIndex &tmp_index1, const ExportIndex &tmp_index2, const ExportIndex &stepI, const ExportVariable &Ah, const ExportVariable &Bh, const ExportVariable &det, bool STATES, uint number)
virtual returnValue evaluateAllStatesImplicitSystem(ExportStatementBlock *block, const ExportIndex &k_index, const ExportVariable &Ah, const ExportVariable &C, const ExportIndex &stage, const ExportIndex &i, const ExportIndex &tmp_index, const ExportIndex &tmp_index2)
Defines a scalar-valued index variable to be used for exporting code.
Base class for all variables within the symbolic expressions family.
Definition: expression.hpp:56
SymmetricIRKExport(UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
virtual returnValue setDifferentialEquation(const Expression &rhs)
ExportStruct
ExportVariable getAuxVariable() const
ExportAcadoFunction diffs_sweep
virtual returnValue getFunctionDeclarations(ExportStatementBlock &declarations) const
virtual returnValue getDataDeclarations(ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
virtual returnValue getCode(ExportStatementBlock &code)
Encapsulates all user interaction for setting options, logging data and plotting results.
returnValue updateHessianTerm(ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2)
#define BEGIN_NAMESPACE_ACADO
Allows to export a tailored implicit Runge-Kutta integrator with symmetric second order sensitivity g...
Allows to export a tailored implicit Runge-Kutta integrator with forward sensitivity generation for f...
Allows to export code for a block of statements.
SymmetricIRKExport & operator=(const SymmetricIRKExport &arg)
ExportVariable rk_adj_diffs_tmp
Defines a matrix-valued variable to be used for exporting code.
ExportAcadoFunction rhs


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