Public Member Functions | Protected Attributes | List of all members

Allows to export automatically generated algorithms for fast model predictive control. More...

#include <export_algorithm.hpp>

Inheritance diagram for ExportAlgorithm:
Inheritance graph
[legend]

Public Member Functions

 ExportAlgorithm (UserInteraction *_userInteraction=0, const std::string &_commonHeaderName=std::string())
 
virtual returnValue getCode (ExportStatementBlock &code)=0
 
virtual returnValue getDataDeclarations (ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const =0
 
virtual returnValue getFunctionDeclarations (ExportStatementBlock &declarations) const =0
 
uint getN () const
 
uint getNDX () const
 
uint getNOD () const
 
uint getNP () const
 
uint getNU () const
 
uint getNX () const
 
uint getNXA () const
 
uint getNY () const
 
uint getNYN () const
 
returnValue setDimensions (uint _NX=0, uint _NU=0, uint _NP=0, uint _NI=0, uint _NOD=0)
 
returnValue setDimensions (uint _NX, uint _NDX, uint _NXA, uint _NU, uint _NP, uint _NI, uint _NOD)
 
void setNY (uint NY_)
 
void setNYN (uint NYN_)
 
virtual returnValue setup ()
 
virtual ~ExportAlgorithm ()
 
- Public Member Functions inherited from AlgorithmicBase
int addLogRecord (LogRecord &_record)
 
returnValue addOption (OptionsName name, int value)
 
returnValue addOption (OptionsName name, double value)
 
returnValue addOption (uint idx, OptionsName name, int value)
 
returnValue addOption (uint idx, OptionsName name, double value)
 
returnValue addOptionsList ()
 
 AlgorithmicBase ()
 
 AlgorithmicBase (UserInteraction *_userInteraction)
 
 AlgorithmicBase (const AlgorithmicBase &rhs)
 
returnValue get (OptionsName name, int &value) const
 
returnValue get (OptionsName name, double &value) const
 
returnValue get (OptionsName name, std::string &value) const
 
returnValue get (uint idx, OptionsName name, int &value) const
 
returnValue get (uint idx, OptionsName name, double &value) const
 
returnValue getAll (LogName _name, MatrixVariablesGrid &values) const
 
returnValue getFirst (LogName _name, DMatrix &firstValue) const
 
returnValue getFirst (LogName _name, VariablesGrid &firstValue) const
 
returnValue getLast (LogName _name, DMatrix &lastValue) const
 
returnValue getLast (LogName _name, VariablesGrid &lastValue) const
 
Options getOptions (uint idx) const
 
BooleanType haveOptionsChanged () const
 
BooleanType haveOptionsChanged (uint idx) const
 
AlgorithmicBaseoperator= (const AlgorithmicBase &rhs)
 
returnValue plot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
returnValue printLogRecord (std::ostream &_stream, int idx, LogPrintMode _mode=PRINT_ITEM_BY_ITEM) const
 
returnValue replot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
returnValue set (OptionsName name, int value)
 
returnValue set (OptionsName name, double value)
 
returnValue set (OptionsName name, const std::string &value)
 
returnValue set (uint idx, OptionsName name, int value)
 
returnValue set (uint idx, OptionsName name, double value)
 
returnValue setAll (LogName _name, const MatrixVariablesGrid &values)
 
returnValue setLast (LogName _name, int lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, double lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const DVector &lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const DMatrix &lastValue, double time=-INFTY)
 
returnValue setLast (LogName _name, const VariablesGrid &lastValue, double time=-INFTY)
 
returnValue setOptions (const Options &arg)
 
returnValue setOptions (uint idx, const Options &arg)
 
virtual ~AlgorithmicBase ()
 

Protected Attributes

std::string commonHeaderName
 
uint N
 
uint NDX
 
uint NOD
 
uint NP
 
uint NU
 
uint NX
 
uint NXA
 
uint NY
 
uint NYN
 
- Protected Attributes inherited from AlgorithmicBase
int outputLoggingIdx
 
BooleanType useModuleStandalone
 
UserInteractionuserInteraction
 

Detailed Description

Allows to export automatically generated algorithms for fast model predictive control.

The class ExportAlgorithm allows to export automatically generated algorithms for fast model predictive control.

Author
Hans Joachim Ferreau, Milan Vukov, Boris Houska

Definition at line 61 of file export_algorithm.hpp.

Constructor & Destructor Documentation

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

Default constructor.

@param[in] _userInteraction         Pointer to corresponding user interface.
@param[in] _commonHeaderName        Name of common header file to be included.

Definition at line 45 of file export_algorithm.cpp.

ExportAlgorithm::~ExportAlgorithm ( )
virtual

Destructor.

Definition at line 54 of file export_algorithm.cpp.

Member Function Documentation

virtual returnValue ExportAlgorithm::getCode ( ExportStatementBlock code)
pure virtual
virtual returnValue ExportAlgorithm::getDataDeclarations ( ExportStatementBlock declarations,
ExportStruct  dataStruct = ACADO_ANY 
) const
pure virtual
virtual returnValue ExportAlgorithm::getFunctionDeclarations ( ExportStatementBlock declarations) const
pure virtual
uint ExportAlgorithm::getN ( ) const

Returns number of control intervals.

Returns
Number of control intervals

Definition at line 128 of file export_algorithm.cpp.

uint ExportAlgorithm::getNDX ( ) const

Returns the number of differential states derivatives.

Returns
The requested number of differential state derivatives
uint ExportAlgorithm::getNOD ( ) const

Returns number of parameters.

Returns
Number of parameters

Definition at line 122 of file export_algorithm.cpp.

uint ExportAlgorithm::getNP ( ) const

Returns number of parameters.

Returns
Number of parameters

Definition at line 117 of file export_algorithm.cpp.

uint ExportAlgorithm::getNU ( ) const

Returns number of control inputs.

Returns
Number of control inputs

Definition at line 111 of file export_algorithm.cpp.

uint ExportAlgorithm::getNX ( ) const

Returns number of differential states.

Returns
Number of differential states

Definition at line 99 of file export_algorithm.cpp.

uint ExportAlgorithm::getNXA ( ) const

Returns number of algebraic states.

Returns
Number of algebraic states

Definition at line 105 of file export_algorithm.cpp.

uint ExportAlgorithm::getNY ( ) const

Definition at line 138 of file export_algorithm.cpp.

uint ExportAlgorithm::getNYN ( ) const

Definition at line 148 of file export_algorithm.cpp.

returnValue ExportAlgorithm::setDimensions ( uint  _NX = 0,
uint  _NU = 0,
uint  _NP = 0,
uint  _NI = 0,
uint  _NOD = 0 
)

Sets the variables dimensions (ODE).

@param[in] _NX              New number of differential states.
@param[in] _NU              New number of control inputs.
@param[in] _NP              New number of parameters.
@param[in] _NI              New number of control intervals. (using _N resulted in a strange error when compiling with cygwin!)
Returns
SUCCESSFUL_RETURN

Definition at line 65 of file export_algorithm.cpp.

returnValue ExportAlgorithm::setDimensions ( uint  _NX,
uint  _NDX,
uint  _NXA,
uint  _NU,
uint  _NP,
uint  _NI,
uint  _NOD 
)

Sets the variables dimensions (DAE).

@param[in] _NX              New number of differential states.
@param[in] _NDX             New number of differential states derivatives.
@param[in] _NXA             New number of algebraic states.
@param[in] _NU              New number of control inputs.
@param[in] _NP              New number of parameters.
@param[in] _NI              New number of control intervals.
Returns
SUCCESSFUL_RETURN

Definition at line 77 of file export_algorithm.cpp.

void ExportAlgorithm::setNY ( uint  NY_)

Definition at line 133 of file export_algorithm.cpp.

void ExportAlgorithm::setNYN ( uint  NYN_)

Definition at line 143 of file export_algorithm.cpp.

returnValue ExportAlgorithm::setup ( )
virtual

Member Data Documentation

std::string ExportAlgorithm::commonHeaderName
protected

Name of common header file.

Definition at line 217 of file export_algorithm.hpp.

uint ExportAlgorithm::N
protected

Number of control intervals.

Definition at line 212 of file export_algorithm.hpp.

uint ExportAlgorithm::NDX
protected

Number of differential states derivatives.

Definition at line 207 of file export_algorithm.hpp.

uint ExportAlgorithm::NOD
protected

Number of "online data" values.

Definition at line 211 of file export_algorithm.hpp.

uint ExportAlgorithm::NP
protected

Number of parameters.

Definition at line 210 of file export_algorithm.hpp.

uint ExportAlgorithm::NU
protected

Number of control inputs.

Definition at line 209 of file export_algorithm.hpp.

uint ExportAlgorithm::NX
protected

Number of differential states.

Definition at line 206 of file export_algorithm.hpp.

uint ExportAlgorithm::NXA
protected

Number of algebraic states.

Definition at line 208 of file export_algorithm.hpp.

uint ExportAlgorithm::NY
protected

Number of references/measurements, nodes 0,..., N - 1.

Definition at line 214 of file export_algorithm.hpp.

uint ExportAlgorithm::NYN
protected

Number of references/measurements, node N.

Definition at line 215 of file export_algorithm.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:23