I'd like to express the constraint:

A = (B - C) mod n
0 <= A < n

for variables A,B,C and constant n.

How would you advise doing this? The obvious answer is to add an extra  
variable X:

A = (B-C) + n * X
0 <= A < n

but I'm not sure if this is best. Can you advise?

Malcolm


_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to