Lecture 24: Workforce Scheduling © J. Christopher Beck 2008 1 Outline Bank Personnel Scheduling Demo Shift Scheduling Cyclic Staffing Example 12.3.1 Algorithm 12.4.1 Example 12.4.2 Call Centre Scheduling © J. Christopher Beck 2008 2 Readings P Ch 12.1, 12.3, 12.4, 12.5, 12.7 Questions I Like 12.5a © J. Christopher Beck 2008 3 Workforce Timetabling Arrange shifts and assign people to them Bank Demo Constraints: Number of people per shift Minimum Days off (x/k days must be off) Weekends Nurses, call centres, hotels, restaurants, plane crew, … © J. Christopher Beck 2008 4 Shift Scheduling Fixed cycle Predefined set of shift patterns Month, week, day Each worker is assigned to exactly one pattern Each pattern has its own cost Assign workers to patterns such that Staffing requirements are met and cost is minimized © J. Christopher Beck 2008 5 Example 12.3.1 Pattern Hours Total Cost Hours 1 10AM – 6PM 8 50 2 1PM – 9PM 8 60 3 12PM – 6PM 6 30 4 10AM – 1PM 3 15 5 6PM – 9PM 3 16 © J. Christopher Beck 2008 Hour Staff 10AM – 11AM 3 11AM – 12PM 4 12PM – 1PM 6 1PM – 2PM 4 2PM – 3PM 7 3PM – 4PM 8 4PM – 5PM 7 5PM – 6PM 6 6PM – 7PM 4 7PM – 8PM 7 8PM – 9PM 8 6 Shift Scheduling Definition Length of each period may be different m periods bi: # people required in period i n shift patterns nj = (a1j, a2j, …, amj) = (1, 0, 0, …, 0) aij = 1: workers on pattern j work period i aij = 0: workers on pattern j don’t work period i cj: cost of assigning a worker to pattern j xj: # of people assigned to pattern j © J. Christopher Beck 2008 7 IP Formulation (see Example 12.3.1) Such an IP is hard unless there is special structure such as having no split shifts n minimize c x j a x j j 1 n subject to j 1 j ij bi i 1,..., m Each period has enough workers xj 0 © J. Christopher Beck 2008 j 1,..., n ; x j int Number workers assigned to a pattern is an positive integer or 0 8 LS Formulation Develop a local search formulation that doesn’t depend on having no split shifts © J. Christopher Beck 2008 9 Apply Your LS to Example 12.3.1 Pattern Hours Total Cost Hours 1 10AM – 6PM 8 50 2 1PM – 9PM 8 60 3 12PM – 6PM 6 30 4 10AM – 1PM 3 15 5 6PM – 9PM 3 16 © J. Christopher Beck 2008 Hour Staff 10AM – 11AM 3 11AM – 12PM 4 12PM – 1PM 6 1PM – 2PM 4 2PM – 3PM 7 3PM – 4PM 8 4PM – 5PM 7 5PM – 6PM 6 6PM – 7PM 4 7PM – 8PM 7 8PM – 9PM 8 10 A Variation of Example 12.3.1 Pattern Hours Total Hours Cost 1 10AM – 6PM 8 50 2 1PM – 9PM 8 60 3 12PM – 6PM 6 30 4 10AM – 1PM 3 15 5 6PM – 9PM 3 16 6 2PM – 5PM, 7PM – 9PM 5 35 Would you solve this problem with IP or LS? © J. Christopher Beck 2008 Hour Staff 10AM – 11AM 3 11AM – 12PM 4 12PM – 1PM 6 1PM – 2PM 4 2PM – 3PM 7 3PM – 4PM 8 4PM – 5PM 7 5PM – 6PM 6 6PM – 7PM 4 7PM – 8PM 7 8PM – 9PM 8 11 Cyclic Staffing m period cycle Each period i has requirement bi Each person works k consecutive periods and has the other m – k off cj is the cost of putting a worker on pattern j Find minimum cost schedule © J. Christopher Beck 2008 12 (5,7)-Cyclic Staffing Problem Requirements Patterns Periods Cost 1 0 0 1 1 1 1 3 1 1 0 0 1 1 1 8 1 1 1 0 0 1 1 9 1 1 1 1 0 0 1 11 1 1 1 1 1 0 0 11 0 1 1 1 1 1 0 11 0 0 1 1 1 1 1 4 80 70 75 90 100 © J. Christopher Beck 2008 100 105 There are split shifts! 13 (Different) Special Structure Makes The Problem Easy Solve LP1 (x’1,x’2, …, x’n) If integral, you have optimal Otherwise LP2: LP1 + x1 x2 xn x1 x2 xn If integral, you have optimal Otherwise LP3: LP1 + x1 x2 xn x1 x2 xn Always integral, so you have optimal © J. Christopher Beck 2008 14 Call Centre Scheduling: Demand demand 6AM © J. Christopher Beck 2008 12 time 6PM 15 Call Centre Scheduling: Shift Patterns Breaks (moveable) 6AM © J. Christopher Beck 2008 12 time 6PM 16 Solution Framework (Fig 12.4) demand Select solid tours Place breaks Modify target demand Compare fits N Close enough? Y DONE © J. Christopher Beck 2008 17 Call Centre Scheduling Assign people to shifts to meet the demand and minimize costs It gets worse: workers with different skills! {English}, {English, French}, {French} © J. Christopher Beck 2008 18 Call Centre Scheduling: Demand What do you do with bilingual people? demand English French 6AM © J. Christopher Beck 2008 12 time 6PM 19