[Gecode] IntVarProcessor question.
Guido Tack
tack at ps.uni-sb.de
Sun Jan 23 15:40:00 CET 2005
Hi.
The VarProcessors are responsible for translating from Modification
Events (MEs) to Propagation Conditions (PCs) and putting all
propagators registered for certain PCs into the propagation queue.
The Processor iterates over all variables of its VarTypeID and,
depending on a variable's ME, all propagators that are registered for
the corresponding PC are "processed". The propagators are organized in
an array that is sorted by the PCs they respond to. So for example, if
you have ME_INT_MAX, all propagators registered for PC_INT_BND,
PC_INT_MAX, and PC_INT_DOM have to be processed. The order of PCs for
Int is VAL, BND, MIN, MAX, DOM. process_modified takes two PCs as its
arguments. These are used as pointers into the propagator array:
process_modified(x,PC_INT_MAX,PC_INT_DOM,ME_INT_MAX) means to process
all propagators "between" DOM and MAX (incl.).
So basically, for implementing process, you just have to know the order
of your PCs and which MEs should trigger which PCs. The rest can be
copied from the IntVarProcessor.
Guido
> Hi all,
>
>
> I am trying to set up a constraint system over real numbers in gecode.
> I need
> to implement a method like IntVarProcessor::process but according with
> the
> events of the new constraint system. Unfortunately i don't understand
> what is
> this method intended for. This method is closely related to
> Space::process_modified which takes the variable, two propagation
> conditions
> and a modification event as arguments, but a relationship between the
> event
> which caused variable modification and the two propagation conditions
> is not
> much clear to me.
>
> Would it be possible for any of you to provide a short description of
> this?.
> In the following i list the propagation events declared for the new
> system:
>
> ME_RI_VAL -> when a variable gets instantiated.
> ME_RI_BND -> both, lower and upper bounds where modified.
> ME_RI_MIN -> the lower bound was modified.
> ME_RI_MAX -> the upper bound was modified.
>
> I have also defined the corresponding PC_RI_* propagation conditions!.
>
> Thanks in advance.
>
> Gustavo Gutierrez
> _______________________________________________
> Gecode mailing list
> Gecode at ps.uni-sb.de
> http://www.ps.uni-sb.de/mailman/listinfo/gecode
More information about the gecode-users
mailing list