Skip to content

Commit

Permalink
Prevent chainedInequality caching for inequalities that already have …
Browse files Browse the repository at this point in the history
…3 terms.
  • Loading branch information
jsiirola committed Nov 11, 2016
1 parent f5393f6 commit 50f10b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyomo/core/base/expr_coopr3.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def __getstate__(self):
def __nonzero__(self):
if generate_relational_expression.chainedInequality is not None:
raise TypeError(chainedInequalityErrorMessage())
if not self.is_constant():
if not self.is_constant() and len(self._args) == 2:
generate_relational_expression.call_info \
= traceback.extract_stack(limit=2)[-2]
generate_relational_expression.chainedInequality = self
Expand Down

0 comments on commit 50f10b6

Please sign in to comment.