I am working on modifying a code-base that has mostly positive cost values and a negative value for the objective function the order of -5e2 to -1e2.
I am modifying the generation of this model in such a way, that I need to have larger positive values. With these modifications, I have run into an issue, where constraints are violated in the obtained solution.
I have been debugging this in the generating code for quite some time (>1 week) and I am increasingly under the impression that this is caused by Gurobi (likely due to numerics - see below) - mainly due to the strange behaviors I am observing. Here are some symptoms:
1) Constraints are violated in the final solution (sometimes, not always). Even though the optimization finished and was *not* terminated due to a timeout.
2) When I continue optimizing an obtained solution, the new solution (very often) contains the previously missing constraints.
3) The issue of violated constraints becomes increasingly prominent, with increasing cost-values.
After testing an older version of my code for debugging, I got the following output from Gurobi, which leads me to believe that this is a numerics issue:
Warning: Model contains large objective coefficients
Consider reformulating model or setting NumericFocus parameter
to avoid numerical issues.
Note however, that in newer versions of my code, I do not see this warning, but still see this strange behavior (which is also, why initially I suspected programming bug instead of Gurobi).
My question, is what I can try to figure out if this is truly a numerics issue versus an issue with my code and the way that it sets up the ILP?!
By googling I stumbled across the Gurobi parameter `NumericFocus`. I will test it, but would like to hear additional suggestions, as I am still fairly new to Gurobi.
Any help is greatly appreciated.
Please sign in to leave a comment.