Closed kurbansitterley closed 7 months ago
Here is a MWE that reproduces the error:
import pyomo.environ as pe
from pyomo.contrib.fbbt.fbbt import compute_bounds_on_expr
m = pe.ConcreteModel()
m.x = pe.Var()
m.y = pe.Var()
e = pe.Expr_if(m.x <= 0, m.y + m.x == 0, m.y - m.x == 0)
ebounds = compute_bounds_on_expr(e)
Seems like the issue is that FBBT is not failing gracefully when it encounters unknown expression types like Expr_if
. @michaelbynum this seems counter to your comment in #846.
Thanks. I'll take a look.
My comment in #846 was correct except that compute_bounds_on_expr
now uses a different walker than fbbt
. I just opened a PR to fix the new walker for compute_bounds_on_expr
.
Summary
I am a developer working on WaterTAP and a subpackage WaterTAP-REFLO.
We have a model that costs a MgCl2 flow. The constraint used to cost the flow uses
Expr_if
statements and I am guessing these are causing theDeveloperError
to be raised(?). The error is raised during the build.As of now we are excluding this flow from our costing package.
Steps to reproduce the issue
src > watertap_contrib > reflo > costing > units > chemical_softening_zo.py
Error Message
Information on your system
Pyomo version: 6.7.0 Python version: 3.10.13 Operating system: MacOS Ventura 13.6.3 (22G436) How Pyomo was installed (PyPI, conda, source): conda Solver (if applicable): watertap-ipopt
Additional information