A user class for auto-generation of OCP solvers. More...
#include <ocp_export.hpp>
Protected Attributes | |
std::shared_ptr< IntegratorExport > | integrator |
OCP | ocp |
std::shared_ptr< ExportNLPSolver > | solver |
Protected Attributes inherited from ExportModule | |
std::string | commonHeaderName |
Protected Attributes inherited from UserInteraction | |
BlockStatus | status |
Protected Attributes inherited from Options | |
std::vector< OptionsList > | lists |
Protected Attributes inherited from Logging | |
std::vector< LogRecord > | logCollection |
int | logIdx |
Protected Attributes inherited from Plotting | |
PlotCollection | plotCollection |
A user class for auto-generation of OCP solvers.
The class OCPexport is a user-interface to automatically generate tailored algorithms for fast model predictive control and moving horizon estimation. It takes an optimal control problem (OCP) formulation and generates code based on given user options, e.g specifying the number of integrator steps or the online QP solver.
\authors Boris Houska, Hans Joachim Ferreau, Milan Vukov \note Based on the old mpc_export class.
Definition at line 57 of file ocp_export.hpp.
BEGIN_NAMESPACE_ACADO OCPexport::OCPexport | ( | ) |
Default constructor.
Definition at line 54 of file ocp_export.cpp.
OCPexport::OCPexport | ( | const OCP & | _ocp | ) |
Constructor which takes OCP formulation.
@param[in] _ocp OCP formulation for code export.
Definition at line 60 of file ocp_export.cpp.
|
inlinevirtual |
Destructor.
Definition at line 72 of file ocp_export.hpp.
|
protected |
Checks whether OCP formulation is compatible with code export capabilities.
\return SUCCESSFUL_RETURN, \n RET_INVALID_OBJECTIVE_FOR_CODE_EXPORT, \n RET_ONLY_ODE_FOR_CODE_EXPORT, \n RET_NO_DISCRETE_ODE_FOR_CODE_EXPORT, \n RET_ONLY_STATES_AND_CONTROLS_FOR_CODE_EXPORT, \n RET_ONLY_EQUIDISTANT_GRID_FOR_CODE_EXPORT, \n RET_ONLY_BOUNDS_FOR_CODE_EXPORT
Definition at line 654 of file ocp_export.cpp.
|
protectedvirtual |
Collects all data declarations of the auto-generated sub-modules to given list of declarations.
[in] | declarations | List of declarations. |
Implements ExportModule.
Definition at line 703 of file ocp_export.cpp.
|
protectedvirtual |
Collects all function (forward) declarations of the auto-generated sub-modules to given list of declarations.
[in] | declarations | List of declarations. |
Implements ExportModule.
Definition at line 717 of file ocp_export.cpp.
|
protectedvirtual |
Exports main header file for using the exported MHE algorithm.
@param[in] _dirName Name of directory to be used to export file. @param[in] _fileName Name of file to be exported. @param[in] _realString std::string to be used to declare real variables. @param[in] _intString std::string to be used to declare integer variables. @param[in] _precision Number of digits to be used for exporting real values. \return SUCCESSFUL_RETURN
Implements ExportModule.
Definition at line 729 of file ocp_export.cpp.
|
virtual |
Exports all files of the auto-generated code into the given directory.
@param[in] dirName Name of directory to be used to export files. @param[in] _realString std::string to be used to declare real variables. @param[in] _intString std::string to be used to declare integer variables. @param[in] _precision Number of digits to be used for exporting real values. \return SUCCESSFUL_RETURN
Implements ExportModule.
Definition at line 68 of file ocp_export.cpp.
returnValue OCPexport::printDimensionsQP | ( | ) |
Prints dimensions (i.e. number of variables and constraints) of underlying QP.
\return SUCCESSFUL_RETURN
Definition at line 464 of file ocp_export.cpp.
|
protected |
Sets-up code export and initializes underlying export modules.
\return SUCCESSFUL_RETURN, \n RET_INVALID_OPTION, \n RET_INVALID_OBJECTIVE_FOR_CODE_EXPORT, \n RET_ONLY_ODE_FOR_CODE_EXPORT, \n RET_NO_DISCRETE_ODE_FOR_CODE_EXPORT, \n RET_ONLY_STATES_AND_CONTROLS_FOR_CODE_EXPORT, \n RET_ONLY_EQUIDISTANT_GRID_FOR_CODE_EXPORT, \n RET_ONLY_BOUNDS_FOR_CODE_EXPORT, \n RET_UNABLE_TO_EXPORT_CODE
Definition at line 476 of file ocp_export.cpp.
|
protected |
Shared pointer to a tailored integrator.
Definition at line 162 of file ocp_export.hpp.
|
protected |
Internal copy of the OCP object.
Definition at line 168 of file ocp_export.hpp.
|
protected |
Shared pointer to an NLP solver.
Definition at line 165 of file ocp_export.hpp.