[gecode-users] Add value in IntVarArray

mehdi m medistif at hotmail.fr
Mon Nov 9 09:50:45 CET 2015


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 value 0, and i saw in mpg that only IntVarArgs can grow dynamically by adding value with "<<" operator, so is there any way to add a value in IntVarArray ? especially that the IntVarArray in my model can be large.
Thanks
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20151109/de953b89/attachment.html>


More information about the users mailing list