Tour Scheduling with Skill Based Costs

Size: px
Start display at page:

Download "Tour Scheduling with Skill Based Costs"

Transcription

1 Tour Scheduling with Skill Based Costs Ed Mooney 1 and Tom Davidson 2 1 Montana State University, Bozeman MT 59717, USA 2 Naval Undersea Warfare Center, Keyport WA 98345, USA Abstract. We present a new formulation of the tour scheduling problem with assignment costs that are a function of employee capabilities. The objective also incorporates a quadratic term to encourage compact shifts and equal interday shift lengths for each employee. The problem is solved using a tabu-like probabilistic local search algorithm. The algorithm is applied in two phases with employee conflicts removed in the first and soft constraints and the objective function value improved in the second. Solutions provide minimum cost templates for employee schedules. The efficacy of the algorithm is demonstrated with a computational study and conclusions are presented regarding the approach. 1 Introduction Tour scheduling results in employee schedules that meet staffing requirements over some planning horizon, typically a week. Staffing (demand) requirements are specified as number of employees with certain skills needed in each time period. Demand may vary within and between days during the planning horizon. Employees may be nonhomogeneous, each with unique skills, preferences, constraints and hourly costs. They are assigned to periods (for example one hour) which are grouped into individualized shifts. Ideally, these assignments will reflect tradeoffs between employee costs and preferences. Good schedules can lower costs, increase productivity, and reduce turnover. Tour scheduling is becoming increasingly important as the economy shifts to service businesses continues and the use of part time employees increases. According to Glover and McMillan (1986), a manager in a service business such as a fast-food restaurant where the staff is mostly part-time can spend up to fourteen hours to produce a schedule for one week. The more preferences and constraints that are considered, the more difficult the problem becomes. There has been a great deal of work related to the tour scheduling problem. For example, Bechtold, Brusco, and Showalter (1991) provided a comparison of several labor tour scheduling methods with variable demand patterns. Brusco and Jacobs (1998), evaluated the use of restricted starting times to optimize a schedule with both part-time and full-time staff. Even though the studies covered both optimization and exploration of various impacts using multiple types of

2 employees (full-time and part-time), they are limited by the assumptions of one task and unrestrained availability for all employees. Other work pertaining to employee individuality has been based on optimizing schedules to minimize labor hours and costs without consideration to staffing levels. Several of the studies either evaluate or optimize one or two variable constraints while assuming common employee preferences. Miller, Pierskalla, and Rath (1976) formulated a nurse-scheduling problem that balances staffing coverage and individual preferences. However, the formulation assumed constant demand limited shifts, requiring full-time employees. Brusco and Johns (1998) analyzed cross-training policies on a multi-skilled workforce with varying levels of productivity in a paper mill. While the article assumed variable skills between employees, the situation did not require variable demand and availability between employees. Glover and McMillan (1986) developed the general employee scheduling problem as an extension of the standard shift scheduling problem with a non-homogeneous workforce. Although, the problem includes variable availability and skill qualifications, it does not assign specific employees to specific tasks. This presents a problem for situations where some employees are trained to perform several tasks, as in a fast-food organization. Loucks and Jacobs (1991) developed a heuristic approach using tour scheduling for task assignment at a fast food restaurant with a heterogeneous workforce. They assumed workers were not interchangeable due to hours they were available to work, and the tasks they were qualified to perform. Love and Hoey (1990) created a network flow model for scheduling a variable workforce in a McDonald s restaurant. They emphasized the usability of the program through the use of a decision support system. We propose an approach that neglects some elements of the general tour scheduling problem to quickly produce feasible tours that minimize hourly staffing costs. An efficient probabilistic local improvement algorithm solves a quadratic integer program representation of the problem. The resulting schedules may be used as templates to develop final schedules, or problem parameters can be refined to reflect days off and other requirements and the algorithm rerun. To state the tour scheduling with skill based costs problem (TSSC) mathematically, assume we are given a planning horizon in days, d = 1,..., n d, and the number of periods (e.g. hours) in a day. The set of time periods can then be indexed across the planning horizon by the set T = {t : t = 1,..., n t }. A pair of time periods with indexes u T and v T are adjacent if they are in the same day and v = u + 1 or u = v + 1. And, we define the set of adjacent time period index pairs A = {(u, v) : periods u and v are adjacent}. Furthermore, there is a known set of functions, or types of tasks, to be performed indexed by the set F = {f : f = 1,..., n f }. The number of employees required for each function in each time period is specified in a n t xn f requirements matrix with elements r ft. The set of employee indexes, E = {e : e = 1,..., n e }, is also given. Employee e has skills qualifying him or her to perform a subset of functions, F e F and is available for a subset of the time periods, T e T spec-

