-
-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gurobi seems to think there are small coefficients somewhere, or large coefficients #520
Comments
Try calling |
I just did something similar, got Gurobi.jl to do writeproblem, nothing weird. Here is JuMP's output
|
and Gurobi.jl
|
There's cancellation happening here, leading to zero (or near zero) coefficients. |
There was cancellation in Seb's thing too. But isn't it 1-1 cancellation? |
Yeah, not sure why gurobi would complain about coefficients that are exactly zero. |
|
So is this a Gurobi bug then arguably? |
We could add a check for exact zeros here: https://github.com/JuliaOpt/JuMP.jl/blob/bb1e072630e6c4e1f5468e45ba5068a2bae383f7/src/solvers.jl#L713 |
Yeah, true, one pass to get true number of nnzs, then fill in second. Probably wouldn't hurt performance much. |
Or one pass with |
one pass with |
Fix #520 by not adding zeros to constraint matrix
I have a fairly simple & small model, and when I solve it with Gurobi it says:
However, printing the A matrix after
prepConstrMatrix
reveals nothing out of the ordinary, and printing the model to an LP and loading that with gurobipy also doesn't trigger the warning. Sebastien reported to me a similar message where Gurobi said it was removing variables with very small coefficients, even though he couldn't find any by printing out. Is there somewhere we could be injecting noise?The text was updated successfully, but these errors were encountered: