Allows to export a tailored discrete-time 'integrator' for fast model predictive control. More...
#include <discrete_export.hpp>
Public Member Functions | |
DiscreteTimeExport (UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="") | |
DiscreteTimeExport (const DiscreteTimeExport &arg) | |
virtual returnValue | getCode (ExportStatementBlock &code) |
virtual returnValue | getDataDeclarations (ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const |
virtual returnValue | getFunctionDeclarations (ExportStatementBlock &declarations) const |
DiscreteTimeExport & | operator= (const DiscreteTimeExport &arg) |
virtual returnValue | setDifferentialEquation (const Expression &rhs) |
virtual returnValue | setNARXmodel (const uint delay, const DMatrix &parms) |
virtual returnValue | setup () |
virtual returnValue | setupOutput (const std::vector< Grid > outputGrids_, const std::vector< Expression > rhs) |
virtual returnValue | setupOutput (const std::vector< Grid > outputGrids_, const std::vector< std::string > _outputNames, const std::vector< std::string > _diffs_outputNames, const std::vector< uint > _dims_output) |
virtual returnValue | setupOutput (const std::vector< Grid > outputGrids_, const std::vector< std::string > _outputNames, const std::vector< std::string > _diffs_outputNames, const std::vector< uint > _dims_output, const std::vector< DMatrix > _outputDependencies) |
virtual | ~DiscreteTimeExport () |
Protected Member Functions | |
virtual returnValue | copy (const DiscreteTimeExport &arg) |
ExportVariable | getAuxVariable () const |
Protected Attributes | |
ExportVariable | rk_diffsTemp3 |
Allows to export a tailored discrete-time 'integrator' for fast model predictive control.
The class DiscreteTimeExport allows to export a tailored discrete-time 'integrator' for fast model predictive control.
Definition at line 56 of file discrete_export.hpp.
BEGIN_NAMESPACE_ACADO DiscreteTimeExport::DiscreteTimeExport | ( | UserInteraction * | _userInteraction = 0 , |
const std::string & | _commonHeaderName = "" |
||
) |
Default constructor.
[in] | _userInteraction | Pointer to corresponding user interface. |
[in] | _commonHeaderName | Name of common header file to be included. |
Definition at line 44 of file discrete_export.cpp.
DiscreteTimeExport::DiscreteTimeExport | ( | const DiscreteTimeExport & | arg | ) |
Copy constructor (deep copy).
[in] | arg | Right-hand side object. |
Definition at line 51 of file discrete_export.cpp.
DiscreteTimeExport::~DiscreteTimeExport | ( | ) | [virtual] |
Destructor.
Definition at line 58 of file discrete_export.cpp.
returnValue DiscreteTimeExport::copy | ( | const DiscreteTimeExport & | arg | ) | [protected, virtual] |
Copies all class members from given object.
[in] | arg | Right-hand side object. |
Definition at line 496 of file discrete_export.cpp.
ExportVariable DiscreteTimeExport::getAuxVariable | ( | ) | const [protected, virtual] |
Returns the largest global export variable.
Implements IntegratorExport.
Definition at line 469 of file discrete_export.cpp.
returnValue DiscreteTimeExport::getCode | ( | ExportStatementBlock & | code | ) | [virtual] |
Exports source code of the auto-generated integrator into the given directory.
[in] | code | Code block containing the auto-generated integrator. |
Implements IntegratorExport.
Definition at line 337 of file discrete_export.cpp.
returnValue DiscreteTimeExport::getDataDeclarations | ( | ExportStatementBlock & | declarations, |
ExportStruct | dataStruct = ACADO_ANY |
||
) | const [virtual] |
Adds all data declarations of the auto-generated integrator to given list of declarations.
[in] | declarations | List of declarations. |
Implements IntegratorExport.
Reimplemented in NARXExport.
Definition at line 102 of file discrete_export.cpp.
returnValue DiscreteTimeExport::getFunctionDeclarations | ( | ExportStatementBlock & | declarations | ) | const [virtual] |
Adds all function (forward) declarations of the auto-generated integrator to given list of declarations.
[in] | declarations | List of declarations. |
Implements IntegratorExport.
Definition at line 124 of file discrete_export.cpp.
DiscreteTimeExport & DiscreteTimeExport::operator= | ( | const DiscreteTimeExport & | arg | ) |
Assignment operator (deep copy).
[in] | arg | Right-hand side object. |
Definition at line 442 of file discrete_export.cpp.
returnValue DiscreteTimeExport::setDifferentialEquation | ( | const Expression & | rhs | ) | [virtual] |
Assigns Differential Equation to be used by the integrator.
[in] | rhs | Right-hand side expression. |
Implements IntegratorExport.
Reimplemented in NARXExport.
Definition at line 64 of file discrete_export.cpp.
returnValue DiscreteTimeExport::setNARXmodel | ( | const uint | delay, |
const DMatrix & | parms | ||
) | [virtual] |
Sets a polynomial NARX model to be used by the integrator.
[in] | delay | The delay for the states in the NARX model. |
[in] | parms | The parameters defining the polynomial NARX model. |
Implements IntegratorExport.
Reimplemented in NARXExport.
Definition at line 411 of file discrete_export.cpp.
returnValue DiscreteTimeExport::setup | ( | ) | [virtual] |
Initializes export of a tailored integrator.
Implements IntegratorExport.
Reimplemented in NARXExport.
Definition at line 136 of file discrete_export.cpp.
returnValue DiscreteTimeExport::setupOutput | ( | const std::vector< Grid > | outputGrids_, |
const std::vector< Expression > | rhs | ||
) | [virtual] |
Sets up the output with the grids for the different output functions.
outputGrids_ | The vector containing a grid for each output function. |
rhs | The expressions corresponding the output functions. |
Implements IntegratorExport.
Definition at line 417 of file discrete_export.cpp.
returnValue DiscreteTimeExport::setupOutput | ( | const std::vector< Grid > | outputGrids_, |
const std::vector< std::string > | _outputNames, | ||
const std::vector< std::string > | _diffs_outputNames, | ||
const std::vector< uint > | _dims_output | ||
) | [virtual] |
Sets up the output with the grids for the different output functions.
outputGrids_ | The vector containing a grid for each output function. |
_outputNames | The names of the output functions. |
_diffs_outputNames | The names of the functions, evaluating the derivatives of the outputs. |
_dims_output | The dimensions of the output functions. |
Implements IntegratorExport.
Definition at line 423 of file discrete_export.cpp.
returnValue DiscreteTimeExport::setupOutput | ( | const std::vector< Grid > | outputGrids_, |
const std::vector< std::string > | _outputNames, | ||
const std::vector< std::string > | _diffs_outputNames, | ||
const std::vector< uint > | _dims_output, | ||
const std::vector< DMatrix > | _outputDependencies | ||
) | [virtual] |
Sets up the output with the grids for the different output functions.
outputGrids_ | The vector containing a grid for each output function. |
_outputNames | The names of the output functions. |
_diffs_outputNames | The names of the functions, evaluating the derivatives of the outputs. |
_dims_output | The dimensions of the output functions. |
_outputDependencies | A separate dependency matrix for each output. |
Implements IntegratorExport.
Definition at line 432 of file discrete_export.cpp.
ExportVariable DiscreteTimeExport::rk_diffsTemp3 [protected] |
Definition at line 216 of file discrete_export.hpp.