Part 1: Overview of CP, Filtering, Search, Consistency, Fix-point¶
We propose a set of exercises to extend MiniCP with useful features. By doing these exercises you will gradually progress in your understanding of CP. For each exercise, we ask you to implement JUnit tests to make sure that your implementation works as expected. If you don’t test each feature independently you take the risk to lose a lot of time finding very difficult bugs.
We ask you not to publish your solutions on a public repository. The instructors interested to get the source code of our solutions can contact us.
Forking MiniCP to do the programming exercices¶
Follow this tutorial then clone your repository.
Less or equal reified constraint¶
This is a reified constraint for b iff x <= c that is boolean variable b is set true if and only if x variable is less than or equal to value c.
For example, the constraint holds for
b = true , x = 4, c = 5 b = false, x = 4, c = 2
but is violated for
b = true , x = 5, c = 4 b = false, x = 2, c = 4
Check that your implementation passes the tests IsLessOrEqualTest.java