36 #include <qpOASES.hpp> 45 real_t H[5*5] = { 1.224642131370767e+01, 2.908638763113702e+00, 0.0, 0.0, 0.0,
46 2.908638763113702e+00, 2.497106275003180e+00, 0.0, 0.0, 0.0,
47 0.0, 0.0, 1.0, 0.0, 0.0,
48 0.0, 0.0, 0.0, 5.158460640334052e-02, 4.723556059962540e-02,
49 0.0, 0.0, 0.0, 4.723556059962540e-02, 4.325317843302175e-02 };
50 real_t A[2*5] = { -1.404358970692652e+00, -2.556613491156063e+00, 3.202524559238066e+00, -1.0, 0.0,
51 6.587910295430314e-01, -5.349454475937998e-01, 4.391976356955536e-01, 0.0, -1.0 };
52 real_t g[5] = { 2.474135331302147e+01,
53 5.857286430296258e+00,
54 2.359382646348721e-01,
55 1.721047069188781e-01,
56 1.575947337774199e-01 };
57 real_t lb[5] = { -10.0, -10.0, -10.0, -10.0, -10.0 };
58 real_t ub[5] = { 10.0, 10.0, 10.0, 10.0, 10.0 };
59 real_t lbA[2] = { 1.643135416077167e+00, 1.056813028189597e+00 };
60 real_t ubA[2] = { 1.643135416077167e+00, 1.056813028189597e+00 };
72 example.
init( H,g,A,lb,ub,lbA,ubA, nWSR,0 );
77 printf(
"\nxOpt = [ %e, %e, ... ]; objVal = %e\n\n", xOpt[0],xOpt[1],example.
getObjVal() );
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 setOptions(const Options &_options)
Provides a generic way to set and pass user-specified options.
Implements the online active set strategy for QPs with general constraints.
SubjectToStatus initialStatusBounds