[gecode-users] Advisors versus propagation conditions

Christian Schulte cschulte at kth.se
Wed Oct 6 08:53:15 CEST 2010

Hi Chris,


Should I add a tip with this info to MPG?





Christian Schulte, web.ict.kth.se/~cschulte/



From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Mikael Zayenz Lagerkvist
Sent: Wednesday, October 06, 2010 8:27 AM
To: Chris Mears
Cc: users at gecode.org
Subject: Re: [gecode-users] Advisors versus propagation conditions




When designing propagators that use advisors, one will always need to handle
the case where a newly constructed propagator is not at fix-point. This
might be when all variables are assigned (for a simple checking propagator),
or it might be always. What needs to be done differs for each propagator.


For a typical case some data-structure that the advisors will maintain is
set up to a valid initial state, and then the propagator needs to be run
once to propagate this information. Sometimes, the set-up can be used to
determine of the propagator actually needs to be run, or if it already is at
a fix-point. To schedule the propagator for execution you need a view-type
and some relevant modification event. Say that you use the view-type IntView
and want to schedule with the information that the bounds have changed:

    IntView::schedule(home, *this, ME_INT_BND);

where "this" is the current propagator.





On Wed, Oct 6, 2010 at 6:52 AM, Chris Mears <chris.mears at monash.edu> wrote:

Hello all,

I am trying to use advisors to implement a propagator using advisors.
I have an array of views, with one advisor per view.  MPG says that
advisors are never executed when they are first subscribed, but only
when the view changes.

My problem is what happens if all of the variables are already
assigned at the time of posting the propagator.  Will the advisors
ever be executed?  It seems like they would not be, so
subsumption/failure never occurs.  Am I obliged to check for this
condition (everything being already assigned) and subscribe to the
views without advisors so that unadvised propagation occurs?


Gecode users mailing list
users at gecode.org

Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20101006/5decfa3a/attachment.htm>

More information about the users mailing list