[gecode-users] Clockwise constraint
Guido Tack
tack at ps.uni-sb.de
Tue Jun 3 10:40:02 CEST 2008
Malcolm Ryan wrote:
> Hrm, it seems that the extensional version is going to be inordinately
> large. How hard would it be to write a propagator for this specific
> constraint X = (A < B < C)?
>
> If X is known, it can simply devolve into atomic constraints.
> If X is unknown, it would just need to check that there exists b in
> dom(B) such that min(A) < b < max(C), to be re-computed whenever
> min(A), dom(B) or max(C) changed.
Yes, that would be the reasoning that's needed.
> If we kept the smallest value of b
> between propagations the amortised cost of the computation could be
> small.
That wouldn't help, because you cannot start checking for values
starting from that previous smallest value.
> How would I go about adding this to Gecode/J?
Unfortunately, we just found out that one important ingredient for
reified propagators currently does not work in Gecode/J: you cannot
return ES_SUBSUMED from a propagator (which you need in order to
rewrite into other propagators). So I'm afraid currently the only
option is to add the propagator in C++ and then interface it to Java.
Cheers,
Guido
More information about the gecode-users
mailing list