We have measured the impact for integer variables even with different
modification events. You can check it here:
<http://www.gecode.org/~schulte/paper.html?id=SchulteStuckey:TOPLAS:2008>
http://www.gecode.org/~schulte/paper.html?id=SchulteStuckey:TOPLAS:2008
There might be more to gain for set variables, but I am only guessing here.
Cheers
Christian
--
Christian Schulte, KTH, web.it.kth.se/~cschulte/
From: [email protected] [mailto:[email protected]] On Behalf Of
Gustavo Gutierrez
Sent: Wednesday, August 20, 2014 07:26 PM
To: Guido Tack
Cc: gecode list
Subject: Re: [gecode-users] Set propagators and modification event delta
Hi Guido,
Thanks for the answer. Did you measured the impact of using modification events
in the propagate method versus normal implementations of the propagators?
What I mean by normal implementations is suppose you implement the pruning
rules without taking into account what have changed since the last time. That
will of course maintain the correctness but you will end up applying
unnecessary operations. Are the two variants significantly different in the
case of set variables?
I'm asking this because using modifications events lead to more involved code
and is very easy to get it wrong. But on the other hand, is something I will
keep doing for performance reasons.
Regards,
Gustavo
—
Gustavo
On Wed, Aug 20, 2014 at 3:27 AM, Guido Tack <[email protected]
<mailto:[email protected]> > wrote:
Hi Gustavo,
modification events are really sets of modifications, e.g. if you have only a
lower bound modification the event is ME_SET_GLB, for only upper bound it's
ME_SET_LUB, but if both have been modified you get ME_SET_BB.
You guessed correctly: The testSetEventLB function returns true if the argument
event contains a lower bound modification (so it could be ME_SET_GLB,
ME_SET_BB, ME_SET_CGLB or ME_SET_CBB). The versions with multiple arguments
test whether any of them contains a lower bound modification (the
implementation computes the union of the events and then does the check).
Cheers,
Guido
On 20 Aug 2014, at 12:33 am, Gustavo Gutierrez <[email protected]
<mailto:[email protected]> > wrote:
> Dear all,
>
> I am trying to write a propagator and I really would like to take advantage
> of the modification event information offered by the geocode kernel in the
> respective argument to the propagate method. To that end, I am looking at set
> propagators as an example. In concrete I am looking at the code of the
> intersection propagator in inter.hpp.
>
> That implementation calls testSetEventLB defined in common.hpp. My question
> is concrete: does this function returns true when the modification event
> passed as parameter signals a modification of the lower bound?. My intuition
> from its definition and the internal functions it uses tell me so but I would
> like to corroborate it with you.
>
> There are other testSetEvent* that take a different number of arguments (all
> of them being modification events). For example, testSetEventLB with two
> arguments. Does this one returns true if any of the two events imply
> modification to the lower bounds?
>
> Best regards,
> --
> Gustavo Gutierrez
> _______________________________________________
> Gecode users mailing list
> [email protected] <mailto:[email protected]>
> https://www.gecode.org/mailman/listinfo/gecode-users
_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users