From: David G. <dg...@no...> - 2007-06-11 05:50:01
|
Oooops, I just realized I forgot to post the constraint. myPb.post(myPb.feasTupleFC(dim, result));=20 I was indeed missing something ! David -----Message d'origine----- De : cho...@li... [mailto:cho...@li...] De la part de David GRAVOT Envoy=E9 : dimanche 10 juin 2007 14:22 =C0 : cho...@li... Objet : [Choco-users] Newbie : feasTuple Hello, I'm trying to use feasTupleFC to limit an array of three integer = variables to be bound to the permutations of three given different numbers = v1<v2<v3 Using :=20 ArrayList<int[]> result =3D new ArrayList<int[]>(); result.add(new int[]{v1,v2,v3}); result.add(new int[]{v1,v3,v2}); result.add(new int[]{v2,v1,v3}); result.add(new int[]{v2,v3,v1}); result.add(new int[]{v3,v1,v2}); result.add(new int[]{v3,v2,v1}); And then myPb.feasTupleFC(dim, result); How do I have to declare dim ? I first tried :=20 IntDomainVar[] dim =3D myPb.makeEnumIntVarArray("dims", 3, v1, v3); But then, the possible solutions include v1,v1,v1 and in fact all the 27 combinations I then tried infeasTupleFC on the 21 wrong combinations, = but the result is still the same. Note : Neither (in)feasTupleAC nor BoundVarArrat do help more I guess I'm missing something ! Thanks for feedback David -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - = the FREE version of DB2 express and take control of your XML. No limits. = Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Choco-users mailing list Cho...@li... https://lists.sourceforge.net/lists/listinfo/choco-users |