qp() in Octave 3.0.0 returns result egregiously violating input constraints
John W. Eaton
jwe at bevo.che.wisc.edu
Mon Oct 27 14:31:29 CDT 2008
On 27-Oct-2008, Gabriele Pannocchia wrote:
| what was OBJ in the three cases and the maximum constraint violation for
| the two cases based on glpk 4.29?
Here is what I see with the current development sources with glpk
4.29:
octave:1> load example.dat
octave:2> [x, OBJ, INFO, LAMBDA] = qp (x0, H, Q, A, B, LB, UB, A_LB, A_IN, A_UB);
octave:3> OBJ
OBJ = 3.7723e+14
octave:4> max (abs (A*x - B))
ans = 1.3009e-06
octave:5> idx = x < LB; max (LB(idx) - x(idx))
ans = 1.4049e+09
octave:6> tmp = A_IN*x; idx = tmp < A_LB; max (A_LB(idx) - tmp(idx))
ans = 1.9927e-06
octave:7> tmp = A_IN*x; idx = tmp > A_UB; max (tmp(idx) - A_UB(idx))
ans = 1.0487e+09
and here is what I see with 3.0.1 and glpk 4.29:
octave:1> load example.dat
octave:2> [x, OBJ, INFO, LAMBDA] = qp (x0, H, Q, A, B, LB, UB, A_LB, A_IN, A_UB);
octave:3> OBJ
OBJ = 3.7723e+14
octave:4> max (abs (A*x - B))
ans = 1.3009e-06
octave:5> idx = x < LB; max (LB(idx) - x(idx))
ans = 1.4049e+09
octave:6> tmp = A_IN*x; idx = tmp < A_LB; max (A_LB(idx) - tmp(idx))
ans = 1.9927e-06
octave:7> tmp = A_IN*x; idx = tmp > A_UB; max (tmp(idx) - A_UB(idx))
ans = 1.0487e+09
With the current development sources and glpk 4.32, I see this:
octave:1> load example.dat
octave:2> [x, OBJ, INFO, LAMBDA] = qp (x0, H, Q, A, B, LB, UB, A_LB, A_IN, A_UB);
octave:3> OBJ
OBJ = 2.8942e-06
octave:4> max (abs (A*x - B))
ans = 1.2060e-11
octave:5> idx = x < LB; max (LB(idx) - x(idx))
ans = 3.6306e-12
octave:6> tmp = A_IN*x; idx = tmp < A_LB; max (A_LB(idx) - tmp(idx))
ans = 1.3049e-11
octave:7> tmp = A_IN*x; idx = tmp > A_UB; max (tmp(idx) - A_UB(idx))
ans = 1.0958e-13
If there is something else you'd like to see, then please send the
expressions you like for me to evaluate.
jwe
More information about the Bug-octave
mailing list