[gecode-users] BExprs and IntConLevel
Guido Tack
tack at ps.uni-sb.de
Wed Apr 23 08:44:37 CEST 2008
Malcolm Ryan wrote:
> That's odd then. The following code would seem to contradict that:
>
> a = new IntVar(this, "a", 1, 4);
> b = new IntVar(this, "b", 1, 4);
>
> Gecode.post(this, new BExpr(a, IntRelType.IRT_EQ, b));
> Gecode.rel(this, a, IntRelType.IRT_NQ, 2);
> Gecode.rel(this, a, IntRelType.IRT_NQ, 4);
>
> status();
> System.out.println("a: " + a.toString());
> System.out.println("b: " + b.toString());
>
> On my machine this prints:
>
> a: {1,3}
> b: [1..3]
Ah, that's a difference between Gecode and Gecode/J again. The BExpr
gets posted as a linear equation with ICL_DEF, and that produces only
bounds consistency.
Cheers,
Guido
More information about the gecode-users
mailing list