ocp_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 
32 #ifndef ACADO_TOOLKIT_OCP_EXPORT_HPP
33 #define ACADO_TOOLKIT_OCP_EXPORT_HPP
34 
36 #include <acado/ocp/ocp.hpp>
37 
39 
40 class IntegratorExport;
41 class ExportNLPSolver;
42 
57 class OCPexport : public ExportModule
58 {
59 public:
60 
63  OCPexport();
64 
69  OCPexport(const OCP& _ocp);
70 
72  virtual ~OCPexport()
73  {}
74 
84  virtual returnValue exportCode( const std::string& dirName,
85  const std::string& _realString = "real_t",
86  const std::string& _intString = "int",
87  int _precision = 16);
88 
95 
96 protected:
97 
110  returnValue setup();
111 
123 
133  ExportStruct dataStruct = ACADO_ANY) const;
134 
144 
155  returnValue exportAcadoHeader( const std::string& _dirName,
156  const std::string& _fileName,
157  const std::string& _realString = "real_t",
158  const std::string& _intString = "int",
159  int _precision = 16) const;
160 
162  std::shared_ptr< IntegratorExport > integrator;
163 
165  std::shared_ptr< ExportNLPSolver > solver;
166 
169 };
170 
172 
173 #endif // ACADO_TOOLKIT_OCP_EXPORT_HPP
returnValue collectFunctionDeclarations(ExportStatementBlock &declarations) const
Definition: ocp_export.cpp:717
returnValue exportAcadoHeader(const std::string &_dirName, const std::string &_fileName, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const
Definition: ocp_export.cpp:729
Allows to pass back messages to the calling function.
virtual returnValue exportCode(const std::string &dirName, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16)
Definition: ocp_export.cpp:68
#define CLOSE_NAMESPACE_ACADO
Base class for export of NLP/OCP solvers.
User-interface to automatically generate algorithms for fast model predictive control.
ExportStruct
virtual ~OCPexport()
Definition: ocp_export.hpp:72
Data class for defining optimal control problems.
Definition: ocp.hpp:89
returnValue setup()
Definition: ocp_export.cpp:476
Allows to export a tailored integrator for fast model predictive control.
returnValue checkConsistency() const
Definition: ocp_export.cpp:654
std::shared_ptr< ExportNLPSolver > solver
Definition: ocp_export.hpp:165
A user class for auto-generation of OCP solvers.
Definition: ocp_export.hpp:57
returnValue printDimensionsQP()
Definition: ocp_export.cpp:464
#define BEGIN_NAMESPACE_ACADO
returnValue collectDataDeclarations(ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
Definition: ocp_export.cpp:703
Allows to export code for a block of statements.
std::shared_ptr< IntegratorExport > integrator
Definition: ocp_export.hpp:162


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