[gecode-users] Propagator called too soon...
Guido Tack
tack at ps.uni-sb.de
Thu Mar 16 17:55:54 CET 2006
Hi.
I had an idea this morning how to prevent the propagator from failing right
after posting it: each time it is invoked, simply test whether the domain is
still untouched. Remeber that you don't even have to check whether the domain
is still the same, you could simply check its size!
Of course, your propagator is invoked at most twice. Once right after
creation, where you check the domain, and it is still ok, and you just return
ES_FIX. Then, possibly, if the domain is shrunk, you test again, this time
you detect the change, and you return ES_FAILED.
Testing is cheap, and it is done at most twice, so I think I'd prefer this
simple solution over changing the subscription interface.
Cheers,
Guido
--
Guido Tack
Programming Systems Lab, Saarland University, Germany
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list