Hi,
There is a generic trick for situations like this: you introduce new variables tend', tstart' and tdur' and only enforce that they are equal to tend, tstart, tdur respectively when the Boolean variable is 1. That means if the Boolean variable is 0, the new variables can have whatever value. Hope that helps Christian -- Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/ From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Andrea Peano Sent: Tuesday, October 29, 2013 10:21 AM To: users@gecode.org Subject: [gecode-users] Unary: Allow for negative durations when task is not mandatory Hello all, I would modify the unary constraint in order to allow negative durations (tend<tstart) when the boolvar m (mandatory) is 0. Is there an easy way to do this? Thank you, Andrea
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users