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 as zero. Consider the following example:
In this example, the matrix coefficients range in . If we multiply all coefficients by , and divide all coefficients in the second constraint by , we obtain:
where . The resulting matrix coefficients have a range in . 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 .