3 ified by a crossout matrix obtained prior to scheduling. The subset of employees available to perform function f in period t, E ft E, can be be deduced from T e and F e. A quadratic binary integer mathematical programming formulation of TSSC is presented in Equations (1) through (5). The objective in solving TSSC is to find the best assignment of employees to functions and time periods such that no hard constraints are violated. Or, given c 1 and c 2, per period constant and skill costs, find the values for x eft to minimize Z = (c 1 + c 2 F e )x eft + e f F e t T e x efu x efv (1) e f F e u, v T e, (u, v) A (TSSC) subject to: x eft r ft for all f, t (2) e E ft x eft 1 for all e, t T e (3) f F e x eft P max e for all e (4) t F t x eft P min e for all e (5) t F t x eft {0, 1} where x eft = 1 if employee e is assigned function, f in period t, and zero otherwise. The terms in (1) express the desire to minimize the assignment cost and the number of non-adjacent assignments for employees within a day. The linear cost of assigning employee e to function f in period t is computed as the sum of the base hourly cost, c 1, plus the skill level increment, c 2 F e, where F e is the number of functions employee e is qualified to perform. Hence, more skilled employees cost more per hour but allow more scheduling flexibility. The quadratic term encourages roughly equal daily shift lengths and contiguous periods within a day. Constraint (2) requires that all staffing requirements be satisfied, while (3) constrains employees to at most one assignment per time period. Soft constraints (4) and (5) are considered to be higher priority than the cost and back-to-back preferences in (1), but less important than the hard constraints, (2) and (3). The soft constraints represent the desire to restrict the assignments for each employee, e, to be within specified minimum and maximum total periods, P min e and P max e, over the planning horizon.

4 Notice that restrictions related to days off, maximum days per week, etc. are not included in this formulation. The goal is to produce a template for scheduling employees, with days off assumed to be either fixed within the cross-out matrix or determined by a search within which solution of TSSC would be a subroutine. Hence, the emphasis here is to rapidly find low cost, feasible tours. The remainder of this paper is organized as follows. First, we present the probabilistic local improvement algorithm used to solve TSSC along with the results for an example 41 employee banking problem. We then present a problem generator for creating synthetic test problems. We conclude with test results for runs on 180 problem instances with up to 200 employees. 2 Solution Heuristic The Dynamic Biased Sampling (DBS) local search algorithm described in Mooney and Rardin (1993), Mooney, Parmenter and Rardin (1996), and Cimikowski and Mooney (1997)) was adapted to solve TSSC. DBS efficiently implements many of the advanced tabu search diversification and intensification mechanisms such as short and long term memory and aspiration criteria. Figure 1 illustrates the general algorithm. Notice that the initial solution need not be feasible, and the moves need not be improving. Step 1: Get an initial solution and initialize the search Step 2: Select a set of candidate moves from the neighborhood Step 3: Select the next move Step 4: Update the solution status Step 5: Repeat steps 2 through 4 until done Fig. 1. DBS Search Algorithm The heart of the DBS algorithm is the sampling approach used obtain a set of candidate moves at each iteration (Step 2) Moves involve changing the employee assigned to an f, t pair, or slot to a feasible alternative. Candidate moves are sampled using a priority scheme that reflects the recency and frequency with which a slot s assignment has been changed. The biased sampling approach operates in the spirit of tabu search (Glover, et. al., (1989) and (1990)) to help prevent cycling when non-improving moves are taken. The approach controls diversification necessary to escape local optima without cycling and also reduces the time required to select a move at step 3. The sampling priority for slot s, given by q s /(i l s +1) where i is the current iteration number. The last time slot s s assignment was changed is l s and q s is the number of times (frequency) that s has had it s assignment swapped. Hence, slots that have low swapping frequency and a distant sampling history will be in front of other slots in the queue. A truncated geometric distribution is used for sampling and slots are maintained in a least-value-first priority queue.

