XneqY should not be consistent if X==Y
Closed this issue · 1 comments
Dagefoerde commented
Consider the following minimal example:
x = new IntVar(store, 1, 100);
store.impose(new XneqY(x, x));
To the human reader, it is obvious that such a constraint cannot be satisfied. However, store.consistency()
happily returns true, leaving x
's domain intact. It might be sufficient to add a check for x != y
to the consistency
method in XneqY
.
radsz commented
After some discussion we decided to throw a different type of the exception to let the user know that it is likely that the model is incorrectly constructed.