Skip to content

Commit

Permalink
Fixing incorrect logic
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlee94 committed Aug 11, 2023
1 parent 25edadd commit c85e917
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions idaes/core/util/model_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,9 +749,9 @@ def variables_near_bounds_generator(
# Calculate largest tolerance from absolute and relative
tol = max(abs_tol, mag * rel_tol)

if v.ub is not None and not skip_lb and value(v.ub - v.value) <= tol:
if v.ub is not None and not skip_ub and value(v.ub - v.value) <= tol:
yield v
elif v.lb is not None and not skip_ub and value(v.value - v.lb) <= tol:
elif v.lb is not None and not skip_lb and value(v.value - v.lb) <= tol:
yield v


Expand Down

0 comments on commit c85e917

Please sign in to comment.