36 #include <qpOASES.hpp> 44 real_t H[5*5] = {0.8514828085899353, -0.15739890933036804, -0.081726007163524628, -0.530426025390625, 0.16773293912410736, -0.15739890933036804, 1.1552412509918213, 0.57780224084854126, -0.0072606131434440613, 0.010559185408055782, -0.081726007163524628, 0.57780224084854126, 0.28925251960754395, 5.324830453901086e-006, -3.0256599075073609e-006, -0.530426025390625, -0.0072606131434440613, 5.324830453901086e-006, 0.35609596967697144, -0.15124998986721039, 0.16773293912410736, 0.010559185408055782, -3.0256599075073609e-006, -0.15124998986721039, 0.15129712224006653};
45 real_t g[5] = {0.30908384919166565, 0.99325823783874512, 0.49822014570236206, -0.26309865713119507, 0.024296050891280174};
51 real_t lb[5] = {-0.052359879016876221, -0.052359879016876221, -0.052359879016876221, -0.052359879016876221, -0.052359938621520996};
52 real_t ub[5] = { 0.052359879016876221, 0.052359879016876221, 0.052359879016876221, 0, 0};
53 real_t lbA[5] = {-0.052359879016876221, -0.052359879016876221, -0.052359879016876221, -0.052359879016876221, -0.052359938621520996};
54 real_t ubA[5] = {0.052359879016876221, 0.052359879016876221, 0.052359879016876221, 0, 0};
62 printf(
"nWSR = %d, retVal = %d (%s)\n", (
int)nWSR,retVal,
getGlobalMessageHandler( )->getErrorCodeMessage(retVal) );
70 printf(
"l1 = %f, l2 = %f, l3 = %f, l4 = %f, l5 = %f\n",(
float) lb[0], (
float) lb[1], (
float) lb[2], (
float) lb[3], (
float) lb[4]);
71 printf(
"x1 = %f, x2 = %f, x3 = %f, x4 = %f, x5 = %f\n",(
float) sol[0], (
float) sol[1], (
float) sol[2], (
float) sol[3], (
float) sol[4]);
72 printf(
"u1 = %f, u2 = %f, u3 = %f, u4 = %f, u5 = %f\n",(
float) ub[0], (
float) ub[1], (
float) ub[2], (
float) ub[3], (
float) ub[4]);
79 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)
Allows to pass back messages to the calling function.
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
Implements the online active set strategy for QPs with general constraints.
MessageHandling * getGlobalMessageHandler()
returnValue getDualSolution(real_t *const yOpt) const