This was a project in constraint programming that aimed to solve the “Rotating Workforce Scheduling Problem”, as defined in Exact Methods for Extended Rotating Workforce Scheduling Problems.
The overall modelling strategy for the model consisted of a viewpoint of assigning an integer shift type to an employee at some day. This can be represented as a 2D array with different employees being indexed through the first dimension and the weekdays being indexed in the second dimension. This implicitly forces each employee to only work one shift per day. Integers were used to identify shifts, days, and employees. In order to formulate the constraints, modulo indexing was used to make the representation cyclic.
Redundant Decision Variables and Channelling Constraints
Redundant decision variables were used in the form of a 1D cyclic flattening of the 2D tabular set of variables. A channelling constraint was used that asserts that each variable $v_{i,j}$ in the tabular model corresponds to $f_{j+w(i−1)}$ in the flattened model.
Implied Constraints
For this model, we did not implement any implied constraints.
Symmetry-Breaking Constraints
Symmetries are broken by enforcing the first shift to be a work shift and the last shift to be a free shift. This removes many equivalent rotations of the schedule.
Inference Annotations
Several variable and value selection annotations were tried out for this model across different instances. This includes first-fail for variable selection and min/median/max for value selection. Although for certain instances performance seemed to increase, we could not conclusively determine that they improved the overall performance, so we excluded them from the final model.