[gecode-users] Generating constraints

Guido Tack tack at ps.uni-sb.de
Tue Oct 28 15:01:49 CET 2008


Max wrote:
> But, with this code written i do get some errors, because the rel  
> method
> is not defined for constants
> as:
> - both arguments
> - first argument
>
> so i can not write
>
> rel(this, 5, IRT_GR, x, b);
>
> Why?
> Do i have manually to flip the operands ?

You could also use the post functions from minimodel here:
post(this, tt(eqv(~(5 > x), b)));

They should accept constants in all positions (and if not, we'll have  
to fix it).

Cheers,
	Guido





More information about the gecode-users mailing list