qp() in Octave 3.0.0 returns result egregiously violating input constraints

John W. Eaton jwe at bevo.che.wisc.edu
Mon Oct 27 13:24:02 CDT 2008


On 25-Oct-2008, Gabriele Pannocchia wrote:

| Hi,
| 
| Can someone else reproduce Josh's behavior on this example?
| 
| My outcome is instead that qp does not converge but the returned point
| is feasible.
| 
| Again, I am not worried about convergence in this case because the
| Josh's QP is non-convex, but I would be happy to know if someone else
| can reproduce the loss of feasibility.
| 
| Thanks,
| 	Gabriele
| 
| octave:42> load example.dat
| octave:43> [x, OBJ, INFO, LAMBDA] = qp (x0, H, Q, A, B, LB, UB, A_LB,
| A_IN, A_UB);
| octave:44> OBJ
| OBJ =  2.5311e-06
| octave:45> INFO
| INFO =
| {
|   solveiter =  200
|   info =  3
| }
| 
| octave:46> atol = 1e-10;
| octave:47> eqfeas = (max(abs(A*x-B)) < atol)
| eqfeas =  1
| octave:48> lbfeas = (all(x >= LB-atol))
| lbfeas =  1
| octave:49> ubfeas = (all(x <= UB+atol))
| ubfeas =  1
| octave:50> Albfeas = (all(A_IN*x >= A_LB-atol))
| Albfeas =  1
| octave:51> Aubfeas = (all(A_IN*x <= A_UB+atol))
| Aubfeas =  1
| octave:52> min(eig(H))
| ans = -0.0013879

Here's what I see with Octave built from the current development
sources:

  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> INFO
  INFO =
  {
    solveiter =  200
    info =  3
  }

  octave:4> atol = 1e-10;
  octave:5> eqfeas = (max(abs(A*x-B)) < atol)
  eqfeas = 0
  octave:6> lbfeas = (all(x >= LB-atol))
  lbfeas = 0
  octave:7> Albfeas = (all(A_IN*x >= A_LB-atol))
  Albfeas = 0
  octave:8> Aubfeas = (all(A_IN*x <= A_UB+atol))
  Aubfeas = 0
  octave:9> min(eig(H))
  ans = -0.0013879

and with 3.0.1 (Debian package version):

  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> INFO
  INFO =
  {
    solveiter =  200
    info =  3
  }

  octave:4> atol = 1e-10;
  octave:5> eqfeas = (max(abs(A*x-B)) < atol)
  eqfeas = 0
  octave:6> lbfeas = (all(x >= LB-atol))
  lbfeas = 0
  octave:7> Albfeas = (all(A_IN*x >= A_LB-atol))
  Albfeas = 0
  octave:8> Aubfeas = (all(A_IN*x <= A_UB+atol))
  Aubfeas = 0
  octave:9> min(eig(H))
  ans = -0.0013879


These are both with glpk 4.29 from Debian testing.  With glpk 4.32
from Debian experimental, I see the following results with the
development version of Octave:

  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> INFO
  INFO =
  {
    solveiter =  200
    info =  3
  }

  octave:4> atol = 1e-10;
  octave:5> eqfeas = (max(abs(A*x-B)) < atol)
  eqfeas =  1
  octave:6> lbfeas = (all(x >= LB-atol))
  lbfeas =  1
  octave:7> Albfeas = (all(A_IN*x >= A_LB-atol))
  Albfeas =  1
  octave:8> Aubfeas = (all(A_IN*x <= A_UB+atol))
  Aubfeas =  1
  octave:9> min(eig(H))
  ans = -0.0013879

jwe


More information about the Bug-octave mailing list