[gecode-users] count/atleast: partial propagation towards y ?

Didier Loiseau didier.loiseau at student.uclouvain.be
Mon Feb 4 18:40:17 CET 2008


Hi,

I figured out I only answered to Mikael so I forward my response below.

Thank you Mikael for your implementation.

Mikael Zayenz Lagerkvist wrote :
> You can model this using set-constraints.  Given are variables x',
x,  
> and epsilon. Using a temporary set-variable S, add the following  
> constraints
> 
>       rel(this, SOT_DUNION, [x,epsilon], S)
>       
>       rel(this, S, SRT_SUP, x')
> 
> The first will make S be the union of the (disjoint) domains of x
and  
> epsilon. The second makes sure that x' is a member of that set.

Ok I just tried this on my little example, and it solves the problem
I have with count, but it is not enough alone: if epsilon is removed
from dom(x') it will not propagate x = x' until x' is assigned
(which adds its value to the glb of S, if I'm not wrong)

I suppose it will work if I combine it with count/exactly.

Thank you very much for your help.

I would appreciate to understand why it does not work with count alone,
if anybody knows…

Didier





More information about the gecode-users mailing list