[gecode-users] Unary: Allow for negative durations when task is not mandatory

Andrea Peano andrea.peano at unife.it
Thu Oct 31 12:50:29 CET 2013


Yes, sure it's useful, thank you.
I'm just wondering whether a modification of the unary might be more
efficient or not.
In such a case, I could modify the source files of Gecode, by adding
another (modified) unary constraint, otherwise... should I write an
user-defined propagator?

I've the same doubt regarding the nooverlap, I'd like to achieve a
generalization of it.
In this generalization rectangles of the same "group" can overlap
eachother, but they cannot overlap other rectangles of other groups.
So the new nooverlap will take in input an IntArgs array which contains the
group IDs.

In your guide I read:
"The constraints [nooverlap] are implemented by a naive propagator
(considering pairwise no-
overlap between rectangles including constructive disjunction, see also
GCCAT: diffn),
this will change in the future. "

I could add a condition within the implementation of the nooverlap, that
checks if the two rectangles belong to two different groups. Is it right?

Do you have any suggestion?

Thank you,
Andrea


On Wed, Oct 30, 2013 at 1:05 PM, Christian Schulte <cschulte at kth.se> wrote:

> 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****
>



-- 

Andrea Peano - PhD student
Department of Engineering - University of Ferrara
Tel: +39 0532 97 4827
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20131031/c5ca509b/attachment.html>


More information about the users mailing list