40 const std::string& _commonHeaderName
46 LOG(
LVL_DEBUG ) <<
"Solver: setup initialization... " << endl;
52 initialize <<
"for( ret = 0; ret < ACADO_N*(ACADO_NX+ACADO_NU)*(ACADO_NX+ACADO_NU)+ACADO_NX*ACADO_NX; ret++ ) acadoWorkspace.qpH[ret] = 1.0;\n";
55 <<
"ret = (int)initializeQpDunes();\n" 56 <<
"if ((return_t)ret != QPDUNES_OK) return ret;\n";
63 LOG(
LVL_DEBUG ) <<
"Solver: setup setupVariables... " << endl;
67 LOG(
LVL_DEBUG ) <<
"Solver: setup setupSimulation... " << endl;
71 LOG(
LVL_DEBUG ) <<
"Solver: setup setupObjectiveEvaluation... " << endl;
75 LOG(
LVL_DEBUG ) <<
"Solver: setup setupConstraintsEvaluation... " << endl;
79 LOG(
LVL_DEBUG ) <<
"Solver: setup hessian regularization... " << endl;
83 LOG(
LVL_DEBUG ) <<
"Solver: setup Evaluation... " << endl;
87 LOG(
LVL_DEBUG ) <<
"Solver: setup setupAuxiliaryFunctions... " << endl;
111 code.
addStatement(
"/******************************************************************************/\n" );
115 code.
addStatement(
"/******************************************************************************/\n" );
#define LOG(level)
Just define a handy macro for getting the logger.
Lowest level, the debug level.
virtual returnValue setupEvaluation()
virtual returnValue setupHessianRegularization(void)
ExportVariable getRow(const ExportIndex &idx) const
ExportFunction evaluateObjective
ExportFunction shiftStates
virtual returnValue getFunctionDeclarations(ExportStatementBlock &declarations) const
A class for export of an OCP solver using sparse QP solver qpDUNES.
ExportVariable getTranspose() const
ExportVariable & setup(const std::string &_name, uint _nRows=1, uint _nCols=1, ExportType _type=REAL, ExportStruct _dataStruct=ACADO_LOCAL, bool _callItByValue=false, const std::string &_prefix=std::string())
ExportFunction setObjQ1Q2
Allows to pass back messages to the calling function.
virtual returnValue setup()
virtual returnValue getCode(ExportStatementBlock &code)
Block< Derived > block(Index startRow, Index startCol, Index blockRows, Index blockCols)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
void setAll(const T &_value)
ExportFunction shiftQpData
Allows to export code of a for-loop.
virtual returnValue setupVariables()
ExportFunction preparation
#define CLOSE_NAMESPACE_ACADO
ExportVariable getSubMatrix(const ExportIndex &rowIdx1, const ExportIndex &rowIdx2, const ExportIndex &colIdx1, const ExportIndex &colIdx2) const
virtual returnValue setupConstraintsEvaluation(void)
unsigned getFunctionDim(void)
Defines a scalar-valued index variable to be used for exporting code.
ExportAcadoFunction evaluateStageCost
ExportFunction setStagePac
ExportAcadoFunction evaluateTerminalCost
ExportFunction regularization
ExportFunction & setup(const std::string &_name="defaultFunctionName", const ExportArgument &_argument1=emptyConstExportArgument, const ExportArgument &_argument2=emptyConstExportArgument, const ExportArgument &_argument3=emptyConstExportArgument, const ExportArgument &_argument4=emptyConstExportArgument, const ExportArgument &_argument5=emptyConstExportArgument, const ExportArgument &_argument6=emptyConstExportArgument, const ExportArgument &_argument7=emptyConstExportArgument, const ExportArgument &_argument8=emptyConstExportArgument, const ExportArgument &_argument9=emptyConstExportArgument)
std::shared_ptr< ExportQpDunesInterface > qpInterface
virtual returnValue setupInitialization()
ExportFunction modelSimulation
virtual ExportFunction & doc(const std::string &_doc)
ExportVariable getCols(const ExportIndex &idx1, const ExportIndex &idx2) const
ExportFunction getObjective
ExportFunction evaluateConstraints
ExportVariable makeRowVector() const
ExportVariable objValueIn
ExportFunction initializeNodes
double levenbergMarquardt
ExportFunction setObjR1R2
virtual returnValue setupSimulation(void)
std::vector< std::shared_ptr< ExportAcadoFunction > > evaluatePointConstraints
Encapsulates all user interaction for setting options, logging data and plotting results.
Allows to export code of an arbitrary function.
ExportFunction shiftControls
returnValue addStatement(const ExportStatement &_statement)
returnValue addLinebreak(uint num=1)
ExportAcadoFunction evaluatePathConstraints
virtual ExportFunction & acquire(ExportIndex &obj)
ExportVariable objSEndTerm
ExportVariable getRows(const ExportIndex &idx1, const ExportIndex &idx2) const
returnValue addDeclaration(const ExportVariable &_data, ExportStruct _dataStruct=ACADO_ANY)
returnValue setupAuxiliaryFunctions()
ExportExactHessianQpDunes(UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
virtual returnValue setupQPInterface()
#define BEGIN_NAMESPACE_ACADO
ExportFunction setObjQN1QN2
returnValue addFunction(const ExportFunction &_function)
virtual returnValue getFunctionDeclarations(ExportStatementBlock &declarations) const
Allows to export code for a block of statements.
ExportFunction initialize
ExportArgument getAddress(const ExportIndex &_rowIdx, const ExportIndex &_colIdx=emptyConstExportIndex) const
ExportVariable objValueOut
ExportFunction & addIndex(const ExportIndex &_index)
ExportFunction regularizeHessian
Defines a matrix-valued variable to be used for exporting code.
virtual returnValue setupObjectiveEvaluation(void)
returnValue addFunctionCall(const std::string &_fName, const ExportArgument &_argument1=emptyConstExportArgument, const ExportArgument &_argument2=emptyConstExportArgument, const ExportArgument &_argument3=emptyConstExportArgument, const ExportArgument &_argument4=emptyConstExportArgument, const ExportArgument &_argument5=emptyConstExportArgument, const ExportArgument &_argument6=emptyConstExportArgument, const ExportArgument &_argument7=emptyConstExportArgument, const ExportArgument &_argument8=emptyConstExportArgument, const ExportArgument &_argument9=emptyConstExportArgument)
ExportVariable makeColVector() const