[gecode-users] Remapping of BoolVar propagation conditions

Christian Schulte cschulte at kth.se
Mon Nov 30 16:35:14 CET 2009


Actually what you have to do is the following: you define two classes for
Boolean views, one that rewrites its propagation conditions and the other
one that does not. Then your propagators can use the views without rewriting
while the other propagators can use the variables with rewriting.

Christian

--
Christian Schulte, www.ict.kth.se/~cschulte/


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Vincent Barichard
Sent: Monday, November 30, 2009 9:33 AM
To: Christian Schulte
Cc: 'Guido Tack'; 'gecode list'
Subject: Re: [gecode-users] Remapping of BoolVar propagation conditions

Hi,

Thank you both for your answers. As I don't want to break all propagators
that are used for integer as well as boolean variables, I see no choice but
to use PC_BOOL_VAL.

Maybe one of you may see another way ? I make new functions on Boolean
variables (and associated views) which don't set domain to 1 or 0 (I copied
"ModEvent  BoolVarImp::one_none(Space& home)" and removed the unwanted
instructions). These functions notify new events (called ME_BOOL_SAME in
bool.vis file (see attached file)). I mapped this new event to the
PC_BOOL_SAME propagation condition.

Now I change an existing propagator (like the "Or" propagator), and I want
it to be awaken when ME_BOOL_SAME is emitted. As the variable is not yet
assigned, I didn't want to emit the ME_BOOL_VAL event because I didn't want
to wake up propagators which only subscribed to the PC_BOOL_VAL condition.

So during propagation, I call my new functions on Boolean variables, the
ME_BOOL_SAME event is sent and propagators which subscribe to the
PC_BOOL_SAME condition are wake up. Other propagators are not awaken (except
if a ME_BOOL_VAL event has also been sent). Is it possible ?  
Should I use ME_BOOL_VAL ? If I use ME_BOOL_VAL other propagators will be
awaken for nothing.

Thanks for your help.

Cheers,
Vincent




More information about the users mailing list