I am using JaCoP - a constraint programming solver for Java - to calculate a solution to a complex scheduling problem. Now I am facing the problem that the found solution is not correct.
I am imposing the following constraint:
store.impose(new XplusYeqZ(start, duration, cipStart));
After finishing the search the solver found a solution, but unfortunately the solution is clearly wrong, violating the constraint above.
I am checking the consistency of the store with consistency()
before I start the search and it returns true
, but after the search it returns false
.
I also iterated over all constraints of the store after the search and printed if satisfied using this code:
store.getConstraints().forEach(constraint -> {
System.out.println(constraint.id() + " " + constraint.satisfied());
});
The the method returned false
on the constraint above.
My question is: Is there a logical explanation why not every constraint has to be satisfied for a correct solution? Am I overlooking something?
Addendum: I am using JaCoP 4.4.0