From 7299a79db5481a5ac4faf683d1d71bba074c01b7 Mon Sep 17 00:00:00 2001 From: robbybp Date: Thu, 7 Mar 2024 13:05:52 -0700 Subject: [PATCH 1/2] remove redundant implementation of acceptChildResult --- pyomo/util/subsystems.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyomo/util/subsystems.py b/pyomo/util/subsystems.py index 9a2a8b6635d..35deaab7605 100644 --- a/pyomo/util/subsystems.py +++ b/pyomo/util/subsystems.py @@ -59,9 +59,6 @@ def finalizeResult(self, result): def enterNode(self, node): pass - def acceptChildResult(self, node, data, child_result, child_idx): - pass - def acceptChildResult(self, node, data, child_result, child_idx): if child_result.__class__ in native_types: return False, None From 8b66e10c08ac149272ebd94b7f847cfed8dba7b6 Mon Sep 17 00:00:00 2001 From: robbybp Date: Thu, 7 Mar 2024 13:06:47 -0700 Subject: [PATCH 2/2] comment out unnecessary walker methods --- pyomo/util/subsystems.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyomo/util/subsystems.py b/pyomo/util/subsystems.py index 35deaab7605..58921b37cca 100644 --- a/pyomo/util/subsystems.py +++ b/pyomo/util/subsystems.py @@ -56,13 +56,13 @@ def exitNode(self, node, data): def finalizeResult(self, result): return self._functions - def enterNode(self, node): - pass + #def enterNode(self, node): + # pass - def acceptChildResult(self, node, data, child_result, child_idx): - if child_result.__class__ in native_types: - return False, None - return child_result.is_expression_type(), None + #def acceptChildResult(self, node, data, child_result, child_idx): + # if child_result.__class__ in native_types: + # return False, None + # return child_result.is_expression_type(), None def identify_external_functions(expr):