-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]Unexpected behavior when using Task with scalar #1114
Comments
It would be interesting to run a benchmark comparing monitors vs classical arithm. I wonder if the monitors are worth it. I am not sure the gain is significant (there are cases of performance loss), and the hack may have side effect on search and learning as well... |
There is (at least) one case where monitors are mandatory, it is when the |
It was the motivation long ago but is it really still necessary? For which algorithm? |
Yes, filtering done by monitors (and thus by TaskMonitor) can lead to very buggy behaviours inside propagators, as not all of them have been designed to adapt to such filtering. In the case of PropScalar, storing lb and ub values for each variable in the prepare() method would lead to correct behaviour (btw, it would be more consistent as the algorithm rely on pre-computed values such as the That said, I think we should not rely on monitor filtering (unless we want to possibly re-do all propagators' code). In the case of TaskMonitor, its main interest is in updating variables' domain wrt the relation Since most (if not all) cumulative's filtering algorithm rely on pre-computed values (such as the profile for instance) and filtering is not helped by previous filtering (unless recomputing the pre-computed values), enforcing relation |
The following test fails:
When the
scalar
constraint filters, it first reducesvars[0]
to8
, thenvars[1]=4
andvars[2]={5,6}
.At this point the task automatically reduces the domain of
vars[3]
to{3,4}
.Then the
scalar
constraint keeps on filtering and fix vars[3]to
4and passivates itself. But, with
vars[3]=4there is no solution anymore to this model and
scalar` is not able to detect it because it does not react on modification during its filtering step.The combination of task filtering and passivate leds to inconsistency.
So IMO, the way tasks (or more generally monitors) reduce domains is buggy, because we cannot consider that constraints should be aware of reductions made by monitors during their filtering step.
I'm afraid other constraints will produce the same bug...
The text was updated successfully, but these errors were encountered: