Gurobi says unbounded, I think it is infeasible

759 views
Skip to first unread message

Angelos

unread,
Apr 19, 2016, 12:57:40 PM4/19/16
to Gurobi Optimization
Hi,

I am trying to solve the attached linear program using Gurobi.
Gurobi tells me it is unbounded while the problem should be (I think) infeasible.
I am using the C++ interface, but I get the same results with the command line tool.

Note that the first 4 lines of the .lp file are :
*************
Minimize
  epigraph
Subject To
extra: epigraph >= -10000
************************************
Clearly the problem cannot be unbounded, either it is infeasible or it has an optimal value larger or equal to -10000.
(I only have this constraint there for debugging purposes, I suspect the model without this constraint is still infeasible and not unbounded.)

The way I run it from the command line is:

$ gurobi.sh
gurobi> m=read('withextra.lp')
gurobi> setParam('DualReductions',0)
gurobi> m.optimize()

I obtain the output:
Optimize a model with 85 rows, 13 columns and 305 nonzeros
Coefficient statistics:
  Matrix range    [5e-01, 4e+05]
  Objective range [1e+00, 1e+00]
  Bounds range    [0e+00, 0e+00]
  RHS range       [2e-01, 4e+05]
Presolve time: 0.00s
Presolved: 13 rows, 85 columns, 305 nonzeros

Iteration    Objective       Primal Inf.    Dual Inf.      Time
       0   -1.0000000e+03   0.000000e+00   3.798884e+06      0s

Solved in 6 iterations and 0.00 seconds
Unbounded model


Any help is appreciated.

Many Thanks,

Angelos






withextra.lp

T.

unread,
Apr 19, 2016, 1:43:01 PM4/19/16
to Gurobi Optimization
I checked your model with an exact solver and it is in fact infeasble. In addition to that, the dual is unbounded with a relatively sparse dual ray (= certificate of infeasibility).

If I do:
gurobi> m=read('withextra.lp')
gurobi> setParam('PreDual',0)
gurobi> setParam('DualReductions',0)
gurobi> m.optimize()
, then Gurobi says: "Solved in 0 iterations and 0.00 seconds" and "Infeasible model".

If I do:
gurobi> m=read('withextra.lp')
gurobi> setParam('PreDual',0)
gurobi> m.optimize()
, then Gurobi says: "Infeasible or unbounded model".

If I do:
gurobi> m=read('withextra.lp')
gurobi> setParam('PreDual',1)
gurobi> setParam('DualReductions',0)
gurobi> m.optimize()
, then Gurobi says: "Unbounded model".

Altogether, I think the following happens: With your settings, Gurobi takes the dual of the model. Gurobi then calls this the "model" and claims unboundedness. While this is correct, I think the output in such a case should be improved.
When you disable taking the dual, then I guess, Gurobi detects infeasibility of a reduced dual model and correctly claims "Infeasible or unbounded model". Disabling dual reductions yields the correct result "Infeasible model".

Angelos Tsoukalas

unread,
Apr 19, 2016, 2:14:23 PM4/19/16
to Gurobi Optimization
Thanks! I'll use the setting you suggested.

--

---
You received this message because you are subscribed to the Google Groups "Gurobi Optimization" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gurobi+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Renan Garcia

unread,
Apr 21, 2016, 12:52:22 PM4/21/16
to gur...@googlegroups.com
Angelos,

Thank you for reporting this issue. The Gurobi developers have tracked down the corresponding bug, and the fix will appear in a subsequent release.

T.,

Thanks for providing a suitable workaround.

Tung Vu Xuan

unread,
Dec 2, 2016, 8:58:28 AM12/2/16
to Gurobi Optimization
Hi, 

I am using Gurobi 7.0.1. I have a model that has a constant objective (0) as in attached. Gurobi returns "unbounded" for this model which is not true in LP. If I do "setParam('PreDual',0)", Gurobi return feasible. Do you have any ideas for this? Thanks.

Vào 18:52:22 UTC+2 Thứ Năm, ngày 21 tháng 4 năm 2016, Renan Garcia đã viết:
mip1.lp.gz

Renan Garcia

unread,
Dec 2, 2016, 9:06:11 AM12/2/16
to gur...@googlegroups.com
If I run this model with Gurobi 7.0.1, I see the following in the logs:

  Warning: very big Kappa = 5.56043e+12, try parameter NumericFocus

This means the condition number for the optimal basis is very large, which causes issues for the solver.

<mip1.lp.gz>

Renan Garcia

unread,
Dec 2, 2016, 9:08:40 AM12/2/16
to gur...@googlegroups.com
Try setting the ScaleFlag parameter to 0 or 2 (see http://www.gurobi.com/documentation/7.0/refman/scaleflag.html#parameter:ScaleFlag).

Tung Vu Xuan

unread,
Dec 2, 2016, 11:23:14 AM12/2/16
to Gurobi Optimization
It works for me now. Thank you very much!!

Vào 15:08:40 UTC+1 Thứ Sáu, ngày 02 tháng 12 năm 2016, Renan Garcia đã viết:
Reply all
Reply to author
Forward
0 new messages