From e3b1c6c99fea009c9b0fa52d780e1707f2cb1e2e Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Thu, 24 Aug 2023 10:04:28 -0500 Subject: [PATCH] Update pyomo.core.expr imports to remove deprecated common component --- idaes/core/plugins/simple_equality_eliminator.py | 2 +- idaes/core/plugins/variable_replace.py | 2 +- idaes/core/surrogate/pysmo/utils.py | 2 +- idaes/core/util/expr_doc.py | 2 +- idaes/core/util/scaling.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/idaes/core/plugins/simple_equality_eliminator.py b/idaes/core/plugins/simple_equality_eliminator.py index 804f15ba3f..a4159c2a11 100644 --- a/idaes/core/plugins/simple_equality_eliminator.py +++ b/idaes/core/plugins/simple_equality_eliminator.py @@ -17,7 +17,7 @@ import pyomo.environ as pyo from pyomo.core.base.transformation import TransformationFactory from pyomo.core.plugins.transform.hierarchy import NonIsomorphicTransformation -from pyomo.core.expr import current as EXPR +from pyomo.core import expr as EXPR from pyomo.contrib.fbbt.fbbt import compute_bounds_on_expr from pyomo.repn import generate_standard_repn import idaes.logger as idaeslog diff --git a/idaes/core/plugins/variable_replace.py b/idaes/core/plugins/variable_replace.py index 444c2de6fd..883876ddc9 100644 --- a/idaes/core/plugins/variable_replace.py +++ b/idaes/core/plugins/variable_replace.py @@ -16,7 +16,7 @@ from pyomo.core.base.transformation import TransformationFactory from pyomo.core.plugins.transform.hierarchy import NonIsomorphicTransformation -from pyomo.core.expr import current as EXPR +from pyomo.core import expr as EXPR from pyomo.common.config import ( ConfigBlock, ConfigValue, diff --git a/idaes/core/surrogate/pysmo/utils.py b/idaes/core/surrogate/pysmo/utils.py index 6d641c798b..422df31561 100644 --- a/idaes/core/surrogate/pysmo/utils.py +++ b/idaes/core/surrogate/pysmo/utils.py @@ -29,7 +29,7 @@ __author__ = "Oluwamayowa Amusat, John Siirola" -from pyomo.core.expr import current as EXPR, native_types +from pyomo.core import expr as EXPR, native_types from pyomo.core.expr.numvalue import value _numpy_available = True diff --git a/idaes/core/util/expr_doc.py b/idaes/core/util/expr_doc.py index 168e10a06f..48a6a61e0b 100644 --- a/idaes/core/util/expr_doc.py +++ b/idaes/core/util/expr_doc.py @@ -28,7 +28,7 @@ from pyomo.core.base.block import _BlockData from pyomo.core.expr.visitor import StreamBasedExpressionVisitor from pyomo.core.expr.numeric_expr import ExternalFunctionExpression -from pyomo.core.expr import current as EXPR, native_types +from pyomo.core import expr as EXPR, native_types from pyomo.common.collections import ComponentMap diff --git a/idaes/core/util/scaling.py b/idaes/core/util/scaling.py index 53cfd24844..35454a7de5 100644 --- a/idaes/core/util/scaling.py +++ b/idaes/core/util/scaling.py @@ -46,7 +46,7 @@ from pyomo.dae import DerivativeVar from pyomo.dae.flatten import slice_component_along_sets from pyomo.util.calc_var_value import calculate_variable_from_constraint -from pyomo.core.expr import current as EXPR +from pyomo.core import expr as EXPR from pyomo.core.expr.numvalue import native_types, pyomo_constant_types from pyomo.core.base.units_container import _PyomoUnit