Skip to main content

Do large implied variable ranges in nonlinear terms affect numerical stability, or only explicit coefficients and rhs matter?

Comments

1 comment

  • Igor Ganapolsky

    You're not misreading it - the implied ranges matter too, not just explicit coefficients and RHS. Gurobi's recommended ranges apply to variable bounds as well, and for a bilinear or general nonlinear term the magnitude is driven by the bounds of the variables entering it: if x and y can each reach 1e6, then x*y has an implied range up to 1e12, and that range shows up in the relaxations the solver builds even though no coefficient you wrote down is large. Presolve does bound strengthening, but it can only use what's in the model - it can't see what you know about realistic operating ranges, so a variable left with an infinite or 1e9 bound keeps a huge implied domain even if the real solution lives in [0, 100]. The fix is tight finite bounds on every variable appearing in a nonlinear term, including auxiliaries you introduce for products/powers, plus rescaling units so quantities sit within a few orders of magnitude of each other. NumericFocus helps once that's done, but on its own it's a band-aid rather than a fix for bad scaling. Worth reading: https://docs.gurobi.com/projects/optimizer/en/current/concepts/numericguide/tolerances_scaling.html plus the Help Center article you linked on large matrix coefficient range / bounds. If you post the reported coefficient and bound ranges, it's usually easy to spot which block is the offender.

    0

Please sign in to leave a comment.