Skip to content

Commit

Permalink
fix minimum decomposition
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout4 committed Jun 4, 2024
1 parent 7d46eb3 commit 1dfc1f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cpmpy/expressions/globalfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ def decompose_comparison(self, cpm_op, cpm_rhs):
"""
from .python_builtins import any, all
if cpm_op == "==": # can avoid creating aux var
return [any(x <= cpm_rhs for x in self.args),
all(x >= cpm_rhs for x in self.args)], []
return [any(x <= cpm_rhs for x in self.args)], [all(x >= cpm_rhs for x in self.args)]

lb, ub = self.get_bounds()
_min = intvar(lb, ub)
Expand Down

0 comments on commit 1dfc1f8

Please sign in to comment.