conjure-cp / conjure

Conjure: The Automated Constraint Modelling Tool
Other
96 stars 22 forks source link

streamliners do not partition domains #659

Closed ott2 closed 3 months ago

ott2 commented 3 months ago

Using the trivial spec

find x : int(1..10)
such that
(x ** 2) % 2 = 0

in tmp.essence, then running conjure streamlining tmp.essence yields four streamliners, the last two of which are x < 1 + (10 - 1) / 2 and x > 1 + (10 - 1) / 2. In this case these evaluate to x < 5 and x > 5. In other words, this is equivalent to splitting int(1..10) into int(1..4) and int(6..10), but 5 is not dealt with.

I believe the correct pair of streamliners in this case would be x < 1 + (10 - 1)/2 and x >= 1 + (10 - 1)/2, changing one of the strict inequalities to a non-strict inequality to ensure a partition.