(function from pyomo.util.infeasible)
pyomo.util.infeasible
Find variables and constraints whose values are close to their bounds.
Uses the current model state. Variables with no values and constraints with evaluation errors are returned as if they were close to their bounds.
Note
Equality constraints are omitted (as they should always be close to their bounds!).
Range constraints where both the upper and lower bounds are close are omitted (these are basically equality constraints).
Fixed variables are omitted (this is analogous to an equality constraint).
Variables where both the upper and lower bounds are close are omitted (these are basically fixed variables).
m (Block) – Pyomo block or model to check
tol (float) – absolute feasibility tolerance: values within tol of the bound will be returned.
var (ComponentData) – The variable or constraint that is close to its bounds
val (float) – The value of the variable or constraint body
close (int) – A bitmask indicating which bound(s) the value was close to (1 for the lower bound or 2 for the upper bound; 0 indicates the variable or constraint had no value or evaluating the constraint generated an error)