[gecode-users] Unary: Allow for negative durations when task is not mandatory
Christian Schulte
cschulte at kth.se
Wed Oct 30 13:05:06 CET 2013
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-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Andrea Peano
Sent: Tuesday, October 29, 2013 10:21 AM
To: users at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20131030/f44a0f05/attachment.html>
More information about the users
mailing list