5 The main DBS loop terminates after a user-specified number of iterations. The complexity of each iteration is a function of the sample size and the number of slots. If k slots are sampled from the priority queue during each search iteration and the best candidate is chosen it takes O(kn 3 ) time to evaluate candidates and select a move, where n is the total number of slots. Sampling and updating the priority queue during each iteration requires O(n 2 log n). Thus the total time complexity of DBS is O(n 3 ). DBS requires setting shape parameters for the geometric sampling distribution and the sample size, k. We have found the algorithm to be robust; finding good values for these parameters is generally easy. For example, we set the sample size to 30 and shape variation parameters to good values for all runs made in this study after roughly one hour of experimentation. For this application, an initial random assignment is can be quickly found that guarantees only that (2) is satisfied; that is, each slot has a qualified employee assigned. The neighborhood is defined as the set of employee assignments that can be exchanged with each of the current function, time period (f, t) slot assignments while satisfying (2). As detailed below, candidate moves are ranked based on the change in feasibility, soft constraint violations, and the objective function value. The DBS algorithm was applied to TSSC in a two phases. In the first phase assignments are found that satisfy (3) and, secondarily, improve the objective if possible. Once resource conflicts are removed, the second DBS phase attempts to reduce violations of the soft constraints, (4) and (5), and improve the objective function value while maintaining assignment and conflict feasibility. Lexicographic move evaluation is used where moves are ranked according to whether they (1) maintain hard constraint satisfaction, (2) maintain or reduce soft constraint violations, and, as a final tie braking criteria, (3) improve the objective function. A quadratic representation of the resource conflict constraint in (3) shown in (6) is used in the first phase of the heuristic. e f F e u, v T e, u v x efu x efv 0 for all e, f, t (6) This formulation facilitates dualization with the second term in (1). The result is efficient move evaluation in both phases of the algorithm. Figure 2 shows a typical daily schedule produced by the algorithm. Assignments are indicated by function (task type) numbers. The schedule shown is for Loucks banking example (1987). The results were obtained after 61 seconds with the costs (c 1, c 2 ) set to 5 and.5. A feasible solution was found in phase 1 just 2.43 seconds. Note that workers 10 and 32 are shown with gaps in their assignments. This could be interpreted as time that must be paid (overage) if break-free shifts are desired. Alternatively, it may be possible to schedule a higher cost individual to avoid the overage. In any case, the schedule represents a very good template

6 with a projected cost of 6,798.5, a significant reduction from the random initial solution with a value of 6,986 and 6,497 employee conflicts. * unavailable, - unscheduled Fig. 2. Typical Daily Schedule 3 Algorithm Performance Tests The two phase application of the DBS algorithm was evaluated using a set of 60 TSSC problem cases and 160 randomly generated instances. A problem generator was coded to generate representative problems with known characteristics and at least one feasible solution. Cases for average per period demand from 5 to 15 and

7 varied cross-out and capability fractions were specified. Results demonstrated the speed and efficacy of the DBS algorithm for solving TSSC instances. 3.1 Generator The solution algorithm was tested using a set of synthetic problems. The problems were generated by randomly sampling parameters within specified ranges. The generator was coded in C and output problem instances for input to the search code. Input to problem generator included: Average demand (employees) per period, D Load factor, LF Average percent of periods employees unavailable (percent cross out), CO Percent deviation from the periods each employee is available, DEV Average percent of functions each employee is qualified to do, F Output from the generator specifies the parameter values for the TSSC model for a particular problem instance. The output includes staffing demand requirements for each function, the total number of employees and their attributes, as well as specified parameters such as the planning horizon length. Figure 3 shows the logic for the problem generator. The demand requirements for each period were determined from a specified average demand per period. This value was divided by the specified number of functions (task types) to determine the average number of employees required to perform a particular function in each period. The demand for each function in each period was obtained by sampling from a uniform distribution with the value from the previous calculation as the upper bound. The number of employees and their qualifications were then computed to ensure the existence of at least one feasible solution for the given demand. The number of employees must be greater than the maximum number of employees needed for one period. The degree to which staffing exceeds the nominal requirement is specified as a load factor defined as the ratio of available employee-periods to required employee-periods, or demand. As the load factor increases, the number of available employee-periods that are required increases. The number of employees required can be computed by dividing employee-periods required by the average number of periods an employee is available. Average availability, in periods per employee, is computed from the average cross-out percent (CO) and total periods input to the generator. The minimum periods per week each employee must work is determined by applying the percent deviation factor (DEV) input to the generator to the available periods per employee. The number of available periods per employee is determined by sampling from a Poisson distribution with average periods per employee as the parameter. The maximum periods are adjusted if necessary to ensure that the sum of the maximum periods for each employee meet the demand requirements. If there are not enough employees, additional employees are added until the requirements can be met.

