On Fri, 21 Sep 2007 10:43:15 +0200, Guido Tack wrote:
> Do you mean a constraint like (x = y) or (x = z)? That's not what
> gcc is used for, but you can use reified constraints to achieve this:
yes. I thought I could express this via a cardinality constraint on the
triple [x,y,z] imposing that there are exactly two different values, and
that I could do this via gcc.
Actually I also gave some thought to the idea of using FD.count, but it
seems that there is a mismatch between the signatures:
countII : space * intvar vector * int * relation * int -> unit
countVI : space * intvar vector * intvar * relation * int -> unit
countIV : space * intvar vector * int * relation * intvar -> unit
countVV : space * intvar vector * intvar * relation * intvar -> unit
and the documentation
countII (s, v, rel1, n, rel2, m level)
countVI (s, v, rel1, x, rel2, m level)
countIV (s, v, rel1, n, rel2, y level)
countVV (s, v, rel1, x, rel2, y level)
(the rel1 in the latters doesn't seem to be there in the formers)
so I gave up on it.
<snip code>
I see this makes sense. And I didn't know I could express a domain
directly through its representation :)
>> 2) about gcc*: what is the meaning of all the paramaters in the various
>> FD.gcc ?
>> [s,x,min,max,level] are clear from the description, but
>> [v,c,m,ulow,uup,all] are not so obvious, in my humble opinion.
>
> You're right, they are not obvious at all, and the documentation for gcc
> practically doesn't exist. In fact, we realized that this interface
> doesn't work as expected for some cases, and - unfortunately - it's
> currently not a good idea to try to use it... I hope it's not vital for
> the problem you're trying to model.
I believe not, thank you once more.
_______________________________________________
alice-users mailing list
[email protected]
http://www.ps.uni-sb.de/mailman/listinfo/alice-users