[gecode-users] posting a reified equality constraint
Christian Schulte
cschulte at kth.se
Mon Oct 6 10:14:45 CEST 2008
And the most straightforward one, would be:
rel(this, X, IRT_EQ, k, b)
Cheers
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 Guido Tack
Sent: Friday, October 03, 2008 11:27 PM
To: Denys Duchier
Cc: users at gecode.org
Subject: Re: [gecode-users] posting a reified equality constraint
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
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
More information about the gecode-users
mailing list