[gecode-users] posting a reified equality constraint

Guido Tack tack at ps.uni-sb.de
Fri Oct 3 23:27:18 CEST 2008


Denys Duchier wrote:

> I am stumped on something that is completely trivial.  How do I "post"
> the reified constraint (X=k)=B where X is an IntVar, k is an int and B
> is a BoolVar?

Reified constraints seem to be en vogue these days ;-)

post(this, eqv(~(X == k), B));

would be one solution,

dom(this, X, k, k, B);

another.

Cheers,
	Guido





More information about the gecode-users mailing list