Actually, for 2. this is used: suppose you want express logical equivalence by reification, say (x<y) ó (a < b). Then, one could express it by (x < y) ó b0 = 1, (a < b) ó b1 = 1, and eqv(b0,b1,1). However it can be done more efficiently by using just a single Boolean variable: (x < y) ó b=1 and (a < b) ó 1. Only one Boolean variable, and no equivalence propagator.
Cheers Christian -- Christian Schulte, www.it.kth.se/~cschulte/ From: [email protected] [mailto:[email protected]] On Behalf Of Joe Porter Sent: Monday, April 27, 2009 7:16 PM To: [email protected] Subject: Re: [gecode-users] Reification 1. It is really an equivalence: so what it actually says (your example slightly simplified) is (x != y+c) ó b=1. If b=0 it will assert x == y+c, and if b=1 it will assert x != y+c. I am not sure whether this answers your question. That's exactly what I wanted -- to use the boolean variables to record which constraints could not be satisfied. 2. Well depends on what you want to express, when you post xi == yi + c ó b=1 for the same b for all i it means that if b=0, it must hold for all i that xi != yi +c and likewise if b=1, it must hold for all i that xi = yi + c. If you want to have Boolean control variables that make a statement just for a particular i you have to create a new Boolean variable for each i. So I guess that means that no one else has tried it ;-) Thanks for all of your help, -Joe
_______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
