34 #include <acado/code_generation/templates/templates.hpp> 41 const std::string& _commonHeaderName
53 LOG(
LVL_DEBUG ) <<
"Solver: setup extra initialization... " << endl;
56 initializeForces.
setName(
"initializeForces" );
110 for (
unsigned i = 0; i < dNum; ++i)
130 for (
unsigned i = 1; i < dNum; ++i)
134 for (
unsigned i = 0; i < dNum; ++i)
142 LOG(
LVL_DEBUG ) <<
"Setup condensing: rewrite expand routine" << endl;
219 for (
unsigned j = 0; j < lbTmp.
getDim(); ++j)
242 for (
unsigned j = 0; j < lbTmp.
getDim(); ++j)
268 for (
unsigned j = 0; j < lbTmp.
getDim(); ++j)
357 retSim.
setDoc(
"Status of the integration module. =0: OK, otherwise the error code.");
399 tmp.
setDoc(
"Status code of the qpOASES QP solver." );
402 feedback.
doc(
"Feedback/estimation step of the RTI scheme." );
415 std::vector< ExportVariable > vecQPVars;
441 solveQP.
setup(
"solve");
449 <<
"&" <<
qpObjPrefix <<
"_" <<
"info" <<
" , NULL);\n";
468 getKKT.
doc(
"Get the KKT tolerance of the current iterate. Under development." );
502 tmp1.getDataStructString(),
517 string outFile = folderName +
"/acado_forces_generator.m";
521 int maxNumQPiterations;
528 if ( maxNumQPiterations <= 0 )
virtual returnValue setupCondensing()
std::vector< ExportVariable > conLB
uint getBlockSize() const
#define LOG(level)
Just define a handy macro for getting the logger.
Lowest level, the debug level.
virtual unsigned getNumStateBoundsPerBlock() const
std::vector< ExportVariable > objHessians
ExportVariable getRow(const ExportIndex &idx) const
ExportFunction condensePrep
uint getNumBlockVariables() const
ExportFunction & setName(const std::string &_name)
ExportFunction preparation
ExportVariable getTranspose() const
bool initialStateFixed() 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())
bool isGiven(const ExportIndex &rowIdx, const ExportIndex &colIdx) const
std::vector< std::vector< unsigned > > conLBIndices
std::vector< ExportVariable > conC
Allows to pass back messages to the calling function.
Generator of the FORCES interface, the to, be called from MATLAB.
DVector getUpperBounds(uint pointIdx) const
std::vector< unsigned > conABDimensions
virtual returnValue setupVariables()
virtual returnValue setupVariables()
Allows to export code of a for-loop.
string toString(T const &value)
#define CLOSE_NAMESPACE_ACADO
std::vector< std::vector< unsigned > > conUBIndices
Defines a scalar-valued index variable to be used for exporting code.
std::vector< ExportVariable > cond
ExportFunction evaluateAffineConstraints
An OCP solver based on the block N^2 condensing algorithm.
virtual returnValue setupConstraintsEvaluation(void)
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)
virtual returnValue setDoc(const std::string &_doc)
std::string commonHeaderName
ExportFunction modelSimulation
virtual ExportFunction & doc(const std::string &_doc)
virtual bool isDefined() const
virtual returnValue setupQPInterface()
virtual returnValue setupConstraintsEvaluation(void)
double levenbergMarquardt
A class for configuration and export for interface to the FORCES QP solver.
const std::string get(const ExportIndex &rowIdx, const ExportIndex &colIdx) const
std::vector< ExportVariable > conAB
Encapsulates all user interaction for setting options, logging data and plotting results.
ExportFunction shiftQpData
Allows to export code of an arbitrary function.
ExportGaussNewtonBlockForces(UserInteraction *_userInteraction=0, const std::string &_commonHeaderName="")
returnValue addStatement(const ExportStatement &_statement)
std::vector< ExportVariable > conA
std::string getFullName() const
returnValue addLinebreak(uint num=1)
ExportFunction expansionStep
bool performFullCondensing() const
ExportFunction & setReturnValue(const ExportVariable &_functionReturnValue, bool _returnAsPointer=false)
virtual returnValue setupCondensing()
BooleanType acadoIsFinite(double x, double TOL)
virtual returnValue setup()
virtual returnValue setupEvaluation()
virtual returnValue getCode(ExportStatementBlock &code)
std::string getName() const
ExportVariable getRows(const ExportIndex &idx1, const ExportIndex &idx2) const
uint getNumberOfBlocks() const
std::shared_ptr< ExportForcesInterface > qpInterface
DVector getLowerBounds(uint pointIdx) const
std::vector< ExportVariable > objGradients
#define BEGIN_NAMESPACE_ACADO
BooleanType isFinite(const T &_value)
USING_NAMESPACE_ACADO void output(const char *name, const Expression &e)
returnValue addFunction(const ExportFunction &_function)
virtual returnValue setup()
virtual returnValue getCode(ExportStatementBlock &code)
Allows to export code for a block of statements.
ExportFunction initialize
std::shared_ptr< ExportForcesGenerator > qpGenerator
ExportFunction evaluateConstraints
ExportArgument getAddress(const ExportIndex &_rowIdx, const ExportIndex &_colIdx=emptyConstExportIndex) const
ExportFunction evaluateObjective
std::vector< ExportVariable > conUB
unsigned getNumQPvars() const
ExportFunction & addIndex(const ExportIndex &_index)
ExportFunction regularizeHessian
std::string getDataStructString() const
#define ACADOERROR(retval)
Defines a matrix-valued variable to be used for exporting code.
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)