v2.2.0
New features
BooleanDomain— singleton domain containing{true, false}, suitable for binary assignment problemsAtMostOneConstraint— n-ary constraint ensuring at most one boolean variable in a set istrue; decomposes into pairwise binary constraints viagetAsBinaryConstraints()for arc consistency and min-conflictsatMostOneConstraint(Set<Variable>)— newCSP.Builderhelper, consistent withallDiffConstraint
New example: timetabling as a binary assignment problem
TimetableSchedulingBinaryAssignmentTest demonstrates modelling timetabling as a multi-dimensional 0-1 assignment problem. Each variable z[lesson][teacherSlot] is a boolean that is true when a lesson is assigned to a specific teacher and room-slot combination. Constraints are expressed as atMostOneConstraint sets — one per room-slot (room conflict), one per teacher-timeslot (teacher conflict), and one per group-timeslot (student conflict). The problem is solved using MinConflictsSolver with random restarts.
This complements the graph-colouring formulation in TimetableSchedulingViaColouringTest, which models the same problem using slot-valued variables.