39 const std::string& _fileName,
40 const std::string& _commonHeaderName,
41 const std::string& _realString,
42 const std::string& _intString,
44 const std::string& _commentString
45 ) :
ExportTemplatedFile(_templateName, _fileName, _commonHeaderName, _realString, _intString, _precision, _commentString)
51 const std::vector< std::vector< unsigned > >& _lbIdx,
52 const std::vector< std::vector< unsigned > >& _ubIdx,
53 const std::vector< unsigned >& _AbDim,
54 const bool _constHessian,
55 const bool _diagHessian,
56 const bool _diagHessianN,
57 const bool _fixedInitialState,
58 const std::string& _solverName,
59 const unsigned _printLevel,
60 const unsigned _maxIterations,
61 const unsigned _parallel,
84 if (matlabGenerator ==
true)
85 for (
unsigned i = 0; i < _lbIdx.size(); ++i)
88 s <<
", ..." << endl <<
"\t";
91 for (
unsigned j = 0; j < _lbIdx[ i ].size(); ++j)
95 s << _lbIdx[ i ][ j ] + 1;
101 for (
unsigned i = 0; i < _lbIdx.size(); ++i)
104 s <<
", " << endl <<
"\t";
107 for (
unsigned j = 0; j < _lbIdx[ i ].size(); ++j)
111 s << _lbIdx[ i ][ j ] + 1;
118 s.str(std::string());
119 if (matlabGenerator ==
true)
120 for (
unsigned i = 0; i < _ubIdx.size(); ++i)
123 s <<
", ..." << endl <<
"\t";
126 for (
unsigned j = 0; j < _ubIdx[ i ].size(); ++j)
130 s << _ubIdx[ i ][ j ] + 1;
136 for (
unsigned i = 0; i < _ubIdx.size(); ++i)
139 s <<
", " << endl <<
"\t";
142 for (
unsigned j = 0; j < _ubIdx[ i ].size(); ++j)
146 s << _ubIdx[ i ][ j ] + 1;
153 s.str(std::string());
154 if (matlabGenerator ==
true)
155 for (
unsigned i = 0; i < _NN + 1; ++i)
158 s <<
", ..." << endl <<
"\t";
160 if( i >= _AbDim.size() ) {
173 s.str(std::string());
174 s << (_constHessian ==
true ? 1 : 0);
177 s.str(std::string());
178 s << (_diagHessian ==
true ? 1 : 0);
179 dictionary[
"@DIAG_HESSIAN@" ] = s.str();
181 s.str(std::string());
182 s << (_diagHessianN ==
true ? 1 : 0);
183 dictionary[
"@DIAG_HESSIAN_N@" ] = s.str();
185 s.str(std::string());
186 s << (_fixedInitialState ==
true ? 1 : 0);
187 dictionary[
"@FIXED_INITIAL_STATE@" ] = s.str();
189 dictionary[
"@SOLVER_NAME@" ] = _solverName;
191 s.str(std::string());
193 dictionary[
"@PRINT_LEVEL@" ] = s.str();
195 s.str(std::string());
197 dictionary[
"@MAX_ITERATIONS@" ] = s.str();
199 s.str(std::string());
201 dictionary[
"@PARALLEL@" ] = s.str();
203 dictionary[
"@WARM_START@" ] = warmStart ?
"2" :
"0";
std::map< std::string, std::string > dictionary
Allows to pass back messages to the calling function.
#define CLOSE_NAMESPACE_ACADO
Allows export of template files.
ExportForcesGenerator(const std::string &_templateName, const std::string &_fileName, const std::string &_commonHeaderName="", const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16, const std::string &_commentString=std::string())
#define BEGIN_NAMESPACE_ACADO
virtual returnValue configure()
returnValue fillTemplate()