Skip to content

Commit d9fdd83

Browse files
slilonfe5jsiirola
andauthored
Update pyomo/contrib/parmest/parmest.py
Co-authored-by: John Siirola <jsiirola@users.noreply.github.com>
1 parent 3d844e9 commit d9fdd83

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pyomo/contrib/parmest/parmest.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -952,12 +952,10 @@ def _create_parmest_model(self, experiment_number):
952952

953953
# TODO, this needs to be turned into an enum class of options that still support
954954
# custom functions
955-
if isinstance(self.obj_function, Enum):
956-
if self.obj_function == ObjectiveType.SSE:
957-
second_stage_rule = SSE
958-
else:
959-
second_stage_rule = SSE_weighted
960-
self.covariance_objective = second_stage_rule
955+
if self.obj_function is ObjectiveType.SSE:
956+
second_stage_rule = SSE_weighted
957+
elif self.obj_function is ObjectiveType.SSE_weighted:
958+
second_stage_rule = SSE_weighted
961959
else:
962960
# A custom function uses model.experiment_outputs as data
963961
second_stage_rule = self.obj_function

0 commit comments

Comments
 (0)