From: David G. <dg...@no...> - 2007-06-10 12:22:03
|
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 : ArrayList<int[]> result = 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 : IntDomainVar[] dim = 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 |