[gecode-users] Reification

Mikael Zayenz Lagerkvist zayenz at gmail.com
Mon Apr 27 17:59:09 CEST 2009

2009/4/27 Joe Porter <joe.porter at gmail.com>:
> I have a few questions about reification (I'm still using Gecode 2.2.0, but
> 1. Can I do open-ended reification?
> For example, if I post a linear constraint ((x=y+c) <=> ~b) and no alternate
> (for b true) will this either assert the linear constraint or assert b, or
> do I have to have another clause for the b case?

I'm not sure what you mean, but I'll try. If you post a reified
constraint c with a control-variable b, but otherwise no constraints
on b, then the constraint won't really "mean" anything. The only point
at which the constraint will do something is to set b to one or zero
if the constraint is found to hold or not hold.

> 2. Can I use the same BoolVar to reify groups of contraints?
> For example, if I have (xi=yi+c) for i=1..n, can I post them all with the
> same b?

Sure, there is nothing special about the control variable, it is just
like any other BoolVar.


Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/

More information about the gecode-users mailing list