36 #include <qpOASES.hpp> 46 real_t H[2*2] = { 1.0, 0.0, 0.0, 0.5 };
69 example.
init( H,g,A,lb,ub,lbA,ubA, nWSR,0 );
81 printf(
"stat = %e\nfeas = %e\ncmpl = %e\n", stat,feas,cmpl );
90 example.
hotstart( H_new,g_new,A_new,lb_new,ub_new,lbA_new,ubA_new, nWSR,0 );
95 printf(
"\nxOpt = [ %e, %e ]; objVal = %e\n\n", xOpt[0],xOpt[1],example.
getObjVal() );
99 printf(
"stat = %e\nfeas = %e\ncmpl = %e\n", stat,feas,cmpl );
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)
Implements the online active set strategy for QPs with varying matrices.
Provides additional tools for analysing QP solutions.
#define QPOASES_TEST_FOR_TOL(x, tol)
real_t getKktViolation(QProblemB *const qp, real_t *const maxStat=0, real_t *const maxFeas=0, real_t *const maxCmpl=0) const
returnValue hotstart(const real_t *const H_new, const real_t *const g_new, const real_t *const A_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)
returnValue getDualSolution(real_t *const yOpt) const