Nested event masks in Choco3

  • sophie demassey

    sophie demassey - 2014-05-27

    hi buddies and congrats doc,
    The DIYPropagator-3.1.0 document says that no event masks are nested, but just to be sure:
    Consider a constraint (e.g. the current implem of PropCostRegular) which reacts only to
    EventType.BOUND.mask + EventType.INSTANTIATE.mask for one of its variable.
    Will the constraint be informed if a value, that is coincidely also a bound, of the variable domain is removed ?
    Thank you !

  • Charles Prud'homme

    Hi Sofdem,

    What's up?

    To be clear, here are the rules.

    An event can be promoted like this:

    REM -> {LB, UB, INS}
    LB -> {INS}
    UB -> {INS}

    That is, the following event x={2,4} \ 4 is promoted from removal to instantiation.
    Only the promoted event is stored (INS), there is no trace of the original event (REM).

    A constraint declares the types of event it can react on (defined by getPropagationConditions(int vIdx)). There is no inheritance between events.
    That is, if a constraint C declares the conditions to be REM + INST on a variable x, and if the lower bound of x is modified, the constraint will not be informed, even if a LB is a specific REM.

    A constraint reacts on event through the propagate(int varIdx, int mask) method. At this point, the events are aggregated into a single one, thanks to the mask. If a variable x has been modified like this: REM + LB + UB, then the mask will express those events, and the propagate method can then adapt the treatment wrt the events received.
    That is, updating a data structure because a value has been removed, then propagating the bound events.

    Is that more clear now?


    Btw, you should use github for questions relative to Choco3.

  • sophie demassey

    sophie demassey - 2014-06-20

    Thanks CP,
    It is crystal clear.
    I note to post my future questions on github but I do not see where exactly, as it is not an issue ?


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks