linear_solver_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 
34 #ifndef ACADO_TOOLKIT_EXPORT_LINEAR_SOLVER_HPP
35 #define ACADO_TOOLKIT_EXPORT_LINEAR_SOLVER_HPP
36 
44 
46 
47 
49 
50 
63 {
64  //
65  // PUBLIC MEMBER FUNCTIONS:
66  //
67  public:
68 
74  ExportLinearSolver( UserInteraction* _userInteraction = 0,
75  const std::string& _commonHeaderName = ""
76  );
77 
79  virtual ~ExportLinearSolver( );
80 
85  virtual returnValue setup( ) = 0;
86 
87 
99  returnValue init( const uint newDim,
100  const bool& reuse = true,
101  const bool& unrolling = false
102  );
103 
104  returnValue init( const uint newDim,
105  const uint _nRightHandSides,
106  const bool& reuse = true,
107  const bool& unrolling = false
108  );
109 
110 
123  returnValue init( const uint newDim,
124  const bool& reuse,
125  const bool& unrolling,
126  const std::string& newId
127  );
128 
130  returnValue init( unsigned _nRows,
131  unsigned _nCols,
132  unsigned _nBacksolves,
133  bool _reuse,
134  bool _unroll,
135  const std::string& _id
136  );
137 
139  returnValue init( unsigned _nRows,
140  unsigned _nCols,
141  unsigned _nBacksolves,
142  unsigned _nRightHandSides,
143  bool _reuse,
144  bool _unroll,
145  const std::string& _id
146  );
147 
155  ExportStruct dataStruct = ACADO_ANY
156  ) const = 0;
157 
158 
166  ) const = 0;
167 
168 
176  ) = 0;
177 
178 
185  virtual returnValue appendVariableNames( std::stringstream& string ) = 0;
186 
187 
192  uint getDim() const;
193 
194 
199  virtual ExportVariable getGlobalExportVariable( const uint factor ) const;
200 
201 
206  bool getReuse() const;
207 
208 
215  returnValue setReuse( const bool& reuse );
216 
217 
222  bool getTranspose() const;
223 
224 
231  returnValue setTranspose( const bool& transpose );
232 
233 
240  bool getUnrolling() const;
241 
242 
250  returnValue setUnrolling( const bool& unrolling );
251 
252 
257  const std::string getNameSolveFunction();
258 
259 
266  const std::string getNameSolveReuseFunction();
267  const std::string getNameSolveTransposeReuseFunction();
268 
269  //
270  // PROTECTED MEMBER FUNCTIONS:
271  //
272  protected:
273 
274 
275  protected:
276 
277  std::string identifier;
279  bool UNROLLING;
280  bool REUSE;
281  bool TRANSPOSE;
284  unsigned nRows;
285  unsigned nCols;
286  unsigned nBacksolves;
287  unsigned nRightHandSides;
289  // DEFINITION OF THE EXPORTVARIABLES
299 };
300 
301 
303 
304 
305 #endif // ACADO_TOOLKIT_EXPORT_LINEAR_SOLVER_HPP
306 
307 // end of file.
returnValue setUnrolling(const bool &unrolling)
const std::string getNameSolveTransposeReuseFunction()
ExportFunction solveReuseTranspose
returnValue setTranspose(const bool &transpose)
virtual ExportVariable getGlobalExportVariable(const uint factor) const
Allows to pass back messages to the calling function.
virtual returnValue getFunctionDeclarations(ExportStatementBlock &declarations) const =0
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
#define CLOSE_NAMESPACE_ACADO
ExportFunction solveTriangular
Allows to export automatically generated algorithms for fast model predictive control.
ExportStruct
const std::string getNameSolveReuseFunction()
ExportLinearSolver(UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
Encapsulates all user interaction for setting options, logging data and plotting results.
Allows to export code of an arbitrary function.
returnValue setReuse(const bool &reuse)
virtual returnValue setup()=0
const std::string getNameSolveFunction()
#define BEGIN_NAMESPACE_ACADO
virtual returnValue getDataDeclarations(ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const =0
Allows to export automatically generated algorithms for solving linear systems of specific dimensions...
virtual returnValue getCode(ExportStatementBlock &code)=0
Allows to export code for a block of statements.
returnValue init(const uint newDim, const bool &reuse=true, const bool &unrolling=false)
virtual returnValue appendVariableNames(std::stringstream &string)=0
Defines a matrix-valued variable to be used for exporting code.


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