report_scaling

(function from pyomo.util.report_scaling)

pyomo.util.report_scaling.report_scaling(m: BlockData, too_large: float = 50000.0, too_small: float = 1e-06) bool[source]

This function logs potentially poorly scaled parts of the model. It requires that all variables be bounded.

It is important to note that this check is neither necessary nor sufficient to ensure a well-scaled model. However, it is a useful tool to help identify problematic parts of a model.

This function uses symbolic differentiation and interval arithmetic to compute bounds on each entry in the jacobian of the constraints.

Note that logging has to be turned on to get the output

Parameters:
  • m (BlockData) – The pyomo model or block

  • too_large (float) – Values above too_large will generate a log entry

  • too_small (float) – Coefficients below too_small will generate a log entry

Returns:

success – Returns False if any potentially poorly scaled components were found

Return type:

bool