Hi,

Another way to do it is to use a global cardinality constraint (called "count" in Gecode) with an upper bound of 1 for all values, except 0 for which you put any suitable large value. This requires to know the list of possible values in advance.

Cheers,

JN

On 2015-10-27 09:38, Christian Schulte wrote:

Hi,

No, unfortunately not. If you need it really badly, I could put it on Gecode’s wishlist.

For the time being, you would have to resort to using reification.

Cheers

Christian

--

Christian Schulte, www.gecode.org/~schulte

Professor of Computer Science, KTH, [email protected] <mailto:[email protected]>

Expert Researcher, SICS, [email protected] <mailto:[email protected]>

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *mehdi m
*Sent:* Monday, October 26, 2015 08:26 PM
*To:* [email protected]
*Subject:* [gecode-users] AllDiff_except_0

Hi everyone,

Is there the constraint (AllDiff_except_0) in gecode ?

Thanks.



_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to