# Increasing NumericFocus makes problem infeasible

AnsweredHello,

I have a simulation model in Python where I iteratively solve an optimization model using gurobipy. In one of the iterations, I encountered the problem discussed here, where I had a nonzero gap for the optimal solution. As the workaround proposed, I set the value of NumericFocus to 2 (NumericFocus = 1 did not help in my case). That solves the issue of the nonzero gap.

However, in another iteration (i.e., same model, different set of values), my model becomes infeasible. I set the NumericFocus back to the default value and the problem becomes feasible. For this particular iteration, the coefficient statistics are as follows:

Matrix range [1e-02, 9e+01]

Objective range [3e+01, 1e+02]

Bounds range [1e+00, 9e+01]

RHS range [1e+00, 2e+02]

Given the magnitude of the coefficients, I was not expecting any numerical issues. I know how to go around this issue in this specific case but given that increasing NumericFocus is supposed to "shift the focus towards being more careful in numerical computations," now I am concerned if my problem is infeasible to begin with. So now, my question is, is it possible increasing NumericFocus makes a feasible problem infeasible? or the problem is in fact infeasible?

I am using gurobipy 9.1.1. I have the mps of the problem here.

Any help is much appreciated.

Please sign in to leave a comment.

## Comments

1 comment