Public Member Functions | Protected Member Functions

Allows to export a tailored implicit Runge-Kutta integrator with forward sensitivity generation for fast model predictive control. More...

#include <irk_forward_export.hpp>

Inheritance diagram for ForwardIRKExport:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ForwardIRKExport (UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
 ForwardIRKExport (const ForwardIRKExport &arg)
virtual returnValue getCode (ExportStatementBlock &code)
virtual returnValue getDataDeclarations (ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
virtual returnValue getFunctionDeclarations (ExportStatementBlock &declarations) const
ForwardIRKExportoperator= (const ForwardIRKExport &arg)
virtual returnValue setup ()
virtual ~ForwardIRKExport ()

Protected Member Functions

ExportVariable getAuxVariable () const
returnValue getCRSIndex (uint output, ExportIndex row, ExportIndex col)
virtual returnValue prepareInputSystem (ExportStatementBlock &code)
virtual returnValue prepareOutputSystem (ExportStatementBlock &code)
virtual returnValue 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)
virtual returnValue 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)
virtual returnValue sensitivitiesInputSystem (ExportStatementBlock *block, const ExportIndex &index1, const ExportIndex &index2, const ExportVariable &Bh, bool STATES)
returnValue 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)
virtual returnValue 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)

Detailed Description

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.

Author:
Rien Quirynen

Definition at line 55 of file irk_forward_export.hpp.


Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO ForwardIRKExport::ForwardIRKExport ( UserInteraction _userInteraction = 0,
const std::string &  _commonHeaderName = "" 
)

Default constructor.

Parameters:
[in]_userInteractionPointer to corresponding user interface.
[in]_commonHeaderNameName of common header file to be included.

Definition at line 45 of file irk_forward_export.cpp.

Copy constructor (deep copy).

Parameters:
[in]argRight-hand side object.

Definition at line 51 of file irk_forward_export.cpp.

Destructor.

Definition at line 56 of file irk_forward_export.cpp.


Member Function Documentation

ExportVariable ForwardIRKExport::getAuxVariable ( ) const [protected, virtual]

Returns the largest global export variable.

Returns:
SUCCESSFUL_RETURN

Reimplemented from ImplicitRungeKuttaExport.

Definition at line 77 of file irk_forward_export.cpp.

Exports source code of the auto-generated integrator into the given directory.

Parameters:
[in]codeCode block containing the auto-generated integrator.
Returns:
SUCCESSFUL_RETURN

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.

Parameters:
[in]outputThe number of the output function.
[in]rowThe number of the row, corresponding the element of interest.
[in]colThe number of the column, corresponding the element of interest.
Returns:
The CRS index.

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.

Parameters:
[in]declarationsList of declarations.
Returns:
SUCCESSFUL_RETURN

Reimplemented from ImplicitRungeKuttaExport.

Definition at line 112 of file irk_forward_export.cpp.

Adds all function (forward) declarations of the auto-generated integrator to given list of declarations.

Parameters:
[in]declarationsList of declarations.
Returns:
SUCCESSFUL_RETURN

Reimplemented from ImplicitRungeKuttaExport.

Definition at line 140 of file irk_forward_export.cpp.

ForwardIRKExport & ForwardIRKExport::operator= ( const ForwardIRKExport arg)

Assignment operator (deep copy).

Parameters:
[in]argRight-hand side object.

Definition at line 66 of file irk_forward_export.cpp.

Precompute as much as possible for the linear input system and export the resulting definitions.

Parameters:
[in]codeThe block to which the code will be exported.
Returns:
SUCCESSFUL_RETURN

Reimplemented from ImplicitRungeKuttaExport.

Reimplemented in DiagonallyImplicitRKExport.

Definition at line 633 of file irk_forward_export.cpp.

Precompute as much as possible for the linear output system and export the resulting definitions.

Parameters:
[in]codeThe block to which the code will be exported.
Returns:
SUCCESSFUL_RETURN

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.

Parameters:
[in]blockThe block to which the code will be exported.
[in]tmp_measThe number of measurements in the current integration step (in case of an online grid).
Returns:
SUCCESSFUL_RETURN

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.

Parameters:
[in]blockThe block to which the code will be exported.
[in]AhThe variable containing the internal coefficients of the RK method, multiplied with the step size.
[in]BhThe variable containing the weights of the RK method, multiplied with the step size.
[in]detThe variable that holds the determinant of the matrix in the linear system.
[in]STATESTrue if the sensitivities with respect to a state are needed, false otherwise.
[in]numberThis number defines the stage of the state with respect to which the sensitivities are computed.
Returns:
SUCCESSFUL_RETURN

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.

Parameters:
[in]blockThe block to which the code will be exported.
[in]BhThe variable containing the weights of the RK method, multiplied with the step size.
[in]STATESTrue if the sensitivities with respect to a state are needed, false otherwise.
Returns:
SUCCESSFUL_RETURN

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.

Parameters:
[in]blockThe block to which the code will be exported.
[in]tmp_measThe number of measurements in the current integration step (in case of an online grid).
[in]rk_tPrevThe time point, defining the beginning of the current integration step (in case of an online grid).
[in]time_tmpA variable used for time transformations (in case of an online grid).
[in]STATESTrue if the sensitivities with respect to a state are needed, false otherwise.
[in]baseThe number of states in stages with respect to which the sensitivities have already been computed.
Returns:
SUCCESSFUL_RETURN

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.

Parameters:
[in]blockThe block to which the code will be exported.
[in]AhThe variable containing the internal coefficients of the RK method, multiplied with the step size.
[in]BhThe variable containing the weights of the RK method, multiplied with the step size.
[in]STATESTrue if the sensitivities with respect to a state are needed, false otherwise.
[in]numberThis number defines the stage of the state with respect to which the sensitivities are computed.
Returns:
SUCCESSFUL_RETURN

Implements RKSensitivitiesExport.

Reimplemented in DiagonallyImplicitRKExport.

Definition at line 818 of file irk_forward_export.cpp.

Initializes export of a tailored integrator.

Returns:
SUCCESSFUL_RETURN

Reimplemented from ImplicitRungeKuttaExport.

Reimplemented in DiagonallyImplicitRKExport.

Definition at line 1040 of file irk_forward_export.cpp.


The documentation for this class was generated from the following files:


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:38