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