[gecode-users] propagation consistency of count (single value) constraint

Kish Shen kisshen at cisco.com
Thu Aug 27 17:48:02 CEST 2015


As a follow up to my previous post on this, then from the reference 
documentation, for

count(home, x, y, IRT_EQ, z)

where y and z are int, then there is only one consistency level 
supported, and it is not domain consistent.

We have a rostering program (originally written for our ic solvder), 
which I used to test the Gecode interface, and it uses count 
constraints, and changing the consistency level affected the execution 
times significantly for certasin problem instances. I took a look again 
at the code, and the count constraints are with y and z being integers.
(the execution times are faster with ICL_BND than ICL_DOM)

The count single vsalue constraint is posted to Gecode using only one 
propagator, the version with y and z being IntVar (and if they are 
integers, they are posted as IntVar with a singleton domain). This is 
done for all constraints that have variants that accept both IntVar and 
int, as this avoid me having to write a lot of code to distinguish the 
argument types, and I remember asking about this here a while ago and I 
think Chirstian said that Gecode will figure out the best propagator to 
use for the argument.

So my questions are: is the propagator posted the one with y and z being 
int? If so, is there more than consistency level for the propagator, as 
my result seem to suggest? The difference is very significant, e.g. for 
one instance:

ICL_BND: 0.73s  ICL_DOM: 198s

the ICL_BND times are more than 100 times faster, and the only 
difference between the two runs are the count constraint posted with 
ICL_BND rather than ICL_DOM (running on the same machine, of course).


Cheers,

Kish







More information about the users mailing list