From d4325007cb6e67b337764c3c1b0184808af77b77 Mon Sep 17 00:00:00 2001 From: Shawn Martin Date: Tue, 20 Aug 2024 08:12:48 -0600 Subject: [PATCH] Forgot black on Bethany's changes. --- pyomo/contrib/parmest/utils/model_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyomo/contrib/parmest/utils/model_utils.py b/pyomo/contrib/parmest/utils/model_utils.py index 83d2566bbec..a5e295c2e1a 100644 --- a/pyomo/contrib/parmest/utils/model_utils.py +++ b/pyomo/contrib/parmest/utils/model_utils.py @@ -81,7 +81,7 @@ def convert_params_to_vars(model, param_CUIDs=None, fix_vars=False): # get indexed Params param_theta_objects = list(theta_object.values()) - + # get indexed Param CUIDs indexed_param_CUIDs.extend( ComponentUID(theta_obj) for theta_obj in theta_object.values() @@ -135,7 +135,8 @@ def convert_params_to_vars(model, param_CUIDs=None, fix_vars=False): # Convert Params to Vars in Expressions for expr in model.component_data_objects(pyo.Expression): - if any(ComponentUID(v) in param_CUIDs_set + if any( + ComponentUID(v) in param_CUIDs_set for v in identify_mutable_parameters(expr) ): new_expr = replace_expressions(expr=expr, substitution_map=substitution_map)