Allows to export a tailored implicit Runge-Kutta integrator with forward sensitivity generation for fast model predictive control. More...
#include <irk_forward_export.hpp>
Allows to export a tailored implicit Runge-Kutta integrator with forward sensitivity generation for fast model predictive control.
The class ForwardIRKExport allows to export a tailored implicit Runge-Kutta integrator with forward sensitivity generation for fast model predictive control.
Definition at line 55 of file irk_forward_export.hpp.
BEGIN_NAMESPACE_ACADO ForwardIRKExport::ForwardIRKExport | ( | 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 irk_forward_export.cpp.
ForwardIRKExport::ForwardIRKExport | ( | const ForwardIRKExport & | arg | ) |
Copy constructor (deep copy).
[in] | arg | Right-hand side object. |
Definition at line 51 of file irk_forward_export.cpp.
ForwardIRKExport::~ForwardIRKExport | ( | ) | [virtual] |
Destructor.
Definition at line 56 of file irk_forward_export.cpp.
ExportVariable ForwardIRKExport::getAuxVariable | ( | ) | const [protected, virtual] |
Returns the largest global export variable.
Reimplemented from ImplicitRungeKuttaExport.
Definition at line 77 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::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. |
Reimplemented from ImplicitRungeKuttaExport.
Definition at line 149 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::getCRSIndex | ( | uint | output, |
ExportIndex | row, | ||
ExportIndex | col | ||
) | [protected] |
Returns the index corresponding Compressed Row Storage (CRS) for the dependency matrix of a specific output function.
[in] | output | The number of the output function. |
[in] | row | The number of the row, corresponding the element of interest. |
[in] | col | The number of the column, corresponding the element of interest. |
Reimplemented from ImplicitRungeKuttaExport.
returnValue ForwardIRKExport::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. |
Reimplemented from ImplicitRungeKuttaExport.
Definition at line 112 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::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. |
Reimplemented from ImplicitRungeKuttaExport.
Definition at line 140 of file irk_forward_export.cpp.
ForwardIRKExport & ForwardIRKExport::operator= | ( | const ForwardIRKExport & | arg | ) |
Assignment operator (deep copy).
[in] | arg | Right-hand side object. |
Definition at line 66 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::prepareInputSystem | ( | ExportStatementBlock & | code | ) | [protected, virtual] |
Precompute as much as possible for the linear input system and export the resulting definitions.
[in] | code | The block to which the code will be exported. |
Reimplemented from ImplicitRungeKuttaExport.
Reimplemented in DiagonallyImplicitRKExport.
Definition at line 633 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::prepareOutputSystem | ( | ExportStatementBlock & | code | ) | [protected, virtual] |
Precompute as much as possible for the linear output system and export the resulting definitions.
[in] | code | The block to which the code will be exported. |
Reimplemented from ImplicitRungeKuttaExport.
Reimplemented in DiagonallyImplicitRKExport.
Definition at line 682 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::propagateOutputs | ( | ExportStatementBlock * | block, |
const ExportIndex & | index, | ||
const ExportIndex & | index0, | ||
const ExportIndex & | index1, | ||
const ExportIndex & | index2, | ||
const ExportIndex & | index3, | ||
const ExportIndex & | tmp_index1, | ||
const ExportIndex & | tmp_index2, | ||
const ExportIndex & | tmp_index3, | ||
const ExportIndex & | tmp_index4, | ||
const ExportVariable & | tmp_meas | ||
) | [protected, virtual] |
Exports the propagation of the sensitivities for the continuous output.
[in] | block | The block to which the code will be exported. |
[in] | tmp_meas | The number of measurements in the current integration step (in case of an online grid). |
Definition at line 533 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::sensitivitiesImplicitSystem | ( | ExportStatementBlock * | block, |
const ExportIndex & | index1, | ||
const ExportIndex & | index2, | ||
const ExportIndex & | index3, | ||
const ExportIndex & | tmp_index1, | ||
const ExportIndex & | tmp_index2, | ||
const ExportVariable & | Ah, | ||
const ExportVariable & | Bh, | ||
const ExportVariable & | det, | ||
bool | STATES, | ||
uint | number | ||
) | [protected, virtual] |
Exports the code needed to compute the sensitivities of the states defined by the nonlinear, fully implicit system.
[in] | block | The block to which the code will be exported. |
[in] | Ah | The variable containing the internal coefficients of the RK method, multiplied with the step size. |
[in] | Bh | The variable containing the weights of the RK method, multiplied with the step size. |
[in] | det | The variable that holds the determinant of the matrix in the linear system. |
[in] | STATES | True if the sensitivities with respect to a state are needed, false otherwise. |
[in] | number | This number defines the stage of the state with respect to which the sensitivities are computed. |
Implements RKSensitivitiesExport.
Reimplemented in DiagonallyImplicitRKExport.
Definition at line 738 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::sensitivitiesInputSystem | ( | ExportStatementBlock * | block, |
const ExportIndex & | index1, | ||
const ExportIndex & | index2, | ||
const ExportVariable & | Bh, | ||
bool | STATES | ||
) | [protected, virtual] |
Exports the code needed to compute the sensitivities of the states, defined by the linear input system.
[in] | block | The block to which the code will be exported. |
[in] | Bh | The variable containing the weights of the RK method, multiplied with the step size. |
[in] | STATES | True if the sensitivities with respect to a state are needed, false otherwise. |
Implements RKSensitivitiesExport.
Definition at line 717 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::sensitivitiesOutputs | ( | ExportStatementBlock * | block, |
const ExportIndex & | index0, | ||
const ExportIndex & | index1, | ||
const ExportIndex & | index2, | ||
const ExportIndex & | tmp_index1, | ||
const ExportIndex & | tmp_index2, | ||
const ExportIndex & | tmp_index3, | ||
const ExportVariable & | tmp_meas, | ||
const ExportVariable & | time_tmp, | ||
bool | STATES, | ||
uint | base | ||
) | [protected, virtual] |
Exports the computation of the sensitivities for the continuous output.
[in] | block | The block to which the code will be exported. |
[in] | tmp_meas | The number of measurements in the current integration step (in case of an online grid). |
[in] | rk_tPrev | The time point, defining the beginning of the current integration step (in case of an online grid). |
[in] | time_tmp | A variable used for time transformations (in case of an online grid). |
[in] | STATES | True if the sensitivities with respect to a state are needed, false otherwise. |
[in] | base | The number of states in stages with respect to which the sensitivities have already been computed. |
Implements RKSensitivitiesExport.
Definition at line 924 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::sensitivitiesOutputSystem | ( | ExportStatementBlock * | block, |
const ExportIndex & | index1, | ||
const ExportIndex & | index2, | ||
const ExportIndex & | index3, | ||
const ExportIndex & | index4, | ||
const ExportIndex & | tmp_index1, | ||
const ExportIndex & | tmp_index2, | ||
const ExportVariable & | Ah, | ||
const ExportVariable & | Bh, | ||
bool | STATES, | ||
uint | number | ||
) | [protected, virtual] |
Exports the code needed to compute the sensitivities of the states, defined by the linear output system.
[in] | block | The block to which the code will be exported. |
[in] | Ah | The variable containing the internal coefficients of the RK method, multiplied with the step size. |
[in] | Bh | The variable containing the weights of the RK method, multiplied with the step size. |
[in] | STATES | True if the sensitivities with respect to a state are needed, false otherwise. |
[in] | number | This number defines the stage of the state with respect to which the sensitivities are computed. |
Implements RKSensitivitiesExport.
Reimplemented in DiagonallyImplicitRKExport.
Definition at line 818 of file irk_forward_export.cpp.
returnValue ForwardIRKExport::setup | ( | ) | [virtual] |
Initializes export of a tailored integrator.
Reimplemented from ImplicitRungeKuttaExport.
Reimplemented in DiagonallyImplicitRKExport.
Definition at line 1040 of file irk_forward_export.cpp.