Hi, did you trigger propagation? That is, did you invoke space->status() so that the constraints are propagated?
Christian -- Christian Schulte, http://www.imit.kth.se/~schulte/ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stanimir Dragiev Sent: Monday, October 15, 2007 9:53 PM To: [EMAIL PROTECTED] Subject: [gecode-users] usage of abs() constraint Hello to all on the list! I was pretty frustrated, that I couldn't get following to work: ---- code --- //init var_a, var_b IntVar abs_diff(space, 0, MAX_DIFF); IntVar signed_diff = post(space, var_a - var_b); abs( space, signed_diff, abs_diff); ---- end --- But I found an example in the gecode example models using abs, and I turned it into: ---- code --- //init var_a, var_b IntVar abs_diff(space, 0, MAX_DIFF); abs_diff = post(space, abs(space, minus(space, var_a, var_b, ICL_DOM), ICL_DOM), ICL_DOM); ---- end --- The latter one does what I expect, while the first leaves abs_diff with it's original bounds: 0 to MAX_DIFF. Now I'm a little more frustrated than before, since I don't understand what is going on :o) Is it not expected, that both behave the same way? -- cheers stanio _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users
