Hi,

I have a boolean dvar like this:

range i = 1..6;

dvar boolean x[i];

Let's say I would x to have only two values equal to 1 which I can do by adding this constraint:

I also would like to make sure that those two values that are equal to 1 must always come consecutively as in:

0 0 0 1 1 0 OR 1 1 0 0 0 0 OR 0 0 0 0 1 1 OR 0 1 1 0 0 0 ......etc

Thank you in advance,