Public Member Functions | Private Attributes | List of all members

Allows to export linear solver based on Cholesky factorization. More...

#include <export_cholesky_solver.hpp>

Inheritance diagram for ExportCholeskySolver:
Inheritance graph
[legend]

Public Member Functions

virtual returnValue appendVariableNames (std::stringstream &string)
 
 ExportCholeskySolver (UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
 
const ExportFunctiongetCholeskyFunction () const
 
virtual returnValue getCode (ExportStatementBlock &code)
 
virtual returnValue getDataDeclarations (ExportStatementBlock &declarations, ExportStruct dataStruct=ACADO_ANY) const
 
virtual returnValue getFunctionDeclarations (ExportStatementBlock &declarations) const
 
const ExportFunctiongetSolveFunction () const
 
returnValue init (unsigned _dimA, unsigned _numColsB, const std::string &_id)
 
virtual returnValue setup ()
 
virtual ~ExportCholeskySolver ()
 
- Public Member Functions inherited from ExportLinearSolver
 ExportLinearSolver (UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
 
uint getDim () const
 
virtual ExportVariable getGlobalExportVariable (const uint factor) const
 
const std::string getNameSolveFunction ()
 
const std::string getNameSolveReuseFunction ()
 
const std::string getNameSolveTransposeReuseFunction ()
 
bool getReuse () const
 
bool getTranspose () const
 
bool getUnrolling () const
 
returnValue init (const uint newDim, const bool &reuse=true, const bool &unrolling=false)
 
returnValue init (const uint newDim, const uint _nRightHandSides, const bool &reuse=true, const bool &unrolling=false)
 
returnValue init (const uint newDim, const bool &reuse, const bool &unrolling, const std::string &newId)
 
returnValue init (unsigned _nRows, unsigned _nCols, unsigned _nBacksolves, bool _reuse, bool _unroll, const std::string &_id)
 
returnValue init (unsigned _nRows, unsigned _nCols, unsigned _nBacksolves, unsigned _nRightHandSides, bool _reuse, bool _unroll, const std::string &_id)
 
returnValue setReuse (const bool &reuse)
 
returnValue setTranspose (const bool &transpose)
 
returnValue setUnrolling (const bool &unrolling)
 
virtual ~ExportLinearSolver ()
 
- Public Member Functions inherited from ExportAlgorithm
 ExportAlgorithm (UserInteraction *_userInteraction=0, const std::string &_commonHeaderName=std::string())
 
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 ~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 ()
 

Private Attributes

ExportVariable B
 
ExportFunction chol
 
unsigned nColsB
 

Additional Inherited Members

- Protected Attributes inherited from ExportLinearSolver
ExportVariable A
 
ExportVariable b
 
ExportVariable determinant
 
uint dim
 
std::string identifier
 
unsigned nBacksolves
 
unsigned nCols
 
unsigned nRightHandSides
 
unsigned nRows
 
bool REUSE
 
ExportFunction solve
 
ExportFunction solveReuse
 
ExportFunction solveReuseTranspose
 
ExportFunction solveTriangular
 
bool TRANSPOSE
 
bool UNROLLING
 
- Protected Attributes inherited from ExportAlgorithm
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 linear solver based on Cholesky factorization.

Allows export of linear system solver, where the A matrix is a symmetric positive definite of dimensions n x n, and matrix B is of dimensions n x m, m >= 1.

This class configures and exports two functions:

Note
Early experimental version.
Exported solver code is based on qpOASES code.
Todo:
Extend the generator to be able to solve RX = B, too.
Author
Milan Vukov

Definition at line 62 of file export_cholesky_solver.hpp.

Constructor & Destructor Documentation

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

Default constructor.

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

Definition at line 40 of file export_cholesky_solver.cpp.

ExportCholeskySolver::~ExportCholeskySolver ( )
virtual

Destructor.

Definition at line 47 of file export_cholesky_solver.cpp.

Member Function Documentation

returnValue ExportCholeskySolver::appendVariableNames ( std::stringstream &  string)
virtual

Appends the names of the used variables to a given stringstream.

@param[in] string                           The string to which the names of the used variables are appended.

\return SUCCESSFUL_RETURN

Implements ExportLinearSolver.

Definition at line 258 of file export_cholesky_solver.cpp.

const ExportFunction & ExportCholeskySolver::getCholeskyFunction ( ) const

Get the reference to the Cholesky decomposition routine.

Definition at line 248 of file export_cholesky_solver.cpp.

returnValue ExportCholeskySolver::getCode ( ExportStatementBlock code)
virtual

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

@param[in] code                             Code block containing the auto-generated algorithm.

\return SUCCESSFUL_RETURN

Implements ExportLinearSolver.

Definition at line 224 of file export_cholesky_solver.cpp.

returnValue ExportCholeskySolver::getDataDeclarations ( ExportStatementBlock declarations,
ExportStruct  dataStruct = ACADO_ANY 
) const
virtual

Adds all data declarations of the auto-generated algorithm to given list of declarations.

@param[in] declarations             List of declarations.

\return SUCCESSFUL_RETURN

Implements ExportLinearSolver.

Definition at line 232 of file export_cholesky_solver.cpp.

returnValue ExportCholeskySolver::getFunctionDeclarations ( ExportStatementBlock declarations) const
virtual

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

@param[in] declarations             List of declarations.

\return SUCCESSFUL_RETURN

Implements ExportLinearSolver.

Definition at line 239 of file export_cholesky_solver.cpp.

const ExportFunction & ExportCholeskySolver::getSolveFunction ( ) const

Get the reference to the solve function.

Definition at line 253 of file export_cholesky_solver.cpp.

returnValue ExportCholeskySolver::init ( unsigned  _dimA,
unsigned  _numColsB,
const std::string &  _id 
)

Solver initialization routine.

\return SUCCESSFUL_RETURN

Definition at line 50 of file export_cholesky_solver.cpp.

returnValue ExportCholeskySolver::setup ( )
virtual

The setup routine.

\return SUCCESSFUL_RETURN

Implements ExportLinearSolver.

Definition at line 71 of file export_cholesky_solver.cpp.

Member Data Documentation

ExportVariable ExportCholeskySolver::B
private

Definition at line 140 of file export_cholesky_solver.hpp.

ExportFunction ExportCholeskySolver::chol
private

Definition at line 138 of file export_cholesky_solver.hpp.

unsigned ExportCholeskySolver::nColsB
private

Definition at line 142 of file export_cholesky_solver.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