8 Fig. 3. Problem Generator Logic Once the number of available periods are known for each employee, specific periods and employee qualifications are determined. Available periods for each employee are sampled from a uniform distribution. A test and reject loop is executed for each employee until the available periods equal the number determined for that employee. The number of functions an employee is qualified to perform is determined using the average percent of functions possible input to the generator. In order to generate the specific capabilities for each employee, a combination of two distributions is used. The total number of skills is sampled from a binomial distribution using the average percent of total functions input to the generator. A Uniform(0,1) distribution sample is compared to the proportion of total functions the employee can perform to accept or reject each function. After all the employees attributes are generated, another feasibility check is conducted to make sure there are enough available and qualified employees to meet the demand requirements. That is, the number of employees able to work in a period has to be greater than or equal to the number of employees required for that period. If there are not enough employees available, a new problem instance is generated. 3.2 Test Runs The search algorithm was run with 60 test problem cases and three instances of each case for a total of 180 instances. The load factor (LF) was set to 5, the deviation (DEV) was 1, and the number of functions was 5 for all instances. Similarly, all instances ran for seven 16 period (hour) days, or a total of 112

9 periods. The cases were defined by specifying the average levels of demand (D), employee cross-out (CO) fraction, and employee qualified function fraction (F). Average per-period demand was set at 5, 10 and 15. The average cross-out fraction (CO) levels were.2,.35,.5, for all demand levels. A cross-out fraction of.7 was also run for D=5. And, the average fraction of functions (F) used were.1 through.6 in increments of.1. The cost parameters, c 1 and c 2 were set to 5 and.5 for all runs, and (4) and (5) were relaxed. The runs were terminated after 5,000 iterations. Runs were made on a Dell 8200 with a 2.3 Ghz Pentium 4 processor running Windows XP professional. The code was compiled with Microsoft Visual Studio 6.0 in release mode and run under MinGW. All times are reported in cpu seconds. Table 1 summarizes the results of the runs. Average and minimum results are over the three replications. The first three columns define the case in terms of average demand, cross-out fraction, and employee capability fraction. Next, the average number of employees (across the three instances) is shown followed by the results of the run. Both the number of iterations and the time to find the best solution are shown as is the average improvement from the random initial starting solution. The gap shown in the last column is computed as the difference between the best objective function value and the value obtained with all constraints relaxed and the minimum cost choice made for each assignment. This bound is probably not very good, but was better for problems with less variability in the requirements and employee characteristics. Note that all initial solutions had a large number of resource conflicts, which were removed in phase 1 very quickly. The average objective function improvement ranged from approximately 21% to 43%. The average time to the best solution ranged from 2.12 seconds for one of the smaller cases to seconds for one of the larger ones. The best solution was found close to iteration 5,000 in all cases, indicating that the search was still finding better solutions almost to the end. The gap is the percent deviation of the best solution with the bound described above. Figure 4 shows the relationship between the demand, average employee capability, and the gap. As the size of the problem as indicated by the demand increases, the gap grows. The gap also grows somewhat more dramatically with the average fraction of the functions an employee can perform. This is likely mostly due to a degradation in the bound due to the way the number of functions are sampled for employees. Since this number is sampled from a binomial distribution, the variation in the number of qualifications increases with the average fraction. Hence the cost coefficients would vary more between employees, yielding a lower bound relative to the likely best feasible solution. 4 Conclusions We presented a model of the employee tour scheduling problem that incorporates employee qualification and quadratic compaction terms in the objective. The TSSC problem was solved with an efficient and robust local improvement

