[gecode-users] Variable base implementation question

Mikael Zayenz Lagerkvist zayenz at kth.se
Wed Jan 7 08:13:53 CET 2009


Hi,

When a propagator subscribes to some variables, it will be scheduled
for propagation. When a propagator runs it gets a ModEventDelta that
has the strongest modification event describing the changes since the
last run of the propagator. For newly created propagators that just
subscribed to some variables there is no previous run of the
propagator, so there is no delta to supply. The SUBSCRIBE modification
event is the modification event used as the delta when scheduling the
propagator. For integer variables it is ME_INT_BND (passing ME_INT_DOM
would imply that no bounds reasoning was needed), and for set
variables it is CBB (both bounds and the cardinality has changed).

Hope this helps,
Mikael

On Tue, Jan 6, 2009 at 5:01 PM, Gustavo Gutierrez
<gutierrez.gustavo at uclouvain.be> wrote:
> Hello all,
>
> I have a question regarding the specification for variable base
> implementation in gecode. As far as i can see, there is some code in the
> gecode kernel which  is automatically generated from *.vis files.
> Modification events and propagation conditions are defined in this kind of
> files. I am implementing a new variable type and i want to be sure i am
> doing it in the right way, so here is my question:
>
> - There are some special words to define modification events: FAILED, NONE,
> ASSIGNED and SUBSCRIBE. I am fine with the first three of them because it is
> straight forward what they mean. However the fourth one is not clear to me.
> According with the documentation (int.vis) SUBSCRIBE is used the first time
> a propagator subscription is processed. Does it means that after the first
> execution of the propagator, it will subscribe using the propagation
> conditions specified in its class definition?.  In my particular case, i
> have only 3 modification events apart from the generic ones: lower bound
> modification, upper bound modification and both bounds modification events.
> I defined the last one (called ME_GRAPH_BB in my implementation) to be the
> one equal to the word SUBSCRIBE.
>
> For this case, if a propagator P subscribes to the propagation condition
> PC_GRAPH_GLB (i.e. class SomeProp : public UnaryProp<View,PC_GRAPH_GLB>
> ...), what is the effect of ME_GRAPH_BB=SUBSCRIBE with respect to other
> possible definition such as ME_GRAPH_GLB=SUBSCRIBE?
>
> thanks in advance,
>
> Gustavo.
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
>



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




More information about the gecode-users mailing list