Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QCQP tests failing #41

Closed
mlubin opened this issue Sep 21, 2013 · 8 comments
Closed

QCQP tests failing #41

mlubin opened this issue Sep 21, 2013 · 8 comments

Comments

@mlubin
Copy link
Member

mlubin commented Sep 21, 2013

$ julia runtests.jl 
Running tests:
 Test: qcqpmodel.jl
Optimize a model with 0 rows, 2 columns and 0 nonzeros
Model has 1 quadratic constraint
Presolve time: 0.00s
Presolved: 3 rows, 5 columns, 6 nonzeros
Presolved model has 1 second-order cone constraint
Ordering time: 0.00s

Barrier statistics:
 AA' NZ     : 3.000e+00
 Factor NZ  : 6.000e+00
 Factor Ops : 1.400e+01 (less than 1 second per iteration)
 Threads    : 1

                  Objective                Residual
Iter       Primal          Dual         Primal    Dual     Compl     Time
   0   0.00000000e+00 -7.11109926e+00  1.22e+00 9.75e-01  1.49e+00     0s
   1  -1.47199294e+00 -4.28730677e+00  1.21e-01 3.66e-01  4.26e-01     0s
   2  -1.81200237e+00 -2.19495518e+00  1.21e-07 3.66e-07  4.79e-02     0s
   3  -1.99979675e+00 -2.00249656e+00  3.75e-10 7.76e-12  3.37e-04     0s
   4  -1.99999980e+00 -2.00000293e+00  4.02e-13 4.88e-15  3.92e-07     0s
   5  -2.00000000e+00 -2.00000000e+00  2.32e-11 1.29e-12  3.92e-10     0s

Barrier solved model in 5 iterations and 0.00 seconds
Optimal objective -2.00000000e+00

Solving KKT system to obtain QCP duals...

Optimize a model with 1 rows, 2 columns and 2 nonzeros
Presolve time: 0.00s
Presolved: 1 rows, 2 columns, 2 nonzeros
Ordering time: 0.00s

Barrier statistics:
 AA' NZ     : 0.000e+00
 Factor NZ  : 1.000e+00
 Factor Ops : 1.000e+00 (less than 1 second per iteration)
 Threads    : 1

                  Objective                Residual
Iter       Primal          Dual         Primal    Dual     Compl     Time
   0   4.99999500e+05 -5.19991353e+05  9.97e+02 5.00e+02  1.00e+06     0s
   1   4.39007151e+03 -2.34434851e+04  1.25e+02 3.16e+01  6.73e+04     0s
   2   2.14689407e+01 -1.76970139e+04  0.00e+00 3.16e-05  3.54e+03     0s
   3   2.14641519e+01 -5.28909679e+01  0.00e+00 1.01e-07  1.49e+01     0s
   4   6.99898860e+00 -1.95012065e+01  0.00e+00 1.01e-13  5.30e+00     0s
   5  -7.16551769e-01 -6.17996811e+00  0.00e+00 8.88e-16  1.09e+00     0s
   6  -1.94060202e+00 -2.12813568e+00  0.00e+00 0.00e+00  3.75e-02     0s
   7  -1.99994227e+00 -2.00013317e+00  0.00e+00 0.00e+00  3.82e-05     0s
   8  -1.99999994e+00 -2.00000013e+00  0.00e+00 2.22e-16  3.82e-08     0s
   9  -2.00000000e+00 -2.00000000e+00  0.00e+00 0.00e+00  3.83e-11     0s

Barrier solved model in 9 iterations and 0.00 seconds
Optimal objective -2.00000000e+00


ERROR: assertion failed: |:(modQ.objVal) - :(-(-1,/(4,sqrt(3))))| <= 1.0e-6
  :(modQ.objVal) = -1.9999999997966855
  :(-(-1,/(4,sqrt(3)))) = -3.3094010767585034
  difference = 1.3094010769618178 > 1.0e-6
 in error at error.jl:22
 in test_approx_eq at test.jl:78
 in anonymous at no file:17
 in include at boot.jl:238
at /home/mlubin/.julia/JuMP/test/qcqpmodel.jl:43
at /home/mlubin/.julia/JuMP/test/runtests.jl:18

@joehuchette

@joehuchette
Copy link
Contributor

Strange, it runs fine on my setup.

@mlubin
Copy link
Member Author

mlubin commented Sep 21, 2013

@IainNZ ?

@IainNZ
Copy link
Collaborator

IainNZ commented Sep 21, 2013

Haha was rebooting into Linux as you wrote that.
Barrier solved model in 9 iterations and 0.00 seconds
Optimal objective -2.00000000e+00

ERROR: assertion failed: |:(modQ.objVal) - :(-(-1,/(4,sqrt(3))))| <= 1.0e-6
:(modQ.objVal) = -1.9999999997966855
:(-(-1,/(4,sqrt(3)))) = -3.3094010767585034
difference = 1.3094010769618178 > 1.0e-6
in error at error.jl:22
in test_approx_eq at test.jl:78
\

@IainNZ
Copy link
Collaborator

IainNZ commented Sep 21, 2013

(is what I get)

@IainNZ
Copy link
Collaborator

IainNZ commented Sep 21, 2013

Gurobi5.5.0_linux64

@mlubin
Copy link
Member Author

mlubin commented Sep 22, 2013

Fixed by jump-dev/Gurobi.jl@b9a9448. I have no idea how this was ever giving the right answer. @joehuchette: Could you test with the latest gurobi.jl?

@mlubin mlubin closed this as completed Sep 22, 2013
@joehuchette
Copy link
Contributor

Oh shoot, I made this change locally and must not have sent a pull request. Sorry bout that

@mlubin
Copy link
Member Author

mlubin commented Sep 22, 2013

That makes more sense. I'm partially to blame as well since the bug was in my code.

mlubin added a commit that referenced this issue Mar 11, 2018
drop Graphs for LightGraphs and fixes for 0.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants