[gecode-users] Why are my variables not constrained
Guido Tack
tack at ps.uni-sb.de
Sun Oct 5 13:01:35 CEST 2008
Max wrote:
> Furthermore the constraint is never applied.
>
> x(this,3,0,1500)
>
>
> post(this, eqv((x[0] > x[1] + 30), y));
Sorry, I just realized a problem with this statement... It should
rather read
post(this, tt( eqv((x[0] > x[1] + 30), y)) );
Otherwise, the post statement returns a BoolVar that is constrained to
the truth value of the equivalence. Unfortunately, gcc doesn't warn
about the ignored return value (I don't know about Microsoft cl)!
Please try again. Btw, you don't have to use status() if you already
use a search engine. Only when you want to trigger propagation
yourself, e.g. to inspect the variable domains after posting all the
constraints.
Cheers,
Guido
More information about the gecode-users
mailing list