Thank you very much!, I didn't know about the reified feature.

On Jan 10, 2008 3:22 AM, Guido Tack <[EMAIL PROTECTED]> wrote:


> It depends on the constraint that you want to post.  If it can be
> reified, you can write
>
> BoolVar bb(this,0,1);
> post(this, eqv(~(a[i] < 4), bb));
> BoolVar notBb(this,0,1);
> rel(this, bb, IRT_NQ, notBb);
> constraint1(this, b[a[i]], bb);
> constraint2(this, b[a[i]], notBb);
>
> (Where you'd have to replace b[a[i]] by the proper call to element etc.)
>
> If there is no reified version for the constraint, I don't know any
> straight-forward solution except decomposing the constraint into
> smaller constraints that can be reified (not the best solution,
> certainly).
>
> Cheers,
>        Guido
>
>
_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to