Advanced user scaling

In the previous sections, we presented some simple strategies to limit the ranges of variable bounds, constraint right-hand sides, objective values, and constraint matrix coefficients. However, it could happen that by scaling constraints or variables, some constraint coefficients become too small. Note that Gurobi will treat any constraint coefficient with absolute value under <span>$</span>10^{-13}<span>$</span> as zero. Consider the following example:

10^{-7}x + 10y &\leq& 10\
In this example, the matrix coefficients range in <span>$</span>[10^{-7},10^4]<span>$</span>. If we multiply all <span>$</span>x<span>$</span> coefficients by <span>$</span>10^5<span>$</span>, and divide all coefficients in the second constraint by <span>$</span>10^3<span>$</span>, we obtain:
10^{-2}x' + 10y &\leq& 10\
where <span>$</span>x=10^5x'<span>$</span>. The resulting matrix coefficients have a range in <span>$</span>[10^{-2},10^2]<span>$</span>. Essentially the trick is to simultaneously scale a column and a row to achieve a smaller range in the coefficient matrix.

We recommend that you scale the matrix coefficients so that their range is contained in six orders of magnitude or less, and hopefully within <span>$</span>[10^{-3},10^{6}]<span>$</span>.