Skip to content

Commit 998aada

Browse files
committed
Fix GCD calculation for Boolean reified linear constraints.
1 parent f7f0d7c commit 998aada

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

changelog.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ Date: 2020-??-??
6969
[DESCRIPTION]
7070
Let's see.
7171

72+
[ENTRY]
73+
Module: int
74+
What: bug
75+
Rank: minor
76+
[DESCRIPTION]
77+
Fix GCD calculation for Boolean reified linear constraints.
78+
7279
[ENTRY]
7380
Module: flatzinc
7481
What: change

gecode/int/linear/bool-post.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ namespace Gecode { namespace Int { namespace Linear {
651651
d /= gcd;
652652
break;
653653
case IRT_NQ:
654-
if ((d % gcd) == 0) {
654+
if ((d % gcd) != 0) {
655655
if (r.mode() != RM_IMP)
656656
GECODE_ME_FAIL(BoolView(r.var()).one(home));
657657
return;

0 commit comments

Comments
 (0)