Hi ! I am coding a little stuff that needs to extract some potential partial solutions from a constraint problem. To do this, I have a (pointer to a)Gecode::Space S with an array of IntVar, and I do the following : - I have initially propared a set of IntVarArgs, each containing a given subset of the variables of S. - I create S2 to be a clone of S ( via S2 = S->clone(); ) - I choose one of the IntVarArgs I initially created, let's call it V, and I create a new IntVarArgs V2(V); - I update all the variables of V2 so that they "become" variables of S2 : for (int i=0;i<V2.size();i++) V2[i].update(S2,true,V[i]); - I post a branching in S2 with the variables of V2. e.g. : Gecode::branch(S2,V2,INT_VAR_SIZE_MIN,INT_VAL_MIN); However, when I search on S2 (with the DFS engine), the returned solution do not have the corresponding variables domain reduces to a singleton. (I check this via an IntVar public member of my Gecode::Space descendant class that I did not forget to update in the copy constructor :-) ) I join an small example that illustrates my issue : for this problem with one variable and no constraints, I obtain 2 solutions (this number is correct), but, for both of them, the 'v' member is still [0..1]... I most likely have missed something, but I don't understand what.... I am working with Gecode 2.2.0. Cheers, -- Jérémie Vautard |
essai.cc
Description: Binary data
_______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
