Rotating Workforce Scheduling in MiniZinc
6 months ago
- #MiniZinc
- #workforce-scheduling
- #optimization
- Rotating Workforce Scheduling (RWS) is a variant of workforce scheduling where a weekly schedule is created for a group of workers, and each worker rotates through all different weekly schedules to ensure fairness.
- The post describes developing a realistic RWS model using MiniZinc, starting with basic constraints and gradually adding more complex rules like consecutive days off, maximum workdays without rest, weekend rest requirements, and night shift limits.
- A basic MiniZinc model is introduced with data definitions for days, employees, and shifts, and a core constraint ensuring the right number of people work each shift each day.
- Additional constraints are added to make the schedule realistic: consecutive days off each week, maximum days without rest (limited to 5), at least one out of every three weekends off, and specific rules for night shifts requiring rest before and after.
- The model is benchmarked using various solvers (Gecode, OR-Tools, Chuffed, COIN CBC, HiGHS, Huub, Pumpkin) with Gecode performing well for simpler problems and OR-Tools CP-SAT excelling for larger instances.
- Custom search strategies are explored but found to be less effective than the solver's default heuristics.
- The post concludes by highlighting the importance of iterative model development, solver benchmarking, and considering real-world complexities like varied shifts and employee preferences.