39 #include <qpOASES.hpp> 64 for( i=0; i<7*7; ++i )
83 for( i=0; i<50*7; ++i )
90 A[i*7 + (i/10)+2] = 1.0;
105 for( i=0; i<50; ++i )
122 exampleCP.
init( H,g,A,0,0,lbA,0, nWSR,&cputime );
131 exampleCP.
hotstart( g,0,0,lbA,0, nWSR,&cputime );
136 printf(
"\nxOpt = [ %e, %e, %e ... ]; objVal = %e\n", xOpt[0],xOpt[1],xOpt[2],exampleCP.
getObjVal() );
137 printf(
"CPU time: %.3f microseconds\n\n", cputime*1.0e6 );
151 example.
init( H,g,A,0,0,lbA,0, nWSR,&cputime );
159 example.
hotstart( g,0,0,lbA,0, nWSR,&cputime );
163 printf(
"\nxOpt = [ %e, %e, %e ... ]; objVal = %e\n", xOpt[0],xOpt[1],xOpt[2],example.
getObjVal() );
164 printf(
"CPU time: %.3f microseconds\n\n", cputime*1.0e6 );
returnValue getPrimalSolution(real_t *const xOpt) const
#define USING_NAMESPACE_QPOASES
returnValue init(const real_t *const _H, const real_t *const _g, const real_t *const _A, const real_t *const _lb, const real_t *const _ub, const real_t *const _lbA, const real_t *const _ubA, int &nWSR, const real_t *const yOpt=0, real_t *const cputime=0)
returnValue hotstart(const real_t *const g_new, const real_t *const lb_new, const real_t *const ub_new, const real_t *const lbA_new, const real_t *const ubA_new, int &nWSR, real_t *const cputime)
Example illustrating the use of the ConstraintProduct class.
returnValue setConstraintProduct(ConstraintProduct *const _constraintProduct)
Implements the online active set strategy for QPs with general constraints.
returnValue setPrintLevel(PrintLevel _printlevel)