[gecode-users] Simple Reified relation

Guido Tack tack at ps.uni-sb.de
Wed Jul 26 21:11:30 CEST 2006


Hi.

> Hi,
> I am trying to do something very simple in Gecode with reified  
> constraints.
> I would like to do the follwoing:
> - x ranges from 4 to 6
> - b is a boolean variable
> - (x=:4) reified in  b
> - When I assign x to 5, I expect b to be equal to 0, but b still  
> ranges from 0..1 !!

What you experience here is one of the major differences between  
Mozart and Gecode: Gecode does not compute a fixpoint unless you ask  
for the status of a space, whereas Mozart will compute with the given  
domains as early as possible. In the concrete example, this means  
that b will only be constrained to 0 when you e.g. apply a search  
engine to the space, or manually call its status member function.

>  I also believe there is a small typo in the documentation on  
> relations
> void  Gecode::rel (Space *home, IntVar x, IntRelType r, int c,  
> BoolVar b, IntConLevel icl=ICL_DEF)
>     Post propagator for .x  ~_r  c
> I think it was meant to be
>     Post propagator for .(x  ~_r  c)  <=> b
> Or there is something I am really not getting in reifying relations!!

No, you're of course right. Thank you for the bug report, I've  
changed the documentation accordingly.

Cheers,
	Guido


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20060726/24b18135/attachment.htm>


More information about the gecode-users mailing list