35 #include <qpOASES.hpp> 39 #define __MAKE_POS_DEF__ 65 6.20100988531485e+00, 0.00000000000000e+00, 0.00000000000000e+00, -3.84861756786704e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, -7.43268431723266e+00, 0.00000000000000e+00, 0.00000000000000e+00,
66 0.00000000000000e+00, 1.00000000000000e-01, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
67 0.00000000000000e+00, 0.00000000000000e+00, 2.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
68 -3.84861756786704e+00, 0.00000000000000e+00, 0.00000000000000e+00, 5.41188294952735e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 4.61304826562310e+00, 0.00000000000000e+00, 0.00000000000000e+00,
69 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 2.10000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
70 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 1.00000000000000e-01, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
71 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 2.01000000000000e+01, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
72 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 2.10000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
73 -7.43268431723266e+00, 0.00000000000000e+00, 0.00000000000000e+00, 4.61304826562310e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, -1.73544778892019e+01, 0.00000000000000e+00, 0.00000000000000e+00,
74 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 2.00000000000000e+00, 0.00000000000000e+00,
75 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 2.00000000000000e+01,
89 -6.93766478421491e-04,
91 -3.63779116055460e-05,
97 -1.18185758699839e+02,
102 0.00000000000000e+00,
103 0.00000000000000e+00,
104 0.00000000000000e+00,
105 0.00000000000000e+00,
106 0.00000000000000e+00,
107 0.00000000000000e+00,
108 0.00000000000000e+00,
109 0.00000000000000e+00,
110 0.00000000000000e+00,
111 -4.50000000000000e+01,
112 -1.00000000000000e+12,
115 0.00000000000000e+00,
116 0.00000000000000e+00,
117 0.00000000000000e+00,
118 0.00000000000000e+00,
119 0.00000000000000e+00,
120 0.00000000000000e+00,
121 1.00000000000000e+12,
122 1.00000000000000e+12,
123 0.00000000000000e+00,
124 4.50000000000000e+01,
125 1.00000000000000e+12,
128 1.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, -1.00000000000000e-02, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
129 -1.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00, -1.00000000000000e-02, -0.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00,
130 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 1.00000000000000e+00, 0.00000000000000e+00, -1.00000000000000e-02, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
133 -1.00000000000000e+12,
134 -1.00000000000000e+12,
135 -1.00000000000000e+12,
138 2.12376384003361e-01,
139 4.78762361599664e+00,
140 8.95204469622285e-01,
144 #ifdef __MAKE_POS_DEF__ 149 printf(
"qpOASES_status = %d\n", (
int)status );
156 printf(
"first QP:\n");
157 for (
int_t ii =0; ii<11; ++ii ) {
158 printf(
"x[%d] = %.3e\n", (
int)ii, xOpt[ii]);
166 printf(
"\nstat = %e\nfeas = %e\ncmpl = %e\n", stat,feas,cmpl );
176 6.20101055067033e+00, 0.00000000000000e+00, 0.00000000000000e+00, -3.84861780549400e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, -7.43268533746787e+00, 0.00000000000000e+00, 0.00000000000000e+00,
177 0.00000000000000e+00, 1.00000000000000e-01, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
178 0.00000000000000e+00, 0.00000000000000e+00, 2.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
179 -3.84861780549400e+00, 0.00000000000000e+00, 0.00000000000000e+00, 5.41188396792859e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 4.61304896387257e+00, 0.00000000000000e+00, 0.00000000000000e+00,
180 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 2.10000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
181 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 1.00000000000000e-01, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
182 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 2.01000000000000e+01, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
183 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 2.10000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
184 -7.43268533746787e+00, 0.00000000000000e+00, 0.00000000000000e+00, 4.61304896387257e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, -1.73544780086860e+01, 0.00000000000000e+00, 0.00000000000000e+00,
185 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 2.00000000000000e+00, 0.00000000000000e+00,
186 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 2.00000000000000e+01,
189 -8.92227256391600e-08,
190 6.89531726031141e-08,
191 -1.91970120006650e-07,
192 1.77206607789402e-07,
193 -3.83145267945144e-09,
194 -1.88284265021358e-08,
195 0.00000000000000e+00,
196 0.00000000000000e+00,
197 -1.18185657392775e+02,
198 1.45337027424899e-17,
199 -6.04156175796480e-20,
202 -1.07876236566374e+01,
203 -1.00000000002784e+12,
204 -1.00000000000000e+12,
205 -8.30554585107279e-08,
206 -7.00000003695781e+00,
207 -2.60479531522807e+00,
208 0.00000000000000e+00,
209 0.00000000000000e+00,
210 0.00000000000000e+00,
211 -4.50000000018062e+01,
212 -1.00000000000000e+12,
215 9.99999999989212e+11,
216 9.99999999972157e+11,
217 1.00000000000000e+12,
218 4.68471853498991e+01,
219 6.99999996304219e+00,
220 9.99999999997395e+11,
221 1.00000000000000e+12,
222 1.00000000000000e+12,
223 0.00000000000000e+00,
224 4.49999999981938e+01,
225 1.00000000000000e+12,
228 1.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, -1.00000000000000e-02, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
229 -1.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00, -1.00000000000000e-02, -0.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00, -0.00000000000000e+00,
230 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00, 1.00000000000000e+00, 0.00000000000000e+00, -1.00000000000000e-02, 0.00000000000000e+00, 0.00000000000000e+00, 0.00000000000000e+00,
233 -1.00000000000000e+12,
234 -1.00000000000000e+12,
235 -1.00000000000000e+12,
238 2.12376343362616e-01,
239 4.78762365663739e+00,
240 8.95204684771929e-01,
242 #ifdef __MAKE_POS_DEF__ 248 status = example.
hotstart( H2,g2,D2,zLow2,zUpp2,dLow2,dUpp2, nWSR );
249 printf(
"qpOASES_status = %d\n", (
int)status );
253 printf(
"second QP:\n");
254 for (
int_t ii =0; ii<11; ++ii ) {
255 printf(
"x[%d] = %.3e\n", (
int)ii, xOpt[ii]);
258 printf(
"\nQP objective value: %.3e\n", example.
getObjVal() );
262 printf(
"\nstat = %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.
Allows to pass back messages to the calling function.
returnValue setOptions(const Options &_options)
Provides a generic way to set and pass user-specified options.
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
SubjectToStatus initialStatusBounds
#define REFER_NAMESPACE_QPOASES
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