From ed3eb3a699f21c98d589650ac45006a74fbf8561 Mon Sep 17 00:00:00 2001 From: Robert Parker Date: Wed, 6 Mar 2024 14:09:20 -0700 Subject: [PATCH 1/3] update imports of native_types and pyomo_constant_types (which is deprecated) --- idaes/core/util/scaling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idaes/core/util/scaling.py b/idaes/core/util/scaling.py index d4bd8256aa..d3b8609c70 100644 --- a/idaes/core/util/scaling.py +++ b/idaes/core/util/scaling.py @@ -47,7 +47,7 @@ from pyomo.dae.flatten import slice_component_along_sets from pyomo.util.calc_var_value import calculate_variable_from_constraint from pyomo.core import expr as EXPR -from pyomo.core.expr.numvalue import native_types, pyomo_constant_types +from pyomo.common.numeric_types import native_types, pyomo_constant_types from pyomo.core.base.units_container import _PyomoUnit import idaes.logger as idaeslog From 2227273729985dbab50ac5af97695aeaf6744c90 Mon Sep 17 00:00:00 2001 From: robbybp Date: Mon, 11 Mar 2024 11:02:42 -0600 Subject: [PATCH 2/3] dont check if node is in pyomo_constant_types --- idaes/core/util/scaling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idaes/core/util/scaling.py b/idaes/core/util/scaling.py index d3b8609c70..bd1f72e643 100644 --- a/idaes/core/util/scaling.py +++ b/idaes/core/util/scaling.py @@ -1509,7 +1509,7 @@ def exitNode(self, node, data): # first check if the node is a leaf nodetype = type(node) - if nodetype in native_types or nodetype in pyomo_constant_types: + if nodetype in native_types: return [node] node_func = self.node_type_method_map.get(nodetype, None) From aa91e5df4a7adf5ea4dc25bcec48353675d72a98 Mon Sep 17 00:00:00 2001 From: robbybp Date: Mon, 11 Mar 2024 11:03:08 -0600 Subject: [PATCH 3/3] dont import now-unused pyomo_constant_types --- idaes/core/util/scaling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idaes/core/util/scaling.py b/idaes/core/util/scaling.py index bd1f72e643..c0ec998ac7 100644 --- a/idaes/core/util/scaling.py +++ b/idaes/core/util/scaling.py @@ -47,7 +47,7 @@ from pyomo.dae.flatten import slice_component_along_sets from pyomo.util.calc_var_value import calculate_variable_from_constraint from pyomo.core import expr as EXPR -from pyomo.common.numeric_types import native_types, pyomo_constant_types +from pyomo.common.numeric_types import native_types from pyomo.core.base.units_container import _PyomoUnit import idaes.logger as idaeslog