Allows to export a tailored Runge-Kutta integrator for fast model predictive control. More...
#include <rk_export.hpp>
Allows to export a tailored Runge-Kutta integrator for fast model predictive control.
The class RungeKuttaExport allows to export a tailored Runge-Kutta integrator for fast model predictive control.
Definition at line 54 of file rk_export.hpp.
BEGIN_NAMESPACE_ACADO RungeKuttaExport::RungeKuttaExport | ( | 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 45 of file rk_export.cpp.
RungeKuttaExport::RungeKuttaExport | ( | const RungeKuttaExport & | arg | ) |
Copy constructor (deep copy).
[in] | arg | Right-hand side object. |
Definition at line 52 of file rk_export.cpp.
RungeKuttaExport::~RungeKuttaExport | ( | ) | [virtual] |
Destructor.
Definition at line 59 of file rk_export.cpp.
BooleanType RungeKuttaExport::checkSymmetry | ( | const DVector & | _cc | ) |
This routine checks the symmetry of the cc vector from the Butcher Tableau.
Definition at line 93 of file rk_export.cpp.
returnValue RungeKuttaExport::copy | ( | const RungeKuttaExport & | arg | ) | [protected, virtual] |
Copies all class members from given object.
[in] | arg | Right-hand side object. |
Definition at line 122 of file rk_export.cpp.
virtual returnValue RungeKuttaExport::getCode | ( | ExportStatementBlock & | code | ) | [pure virtual] |
Exports source code of the auto-generated integrator into the given directory.
[in] | code | Code block containing the auto-generated integrator. |
Implements IntegratorExport.
Implemented in ImplicitRungeKuttaExport, ExplicitRungeKuttaExport, ForwardIRKExport, ThreeSweepsERKExport, and AdjointERKExport.
virtual returnValue RungeKuttaExport::getDataDeclarations | ( | ExportStatementBlock & | declarations, |
ExportStruct | dataStruct = ACADO_ANY |
||
) | const [pure virtual] |
Adds all data declarations of the auto-generated integrator to given list of declarations.
[in] | declarations | List of declarations. |
Implements IntegratorExport.
Implemented in ImplicitRungeKuttaExport, ExplicitRungeKuttaExport, ThreeSweepsERKExport, AdjointERKExport, and ForwardIRKExport.
virtual returnValue RungeKuttaExport::getFunctionDeclarations | ( | ExportStatementBlock & | declarations | ) | const [pure virtual] |
Adds all function (forward) declarations of the auto-generated integrator to given list of declarations.
[in] | declarations | List of declarations. |
Implements IntegratorExport.
Implemented in ImplicitRungeKuttaExport, ExplicitRungeKuttaExport, and ForwardIRKExport.
This routine returns the number of stages of the Runge-Kutta integrator that will be exported.
Definition at line 106 of file rk_export.cpp.
returnValue RungeKuttaExport::initializeButcherTableau | ( | const DMatrix & | _AA, |
const DVector & | _bb, | ||
const DVector & | _cc | ||
) |
This routine initializes the matrices AA, bb and cc which form the Butcher Tableau.
Definition at line 78 of file rk_export.cpp.
RungeKuttaExport & RungeKuttaExport::operator= | ( | const RungeKuttaExport & | arg | ) |
Assignment operator (deep copy).
[in] | arg | Right-hand side object. |
Definition at line 65 of file rk_export.cpp.
virtual returnValue RungeKuttaExport::setDifferentialEquation | ( | const Expression & | rhs | ) | [pure virtual] |
Assigns Differential Equation to be used by the integrator.
[in] | rhs | Right-hand side expression. |
Implements IntegratorExport.
Implemented in ImplicitRungeKuttaExport, ExplicitRungeKuttaExport, ThreeSweepsERKExport, AdjointERKExport, and ForwardOverBackwardERKExport.
returnValue RungeKuttaExport::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.
Definition at line 112 of file rk_export.cpp.
virtual returnValue RungeKuttaExport::setup | ( | ) | [pure virtual] |
Initializes export of a tailored integrator.
Implements IntegratorExport.
Implemented in DiagonallyImplicitRKExport, ThreeSweepsERKExport, AdjointERKExport, ForwardOverBackwardERKExport, ImplicitRungeKuttaExport, ForwardIRKExport, and ExplicitRungeKuttaExport.
virtual returnValue RungeKuttaExport::setupOutput | ( | const std::vector< Grid > | outputGrids_, |
const std::vector< Expression > | rhs | ||
) | [pure 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.
Implemented in ExplicitRungeKuttaExport, and ImplicitRungeKuttaExport.
DMatrix RungeKuttaExport::AA [protected] |
This matrix defines the Runge-Kutta method to be exported.
Definition at line 191 of file rk_export.hpp.
DVector RungeKuttaExport::bb [protected] |
Definition at line 192 of file rk_export.hpp.
DVector RungeKuttaExport::cc [protected] |
These vectors define the Runge-Kutta method to be exported.
Definition at line 192 of file rk_export.hpp.
BooleanType RungeKuttaExport::is_symmetric [protected] |
Boolean defining whether a certain RK method is symmetric or not, which is important for backward sensitivity propagation.
Definition at line 194 of file rk_export.hpp.
uint RungeKuttaExport::numStages [protected] |
This is the number of stages for the Runge-Kutta method.
Definition at line 196 of file rk_export.hpp.
ExportVariable RungeKuttaExport::rk_kkk [protected] |
Variable containing intermediate results of the RK integrator.
Definition at line 189 of file rk_export.hpp.