33 #include <acado/code_generation/templates/templates.hpp> 41 const std::string& _sourceFileName,
42 const std::string& _commonHeaderName,
43 const std::string& _realString,
44 const std::string& _intString,
46 const std::string& _commentString
48 :
ExportQpOasesInterface( _headerFileName,_sourceFileName,_commonHeaderName,_realString,_intString,_precision,_commentString )
56 const std::string& _solverDefine,
60 const std::string& _printLevel,
61 bool _useSinglePrecision,
63 const std::string& _commonHeader,
64 const std::string& _namespace,
65 const std::string& _primalSolution,
66 const std::string& _dualSolution,
67 const std::string& _sigma,
69 bool _externalCholesky,
70 const std::string& _qpH,
71 const std::string& _qpR,
72 const std::string& _qpg,
73 const std::string& _qpA,
74 const std::string& _qplb,
75 const std::string& _qpub,
76 const std::string& _qplbA,
77 const std::string& _qpubA
88 solverName =
"QProblem";
90 if ( ( (
bool)_hotstartQP ==
true ) || (_externalCholesky ==
false) )
93 s << _qpH <<
", " << _qpg <<
", " << _qpA <<
", " << _qplb <<
", " << _qpub <<
", " 96 if ( (
bool)_hotstartQP ==
true )
97 s <<
", 0," << _dualSolution <<
", ";
101 if (_externalCholesky ==
false)
109 s << _qpH <<
", " << _qpg <<
", " << _qpA <<
", " << _qplb <<
", " << _qpub <<
", " 114 ctor << solverName <<
"CON( &qp, " << nvmax <<
"," << ncmax <<
",HST_POSDEF )";
118 solverName =
"QProblemB";
120 if ( ( (
bool)_hotstartQP ==
true ) || (_externalCholesky ==
false) )
123 s << _qpH <<
", " << _qpg <<
", " << _qplb <<
", " << _qpub <<
", " <<
"&" <<
ExportStatement::fcnPrefix << _prefix <<
"_nWSR,0";
125 if ( (
bool)_hotstartQP ==
true )
126 s <<
", 0," << _dualSolution <<
", ";
130 if (_externalCholesky ==
false)
138 s << _qpH <<
", " << _qpg <<
", " << _qplb <<
", " << _qpub <<
", " <<
"&" <<
ExportStatement::fcnPrefix << _prefix <<
"_nWSR,0";
142 ctor << solverName <<
"CON( &qp, " << nvmax <<
",HST_POSDEF )";
181 if ( _useSinglePrecision )
std::map< std::string, std::string > dictionary
virtual returnValue configure(const std::string &_prefix, const std::string &_solverDefine, const int nvmax, const int ncmax, const int nwsrmax, const std::string &_printLevel, bool _useSinglePrecision, const std::string &_commonHeader, const std::string &_namespace, const std::string &_primalSolution, const std::string &_dualSolution, const std::string &_sigma, bool _hotstartQP, bool _externalCholesky, const std::string &_qpH, const std::string &_qpR, const std::string &_qpg, const std::string &_qpA, const std::string &_qplb, const std::string &_qpub, const std::string &_qplbA, const std::string &_qpubA)
Allows to pass back messages to the calling function.
string toString(T const &value)
#define CLOSE_NAMESPACE_ACADO
virtual returnValue exportCode()
static std::string fcnPrefix
ExportTemplatedFile qpoSource
#define BEGIN_NAMESPACE_ACADO
ExportTemplatedFile qpoHeader
A class for generating the glue code for interfacing qpOASES.
ExportQpOases3Interface(const std::string &_headerFileName, const std::string &_sourceFileName, const std::string &_commonHeaderName="", const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16, const std::string &_commentString=std::string())
virtual returnValue exportCode() const
returnValue fillTemplate()
static std::string varPrefix