This model is likely on the borderline between feasibility and infeasibility. The algorithm used to determine feasibility in the solver is different than the algorithm used in IIS, and may reach a different conclusion on feasibility.
The most likely reason is poor numerics in the model. You should try to change the scaling (units) on the problem so that all non-zero coefficients (input data) are within a small number of orders of magnitude of one. The Gurobi solver output shows the coefficient ranges.
In addition to improving scaling, if needed, you can also set NumericFocus
to a higher than default value (for instance, its maximum value of 3). You can also adjust FeasibilityTol
and other parameters listed at https://www.gurobi.com/documentation/current/refman/making_the_algorithm_less_.html
Gurobi developer Tobias Achterberg wrote the following in a support forum post in reply to a similar question to yours:
Gurobi asserts that the model is infeasible but when coputing the IIS it says "Cannot compute IIS on a feasible model"
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.