10 Table 1. Run Results Problem Avg.# Iteration (Best) Time (Best) average Gap D CO F Empl. average min average min improv. average min , , % 4.09% 3.78% , , % 6.15% 5.41% , , % 7.05% 6.10% , , % 7.49% 7.05% , , % 8.17% 6.88% , , % 9.81% 9.09% , , % 6.70% 2.72% , , % 3.85% 3.48% , , % 5.11% 4.15% , , % 6.76% 6.39% , , % 7.07% 6.12% , , % 9.38% 8.96% , , % 7.78% 2.45% , , % 3.51% 2.94% , , % 5.09% 4.66% , , % 5.81% 5.69% , , % 6.57% 5.57% , , % 7.14% 5.51% , , % 5.40% 1.00% , , % 3.43% 0.45% , , % 2.04% 0.60% , , % 3.63% 2.66% , , % 4.33% 3.48% , , % 5.07% 4.48% , , % 4.32% 2.89% , , % 4.83% 3.29% , , % 6.88% 5.20% , , % 6.77% 3.32% , , % 9.25% 6.04% , , % 10.65% 9.16% , , % 8.52% 2.80% , , % 10.57% 7.33% , , % 7.88% 3.51% , , % 9.84% 6.11% , , % 7.41% 3.15% , , % 8.27% 5.42% , , % 6.92% 1.82% , , % 7.63% 4.53% , , % 6.11% 1.31% , , % 8.08% 4.38% , , % 5.77% 2.68% , , % 7.44% 5.55% , , % 6.68% 3.44% , , % 8.31% 7.01% , , % 6.28% 1.62% , , % 9.74% 5.48% , , % 10.87% 7.28% , , % 9.61% 3.09% , , % 6.74% 2.74% , , % 8.87% 5.75% , , % 7.71% 3.19% , , % 10.20% 6.07% , , % 12.49% 9.63% , , % 14.44% 12.12% , , % 5.74% 2.34% , , % 8.52% 5.56% , , % 11.61% 8.06% , , % 8.60% 3.03% , , % 10.53% 6.47% , , % 11.39% 9.40%

11 Fig. 4. Gap versus demand and employee capability algorithm applied in two phases. The results from test runs were presented for problem instances requiring up to 15 employees average per period over 112 periods. Instances were solved in a matter of seconds producing solutions between 2% and 14% of a relatively naive bound. The tests therefore demonstrated the efficiency and efficacy of the algorithm. While more work could be done to incorporate days off and other variations, the approach is quite effective at solving this class of problems and will provide low cost employee schedule templates very quickly. References Bechtold, S. E., M. J. Brusco, and M. J. Showalter: A comparative evaluation of labor tour scheduling methods. Decision Sciences 22, 4 (1991) Brusco, Jacobs: Improving personnel scheduling at airline stations: Operations Research 43:5 (September-October, 1995) Brusco, Jacobs: Personnel tour scheduling when starting-time restrictions are present. Management Science 44:4 (April, 1998) Brusco, M. J. and Johns: Staffing a multiskilled workforce with varying levels of productivity: an analysis of cross-training policies: Decision Sciences 2, 29 (1998) Cimikowski, R., Mooney, E.L.: Heuristics for a proximity-based facility layout model. Computers and Industrial Engineering 32:2 (1997) Fitzsimmons, J. A., and Sullivan: R. S. Service operations management. New York, McGraw-Hill Book Company, (1982)

12 Glover, F. and C. McMillian: The general employee scheduling problem: an integration of management science and artificial intelligence. Computers and Operations Res. 13, 4 (1986), Glover, F.: Tabu Search Part 1. ORSA Journal of Computing 1:3 (1989) Glover, F.: Tabu search part 2. ORSA Journal of Computing 2:1 (1990) 4-32 Jacobs, L. W. and S. E. Bechtold: Labor utilization effects of labor scheduling flexibility Alternatives in a Tour Scheduling Environment. Decision Sciences 24,I (1993), Loucks, J. S. and F. R. Jacobs: Tour scheduling and task assignment of a heterogeneous work force: a heuristic approach: Decision Sciences 22, 4 (1991), Loucks, J. S.: A multi-objective heuristic procedure for the tour scheduling and task assignment of fast food restaurant workers: Unpublished Doctorial Dissertation, Indiana University (1987) Love, R. and J. R. Hoey: Management science improves fast-food operations: Interfaces 20, 2 (1990) Miller, H. E., Pierskalla, W. P., and Rath, G. J.: Nurse scheduling using mathematical programming. Operations Research 24, 5 (Sep-Oct, 1976) Mooney, E.L., Rardin, R.L.: Tabu search for a class of scheduling problems. Annals of Operations Research 41 (1993) Mooney, E.L., Parmenter, W.J., Rardin, R.L.: Large scale classroom scheduling. IIE Transactions 28 (1996) Turgut Aykin: Optimal shift scheduling with multiple break windows. Management Sciences 42:4 (April, 1996)