Re: [gecode-users] Add value in IntVarArray

2015-11-09 Thread Guido Tack
Hi, you're trying to add values to a domain of an IntVar, and that's not possible. You need to initialise the domain with the right values (see the constructors that take an IntSet) or initialise it with a superset (eg {0,1,2,3} in your case) and then remove the elements you don't want, eg using a

[gecode-users] Add value in IntVarArray

2015-11-09 Thread mehdi m
Hi everyone, In my model i have an IntVarArray X with size 3 = [X1, X2, X3]The domains must be :D(X1) = {1,2,3}D(X2) = {0,2,3}D(X3) = {0,3} For this, i do :X1 :X[1] = IntVar(*this, 1, 3); X2..X3 :for (int i = 2; i <= 3; i++){X[i] = IntVar(*this, i, 3);} So for X2 and X3 i need to add the valu