Hi,
Think about reification. That’ll do the trick. Cheers Christian -- Christian Schulte, KTH, web.it.kth.se/~cschulte/ From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Bouchene Sabrina Sent: Thursday, December 4, 2014 03:43 PM To: users@gecode.org Subject: [gecode-users] This type of constraint it is availaible in Gecode ? Hi, Exst'il in Gecode a constraint that calculates the number of consecutive values in a an array ? example: Array = 1 1 2 1 1 1 0 0 2 2 2 the first sequence of (1) = 2. the second sequence (2) = 1. troisème the sequence of (1) = 3. thefourth sequence of (0) = 2. the last sequence of (2) = 3. I want to write this constraint so that later (an other constraint) that imposes limits on the size of these sequences. example: the size of the sequence should not exceed 3.
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users