Gurobi asserts that the model is infeasible but when coputing the IIS it says "Cannot compute IIS on a feasible model"

879 views
Skip to first unread message

Angel Manuel Gonzalez Rueda

unread,
Mar 22, 2017, 6:11:03 AM3/22/17
to Gurobi Optimization
I am solving a linear programming problem with gurobi. When I call the solve command it gives me the status code 3, so it asserts that the model is infeasible. However, when I want to compute the IIS system, it returns an error saying "Cannot compute IIS on a feasible model". Futrhermore, if I call the solve command again, after trying to compute the IIS, then Gurobi solves the problem to optimality and gives me a solution. Below is the ouput:

Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.

Gurobi Interactive Shell (win64), Version 7.0.1
Copyright (c) 2016, Gurobi Optimization, Inc.
Type "help()" for help

gurobi> model=read("gurobi_infeasible.lp")
gurobi> model.optimize()
Optimize a model with 1811 rows, 1392 columns and 4616 nonzeros
Coefficient statistics:
  Matrix range     [5e-10, 3e+02]
  Objective range  [1e-06, 1e+04]
  Bounds range     [5e+02, 1e+06]
  RHS range        [1e-14, 7e+03]
Presolve removed 815 rows and 666 columns
Presolve time: 0.04s
Presolved: 996 rows, 729 columns, 2838 nonzeros

Iteration    Objective       Primal Inf.    Dual Inf.      Time
       0    0.0000000e+00   6.748666e+05   0.000000e+00      0s

Solved in 281 iterations and 0.07 seconds
Infeasible model
gurobi> model.computeIIS()
Iteration    Objective       Primal Inf.    Dual Inf.      Time
       0    0.0000000e+00   1.550102e+05   0.000000e+00      0s
IIS runtime: 0.08 seconds
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "model.pxi", line 683, in gurobipy.Model.computeIIS (../../src/python/gur
obipy.c:54236)
gurobipy.GurobiError: Cannot compute IIS on a feasible model
gurobi> model.optimize()
Optimize a model with 1811 rows, 1392 columns and 4616 nonzeros
Coefficient statistics:
  Matrix range     [5e-10, 3e+02]
  Objective range  [1e-06, 1e+04]
  Bounds range     [5e+02, 1e+06]
  RHS range        [1e-14, 7e+03]

Solved in 853 iterations and 0.01 seconds
Optimal objective  2.764758921e-02


It is really annoying for me this behaviour. I would like to know what is happening. The lp file of the model can be found attached.

Thanks in advance.
Ángel
gurobi_infeasible.lp

Tobias Achterberg

unread,
Mar 22, 2017, 7:51:07 AM3/22/17
to gur...@googlegroups.com
Your coefficient statistics shows a very big range in the matrix coefficients.
Coefficients in the order of 1e-10 can lead to numerical issues in the linear
system solves, which are caused by the finite precision floating point
arithmetics of the CPU. This could cause the simplex algorithm to declare the
model infeasible, while the IIS algorithm thinks that it is feasible.

You should try to reformulate your model so that those tiny coefficients in the
constraint matrix are avoided. Maybe rescaling your columns may already suffice.

Regards,

Tobias

Angel Manuel Gonzalez Rueda

unread,
Mar 22, 2017, 8:53:41 AM3/22/17
to Gurobi Optimization
Thank you very much for your suggestion Tobias.

Best regards,
Ángel
Reply all
Reply to author
Forward
0 new messages