TP2 constraint programming: parts 2 and 3 written, few corrections in part 1.