Tip added (available with next release of Gecode).
Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ From: [email protected] [mailto:[email protected]] On Behalf Of Christian Schulte Sent: Wednesday, October 06, 2010 8:53 AM To: 'Mikael Zayenz Lagerkvist'; 'Chris Mears' Cc: [email protected] Subject: Re: [gecode-users] Advisors versus propagation conditions Hi Chris, Should I add a tip with this info to MPG? Christian -- Christian Schulte, web.ict.kth.se/~cschulte/ From: [email protected] [mailto:[email protected]] On Behalf Of Mikael Zayenz Lagerkvist Sent: Wednesday, October 06, 2010 8:27 AM To: Chris Mears Cc: [email protected] Subject: Re: [gecode-users] Advisors versus propagation conditions Hi, 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. Cheers, Mikael On Wed, Oct 6, 2010 at 6:52 AM, Chris Mears <[email protected]> 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? Cheers, Chris _______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users -- Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
_______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
