[gecode-users] This type of constraint it is availaible in Gecode ?

Christian Schulte cschulte at kth.se
Sun Dec 7 18:07:15 CET 2014


Hi,

 

Think about reification. That’ll do the trick.

 

Cheers

Christian

 

--

Christian Schulte, KTH, web.it.kth.se/~cschulte/

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Bouchene Sabrina
Sent: Thursday, December 4, 2014 03:43 PM
To: users at 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.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20141207/7c3e76fd/attachment.html>


More information about the users mailing list