Hi Andrea, you are right, the check is there because I wrote the code some time ago and it was required then. You can remove it and everything should work just fine.

Best regards,

Roberto

On 11/20/2013 07:51 PM, Andrea Peano wrote:
Hello,
your code was very useful.

I've just seen that new implementations of standard nooverlap don't check anymore for multiple occurrences of the same variable within the same array (e.g., x0.same(home)). Am I right? Instead, your propagator still checks it. I think this limitation might be too restrictive... But I cannot say whether it is actually required or not.
What do you think about that?

Thank you,
Andrea





On Fri, Nov 1, 2013 at 3:14 PM, Andrea Peano <andrea.pe...@unife.it <mailto:andrea.pe...@unife.it>> wrote:

    Hi Roberto,
    thank you very much. I'm pretty sure that it's close enough to my
    needs!

    I'll try it asap :)

    Thanks,
    Andrea


    On Fri, Nov 1, 2013 at 9:45 AM, Roberto Castaneda Lozano
    <r...@kth.se <mailto:r...@kth.se>> wrote:

        Hi Andrea,

        Interestingly enough I implemented for my own purposes a
        similar generalization to nooverlap a year ago, see the
        attachment.

        Best regards,

        Roberto

        From: users-boun...@gecode.org
        <mailto:users-boun...@gecode.org> [users-boun...@gecode.org
        <mailto:users-boun...@gecode.org>] on behalf of Andrea Peano
        [andrea.pe...@unife.it <mailto:andrea.pe...@unife.it>]
        Sent: Thursday, October 31, 2013 12:50
        To: Christian Schulte
        Cc: users@gecode.org <mailto:users@gecode.org>
        Subject: Re: [gecode-users] Unary: Allow for negative
        durations when task is not mandatory

        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
        <cschu...@kth.se <mailto:cschu...@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/ <http://www.ict.kth.se/%7Ecschulte/>


        From:

        users-boun...@gecode.org <mailto:users-boun...@gecode.org>
        [mailto: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 <mailto: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

        --




        Andrea Peano - PhD student


        Department of Engineering - University of Ferrara
        Tel: +39 0532 97 4827 <tel:%2B39%200532%2097%204827>







--
    Andrea Peano - PhD student
    Department of Engineering - University of Ferrara
    Tel: +39 0532 97 4827




--

Andrea Peano - PhD student
Department of Engineering - University of Ferrara
Tel: +39 0532 97 4827

_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to