DeepAI
Log In Sign Up

A hybrid optimization approach for employee rostering: Use cases at Swissgrid and lessons learned

11/21/2021
by   Jangwon Park, et al.
0

Employee rostering is a process of assigning available employees to open shifts. Automating it has ubiquitous practical benefits for nearly all industries, such as reducing manual workload and producing flexible, high-quality schedules. In this work, we develop a hybrid methodology which combines Mixed-Integer Linear Programming (MILP) with scatter search, an evolutionary algorithm, having as use case the optimization of employee rostering for Swissgrid, where it is currently a largely manual process. The hybrid methodology guarantees compliance with labor laws, maximizes employees' preference satisfaction, and distributes workload as uniformly as possible among them. Above all, it is shown to be a robust and efficient algorithm, consistently solving realistic problems of varying complexity to near-optimality an order of magnitude faster than an MILP-alone approach using a state-of-the-art commercial solver. Several practical extensions and use cases are presented, which are incorporated into a software tool currently being in pilot use at Swissgrid.

READ FULL TEXT VIEW PDF
03/16/2017

A Visual Web Tool to Perform What-If Analysis of Optimization Approaches

In Operation Research, practical evaluation is essential to validate the...
06/10/2020

Toward a standardized methodology for constructing quantum computing use cases

We propose a standardized methodology for developing and evaluating use ...
02/16/2021

Optimal Mixed Discrete-Continuous Planning for Linear Hybrid Systems

Planning in hybrid systems with both discrete and continuous control var...
06/09/2021

Learning Pseudo-Backdoors for Mixed Integer Programs

We propose a machine learning approach for quickly solving Mixed Integer...
09/02/2016

A MIP Backend for the IDP System

The IDP knowledge base system currently uses MiniSAT(ID) as its backend ...
11/15/2021

Sometimes, Convex Separable Optimization Is Much Harder than Linear Optimization, and Other Surprises

An influential 1990 paper of Hochbaum and Shanthikumar made it common wi...
04/14/2019

Timing in Software-Defined and Centrally-Managed Networks

The work described in this paper explores the use of time and synchroniz...

1 Introduction

Employee rostering aims to assign available employees to open shifts and is a common process in many industries, for example, healthcare, call and control centers, tourism, hospitality, and construction to name a few. The practical advantages of automated employee rostering compared with manual scheduling are widely accepted: easiness, efficiency, cost saving, compliance with labor laws and company directives, higher employee satisfaction, increased accountability and fairness, reduced under-staffing risk, and even improved health.

Despite these benefits, only a limited number of commercially available software products perform automated employee rostering, as it remains a mathematically challenging problem. Indeed, most of the products aim at facilitating shift planning by means of an intuitive Graphical User Interface (GUI), but the shift assignment decisions are manually made by a human. To the authors’ best knowledge, even the existing software products with true automation functionalities do not fully cover the business needs, use simplistic approaches or still require significant human involvement. As a result, many companies still perform employee rostering manually.

To enable widespread use of automated employee rostering in the industry, software tools with two main properties are needed. First, a powerful and scalable solution engine capable of providing near-optimal shift schedules in due time. And second, a comprehensive and versatile application layer to support diverse company use cases.

In this direction, this paper presents an optimization-based hybrid methodology for employee rostering, which combines a Mixed-Integer Linear Programming (MILP) approach and a scatter search metaheuristic algorithm. The methodology is applied to the employee rostering problem at the control center of Swissgrid, the electricity transmission system operator of Switzerland. Swissgrid currently maintains a largely manual and time-consuming rostering process, which is rather inflexible in accommodating changes in employee work preferences or availability. Culminating in the implementation of a software tool with various supported applications, our work aims to bring the benefits of automated employee rostering at Swissgrid, but also provide useful insights for other industries.

Several approaches have been successful in solving real-life employee rostering problems, for example, nurse rostering. Table 1 summarizes a brief survey of studies categorized by algorithm, from which we can glean the following.

  • Pure, standard mathematical programming approaches (without decomposition) are scarce for modern problems due to their complexity.

  • Single-solution-based metaheuristics are popular, but often supported by other problem-specific heuristics.

  • Evolutionary algorithms are generally successful without extensive use of problem-specific heuristics.

  • The combination of mathematical programming and metaheuristics is generally less explored contrary to combinations of metaheuristics and problem-specific heuristics.

Therefore, in this paper, we propose a new approach to hybridize mathematical programming and an evolutionary algorithm called scatter search. The main innovation lies in using an MILP solver as a generator of feasible solutions that are used to initialize the scatter search population. Besides the substantial computational benefits, especially for large-scale problems, the hybrid methodology enables quantifying and monitoring the suboptimality of candidate solutions along the way. Further contributions include the integration of a heuristic relaxation step in mathematical programming and several enhancements to the standard scatter search algorithm.

In addition to the methodological innovation, our approach distinguishes itself from the existing scientific literature and commercial products by supporting a wide range of practical functionalities, including the following.

  • A mechanism to optimally adjust pre-computed rosters to unforeseen changes such as short-term unavailabilities.

  • Scaling up employee rostering to one year with an adaptive rolling horizon scheme that ensures uniform workload over time.

  • Incorporation of company-defined work patterns in employee rostering to reflect company priorities in rostering.

Brief survey of successful applications of optimization in employee rostering. References with an asterisk also use other problem-specific heuristics. Reference Approach Mathematical programming Al-Yakoob and Sherali (2007) Mixed-integer programming Kassa and Tizazu (2013) Agrali, Taskin, & Unal (2017) Single solution-based metaheuristics Burke, De Causmaecker, & Vanden Berghe (1999) Tabu search/local search Li, Lim, & Rodrigues (2003) Meisels and Schaerf (2003) Burke, Kendall, & Soubeiga (2003) Xie, Potts, & Bektas (2017) Iterated local search Burke, Curtois, Post, Qu, & Veltman (2008) Variable neighbourhood search Population-based metaheuristics Brezulianu, Fira, & Fira (2009) Genetic algorithm Zolfaghari, Quan, El-Bouri, & Khashayardoust (2010) Tahanian and Khaleghi (2015) Maenhout and Vanhoucke (2010) Scatter search Burke, Curtois, Qu, & Vanden Berghe (2010) Mathematical programming + metaheuristics Li, Burke, Curtois, Petrovic, & Qu (2012) Falling tide algorithm

The paper is structured as follows. Section 2 describes the employee rostering problem at Swissgrid. In Section 3, we present the details of the hybrid methodology along with our implementation of scatter search, followed by a comparison with an MILP-alone approach in Section 4. Section 5 discusses the practical extensions and use cases of our employee rostering model for Swissgrid, and Section 6 concludes our work.

2 Problem description

In employee rostering, we seek to assign available employees to open shifts while complying with labor regulations, company directives, and employees’ personal requirements. In this section, we describe the general characteristics of the problem as well as aspects that may be specific to Swissgrid.

2.1 General characteristics of employee rostering

2.1.1 Multi-shift environment and multi-skilled workforce

Typically, there are multiple shift types and employees may have licenses to perform one or more of them. The license mix within the workforce dictates who is legally entitled to perform which shift types, which is determined by appropriate compulsory training.

2.1.2 Employee unavailabilities and preferences

We consider employees’ unavailabilities and preferences in optimizing their schedules. Unavailabilities can be short- or long-term: short-term unavailabilities typically range from a few hours to a few days, whereas long-term unavailabilities refer to vacation. While the number of vacation days is constant for everyone, the number of short-term unavailabilities may vary considerably. Preferences indicate if employees wish, or not wish, to work during certain time slots on a given day. Therefore, the problem formulation for employee rostering should forbid assigning employees to shifts during their unavailable times and violate employees’ preferences as little as possible.

2.1.3 Labor regulations

Some common labor regulations, which also apply to employee rostering at Swissgrid, are outlined in Table 2.1.3.

Commonly considered labor regulations in employee rostering Regulation Description Minimum shift Lowest allowable number of shifts worked per week. Maximum shift Highest allowable number of shifts worked per week. Minimum rest days Lowest allowable number of rest days in the given planning horizon. Maximum rest days Highest allowable number of rest days in the given planning horizon. Minimum rest hours Guaranteed rest hours between any two shifts. Minimum Sunday rest Lowest guaranteed number of rest Sundays in the given planning horizon. License compliance Each employee must have the appropriate license for the shift that they perform.

2.2 Specific characteristics of Swissgrid

2.2.1 Cost of employee assignment

In general, the costs of assigning employees typically vary due to contractual differences. At Swissgrid, however, we assume constant assignment costs in the problem formulation. Consequently, uniformizing workload distribution, and thus ensuring fairness across employees, is a critical component of the objective function.

2.2.2 Shift types

The System Operations department at Swissgrid is responsible for operational planning and real-time control of the Swiss electricity transmission grid. This involves planning outages of grid assets for maintenance purposes, activation of power reserves to maintain grid stability, and switching operations for controllable grid components to optimize the flow of electricity. System operation actions are taken and coordinated by five teams at the two control centers of Swissgrid located at Aarau (German-speaking part of Switzerland) and Prilly (French-speaking part). In general, each team has different types and numbers of shifts, which are well-defined and fixed for each yearly operation, but might change once every few years according to the needs.

In this work, we focus on a team in Prilly which, at the time of writing, had three shift types: regional switching operations, on-call duty (P), and outage planning (OM). The duration of a shift can vary from type to type. For example, a switching operations shift lasts 8 hours and is thus assigned to employees as a morning (M), afternoon (A), or night (N) shift. An on-call duty and outage planning shift, however, takes a whole day.

2.2.3 Forbidden shift type sequences

For the considered team at Prilly, employees are forbidden to work a morning shift if an on-call duty was assigned to them on the previous day to ensure sufficient rest under all circumstances. In general, a multi-shift environment may come with a set of special relationships among different shift types that prohibit certain sequences.

2.2.4 Cover requirements

Different shift types have different cover requirements, i.e., the number of employees required at any time. The cover requirements at Swissgrid are dictated by grid security considerations; therefore they are deterministic and need exact satisfaction. Key aspects of the shift types considered in this work are summarized in Table 2.2.4.

Key aspects of the shift types considered in the problem formulation. There must be one employee every morning, afternoon, and night all year long including public holidays for switching operations and on-call duties. In contrast, outage planning is only conducted on business days. Note that weekends are treated specially at Swissgrid because morning and night shifts are extended to 12 hours, thus eliminating afternoon shifts entirely. Shift type Duration Cover Weekend cover Holiday cover Switching operations 8 hours 1 Yes Yes On-call duty (P) All day 1 Yes Yes Outage planning (OM) All day 1 No No

2.2.5 Rest day

The number of rest days is calculated by counting the total instances of consecutive 24 hours of non-shift time throughout the planning horizon. Based on this definition, the number of rest days of two employees can be different despite having the same number of shifts. Figure 1 provides a visual explanation of the sensitivity of rest days to shift arrangements.

Figure 1: Examples of three-day schedules. In the top schedule, an employee has a morning shift on day 1 and an afternoon shift on day 3, which suggests two rest days, as there are 48 consecutive hours of non-shift time. However, changing the morning shift on day 1 to afternoon, as shown by the bottom schedule, results in only one rest day despite the same number of shifts. Note that if a rest day was defined in a simpler way as a full calendar day without a shift, which is nevertheless not Swissgrid’s approach, then both the top and bottom schedule would correspond to one rest day.

2.2.6 Planning horizon and short-term adjustments to pre-computed shift plans

Providing an annual schedule in advance is highly desired at Swissgrid, as it allows time for long-term planning. Later in the year, however, employees may change their unavailabilities and preferences. For example, employees coordinate their vacation time with their families and may update their unavailabilities in the future, which may render the currently optimal annual plan suboptimal or even infeasible. Optimizing short-term adjustments to the pre-computed annual plan is therefore necessary.

3 Hybrid solution methodology: MILP and scatter search

3.1 Overall methodology

Our main decision variables are binary, and they represent whether or not an employee should work a given shift type at a given time slot. These decisions should minimize employees’ preference violation and uniformize workload among them as best as possible. Our first solution approach is a MILP, whose mathematical formulation is provided in Appendix A.

The computational cost of solving the MILP increases dramatically with the problem size, e.g., number of employees. In fact, mathematical programming approaches may be inappropriate for the large, complex search spaces typically posed by modern rostering problems. Metaheuristics on the other hand are often preferred because they produce reasonably good solutions within limited computational time (Ernst, Jiang, Krishnamoorthy & Sier, 2004). However, many metaheuristics do not explicitly measure the suboptimality of a feasible solution. Therefore, we develop a hybrid methodology that combines the MILP sequentially with scatter search – a population-based evolutionary algorithm – to overcome the weaknesses of either approach and solve larger problems more tractably.

Figure 2: Flowchart of the hybrid methodology combining MILP and scatter search.

The proposed hybrid methodology is a two-phase algorithm, as illustrated in Figure 2. In the first phase, we employ CPLEX to (1) solve the MILP for a set of feasible solutions and (2) extract a lower bound of the problem from its branch-and-bound tree. In the second phase, we employ scatter search to improve the feasible solutions until the optimality gap of the best solution, i.e., the degree to which a solution is suboptimal, is sufficiently close to 0 (optimality). The desired optimality gap is determined by the user.

The first phase of the hybrid methodology is subdivided into two further steps. In the first step, all integrality constraints are relaxed, and we solve the resulting linear program to optimality. The values of the decision variables which turn out to be integral are fixed in the second step and we solve the resulting MILP. We call this pre-processing scheme the relax-and-fix heuristic, and it offers two empirical advantages: (1) reducing the time spent to search for a set of feasible solutions, and (2) improving the quality of each solution in the set.

In the following sections, we summarize the implementation of the five subroutines of scatter search for the employee rostering problem at Swissgrid.

3.2 Diversification generation method

The diversification generation method creates a diverse set of feasible solutions. Unlike randomly generating an initial population of feasible solutions as in Burke, Curtois, Qu et al. (2010), we use CPLEX with user-defined parameters to search for a population of solutions. Additionally, we can control: (1) how much time is spent in this search, (2) how solutions already in the population are replaced, and (3) how much diversity the replacement strategy should consider. Therefore, CPLEX is a flexible alternative to the conventional diversification generation method. Note that similar possibilities exist with other commercial solvers (e.g., Gurobi), which would be equally suitable as the diversification generation method.

3.3 Improvement method

The improvement method attempts to improve the quality of a given solution. For this purpose, we use local search. Within local search, we consider two randomly selected employees for a swap of shifts on a random date, as illustrated in Figure 3. If the swap improves the solution’s objective value, it is accepted; otherwise, it is reversed. Afterwards, we proceed with another selection of employees and date. Local search terminates when the number of consecutive swaps that did not lead to an improvement reaches a threshold.

In general, a higher threshold may achieve more improvements, but may also be more time-consuming. One strategy is to start with a relatively small threshold in the beginning, but increase it if the best solution of the current generation of scatter search is not better than that of the last generation by more than 10%, for example. To make local search more effective, we select employees according to probabilities which are equal to the quality of each employee’s schedule divided by the overall objective value. In other words, the employee with the worst schedule is the most probable one to be selected for a swap.

Figure 3: Swap of shifts between employees 1 and 2 on Friday of week 5 of the year, all of which are selected at random. Recall that “M,” “A,” and “N” indicate morning, afternoon, and night shifts, respectively, whereas “P” refers to an on-call duty.

3.4 Reference set update method

The update method for the reference set, i.e., the fixed-size population of solutions, used in this work follows the strategy by Burke, Curtois, Qu et al. (2010). A solution improved by local search replaces the worst solution in the reference set if it is strictly better and not already in the set. When the reference set has yet to reach its fixed size, any new solution will automatically enter the set.

3.5 Subset generation method

The subset generation method identifies which solutions from the reference set (parents) are used to create a new solution (offspring). Scatter search allows more than two parents to create an offspring.

The subset generation method in this work follows Burke, Curtois, Qu et al. (2010) closely:

  1. 2-Subset: Construct all unique subsets of the reference set (RefSet) containing two solutions.

  2. n-Subset: For every , construct all unique subsets of size created by adding to each element in (n1)-Subset the best solution not already in the element.

To avoid constructing a subset with no new solutions from the last generation of scatter search, each offspring is initially marked as “new” when entering the next generation, but switched to “old” in subsequent generations. Scatter search terminates when no new solutions are observed.

3.6 Solution combination method

The solution combination method creates an offspring from the parent solutions. Our approach is similar to that by Burke, Curtois, Qu et al. (2010), but has more randomized components.

A solution is simply a collection of employee-shift-day triplets where “no shift,” or rest, is also considered a shift type in this context. A candidate is defined to be a particular triplet, and the number of votes for the candidate is the number of parents that contain the candidate. In general, candidates with the most number of votes will populate the empty offspring first. Unanimous attributes, i.e., candidates that all parent have, are inherited directly. Visually, this means that the part of the employee roster matrix (see Figure 3) that is identical in all combined parents will carry over to the offspring.

Ties occur between candidates with equal votes if they have the same employee and day, but not the shift. Burke, Curtois, Qu et al. (2010) uses a rule-based deterministic approach to break ties, which is reasonable because scatter search is their main methodology and they use a more complex improvement method called variable depth search. In contrast, we break ties by randomly selecting one of the candidates. This simpler stochastic approach is better suited to escape local optima in our case because scatter search is employed in conjunction with a deterministic MILP.

The offspring may still under-satisfy cover requirements after processing all votes and candidates. This is corrected by a simple heuristic. Specifically, we sort employees in increasing order of workload according to their current schedules and attempt to assign shifts to employees with the least number of shifts first. This heuristic accelerates uniformizing the workload among employees, which is one of our objectives.

4 Comparison of solution approaches

4.1 Assumptions and parameters

In this section, we compare the two solution approaches, namely, the MILP-alone approach and the hybrid methodology detailed throughout Section 3. The list below describes the key assumptions and parameter settings used in this analysis. Although the assumptions are largely based on the situation of a Swissgrid team at the time of writing, they do not necessarily or thoroughly reflect the actual parameters, regulations and principles of employee rostering applied by Swissgrid.

  • The base problem instance has 12 employees and three shift types, as described in Section 2.2.2. All employees perform switching operations, but half are entitled to perform on-call duties (P) and the other half outage planning (OM).

  • Cover requirements are constant week over week and as described in Section 2.2.4 and Table 2.2.4. Holidays are based on the year 2020.

  • If simulating with a number of employees other than 12, the cover requirements are scaled proportionally to the number of employees.

  • All employees are available 95% of the time; the exact days are randomized.

  • All employees receive 25 days of vacation per year (separate from availability above).

  • Employees express preferences up to 20% of the slots in the planning horizon. This is roughly equal to 1 - 2 days per week. The exact days with preferences are randomized. Once sampled, it is a preference “for” or “against” working with a 50-50 chance.

  • All problem instances have an 8-week planning horizon, inspired by the considered Swissgrid team whose approach has been to plan 8 weeks first and repeat it for the rest of the year.

  • Based on similar nurse rostering problems in Burke, Curtois, Qu et al. (2010), the size of the reference set within scatter search is five.

  • The size of the initial population is set to six, which effectively allows us to eliminate the worst solution that our diversification method (MILP with CPLEX) finds by later pruning it.

Under these assumptions, the base problem instance has approximately 6,500 continuous and 8,000 integer variables, and nearly 40,000 constraints, excluding non-negativity and integrality restrictions. Besides the base problem instance, we also solve scaled-up versions of the problem with 24, 36, 48, 60, and 72 employees (with randomized employee availability and preference parameters).

4.2 Computational time comparison

For each workforce size from 12 to 72 employees, we record the mean computational time for each approach to reach various optimality gaps across 5 randomized trials. The lower the mean computational time at a given optimality gap, the more efficient the solution approach.

Table 4.2 demonstrates that for problems with 24 employees or more, our hybrid methodology is more efficient than the MILP-alone approach by at least an order of magnitude in converging to optimality gaps 5% or lower, which would be an acceptable solution quality in practice. While the MILP-alone approach is already impractical for problems with 48 employees (e.g., longer than 1 hour per 8-week planning horizon to reach 3% optimality gap), the hybrid methodology remains practical up to and including the largest problem instance. With 72 employees, it allows us to solve to near-optimality in roughly 9 minutes on average, whereas the MILP-alone approach takes nearly 2.5 hours. This can be partly explained by the fact that while CPLEX tends to become “stuck” at certain plateaus, scatter search continuously and rapidly finds better solutions throughout the algorithm. However, for small problems (12 employees), the solution time of the MILP-alone approach is smaller than the time required to execute the relax-and-fix heuristic of the hybrid methodology.

The results are similar even for different parametric assumptions. For example, assuming that employees provide preferences for 50% of the planning horizon (roughly 3 - 4 days per week) does not appreciably change the observations. The hybrid methodology continues to outperform the MILP-alone approach by at least an order of magnitude in all problems with 24 employees or more and reaches the 1% optimality gap. In fact, with sparser preference densities, the spread tends to become larger. To confirm this, we experimented with 0% preferences (no preferences). We consequently found that the hybrid methodology is more efficient even in the smallest problems, as shown in Table 4.2. Moreover, the performance difference between the two approaches is much wider compared to the case where employees provide some preferences (Table 4.2).

Comparison of mean computational time in seconds across 5 randomized trials, assuming up to 20% preferences. The columns (12 to 72) represent the number of employees in the problem instances. Bold fonts indicate that the corresponding approach achieved a lower time than the other in solving the same problems. In the hybrid methodology, the optimality gaps can be computed using the best bound from CPLEX, obtained in Phase 1 of Figure 2. Hybrid methodology MILP-alone approach Optimality gap 12 24 36 48 60 72 12 24 36 48 60 72 50% 165 176 223 219 256 317 83 403 2206 2785 5242 6540 20% 165 176 223 219 256 317 83 403 2206 2785 5242 6540 10% 165 176 223 219 257 318 83 403 2206 2785 5242 8097 5% 165 176 223 222 257 331 83 810 2310 3368 7950 8097 3% 165 176 223 236 318 346 94 995 3052 4395 9239 8791 1% 167 183 230 382 526 517 94 995 3052 4395 9239 9007

Comparison of mean computational time in seconds across 5 randomized trials, assuming 0% preferences. The columns (12 to 72) represent the number of employees in the problem instances. Bold fonts indicate that the corresponding approach achieved a lower time than the other in solving the same problems. Hybrid methodology MILP-alone approach Optimality gap 12 24 36 48 60 72 12 24 36 48 60 72 50% 171 256 567 1160 1424 2074 111 146 920 1884 5432 6349 20% 171 256 567 1160 1424 2074 152 2315 3753 17136 43336 66539 10% 171 256 567 1160 1424 2074 156 2315 3753 17136 43336 66539 5% 171 256 567 1160 1424 2076 251 2315 3753 20316 79728 66539 3% 171 256 567 1160 1424 2076 360 2691 7910 20316 81243 24 h* 1% 171 260 572 1167 1496 2145 360 2691 7910 20316 81243 24 h* *Computational times were measured only up to 24 hours.

The final row of Table 4.2 offers additional insights into the scalability of the two solution approaches with respect to the number of employees. Figure 4 exhibits these values and highlights the increasing gap between the mean computational time of the MILP-alone approach and the hybrid methodology, which clearly indicates that the latter is more scalable with respect to workforce size.

Figure 4: Comparison of mean computational time to reach 1% optimality gap for various problem instances.

Furthermore, Figure 4 shows that the computation time grows faster without the relax-and-fix heuristic (without the first step in Figure 2

). The relax-and-fix heuristic is useful for reducing the overall computational time because our decision variables and parameters are mostly binary-coded. Indeed, we observed that most decision variables turned out to be integers in the optimal solution to the linear-relaxed problem. Fixing these variables reduces many degrees of freedom, and consequently time, in searching for an initial population of solutions.

In Table 4.2, we further observe that the relax-and-fix heuristic provides scatter search with an advanced starting point, i.e. a much better initial population. For instance, using the relax-and-fix heuristic, we hardly observe any difference in the time to reach 50% optimality gap relative to the time to reach 10%; the same, however, cannot be said without the heuristic.

Comparison of mean computational time in seconds across 5 randomized trials between two variants (with and without the relax-and-fix heuristic) of the hybrid methodology. With relax-and-fix heuristic Without relax-and-fix heuristic Optimality gap 12 24 36 48 60 72 12 24 36 48 60 72 50% 165 176 223 219 256 317 87 117 158 249 323 597 20% 165 176 223 219 256 317 87 118 159 253 331 611 10% 165 176 223 219 257 318 87 161 260 449 562 840 5% 165 176 223 222 257 331 87 234 399 770 954 1376 3% 165 176 223 236 318 346 87 266 494 911 1246 1903 1% 167 183 230 382 526 517 87 503 1023 1443 2482 4685

4.3 Robustness comparison

The standard deviation of the optimality gaps from randomized trials reveals whether a solution approach is robust. Specifically, a low standard deviation suggests that the approach can find roughly equally qualified solutions irrespective of the randomized availability and preference parameters, whereas a high standard deviation implies that the effectiveness of the approach depends heavily on the parameters. A practical employee rostering tool should consistently produce solutions of similar qualities by a specified time limit, for example, 5, 10, 15, or 30 minutes.

Results in Table 4.3 are reported for 50% preferences, i.e. employees can specify up to 50% of the slots in the planning horizon for preferences. If less than 50%, the MILP-alone approach cannot produce any feasible solution within 30 minutes for problems with more than 24 employees. Even for 50% preferences, the MILP-alone approach again cannot generate any feasible solution within 30 minutes beyond 48 employees, which explains why we report numbers only up to 48 employees.

Table 4.3 shows that the standard deviation of the optimality gaps at each time limit can be very large and inconsistent for the MILP-alone approach. On the contrary, the standard deviations from the hybrid methodology are relatively low for all problems at each time limit. Furthermore, the standard deviation tends to decline with time; the more time we allow, the more similar solution qualities become. The same, however, cannot be observed with the MILP-alone approach which produces standard deviations that can either increase or decrease with time.

Comparison of standard deviation of optimality gaps across 5 randomized trials. The columns (24, 36 and 48) represent the number of employees in the problem instances. The problem instance with 12 employees is omitted because both the MILP-alone approach and the hybrid methodology reach 1% optimality gap before 5 minutes. Hybrid methodology MILP-alone approach Time elapsed (min) 24 36 48 24 36 48 5 0.5% 1.0% 2.9% 18.9% 21.2% 1.6% 10 0.2% 0.8% 1.5% 1.6% 20.9% 2.6% 15 * 0.5% 0.9% * 20.9% 2.6% 30 * * 0.2% * 1.6% 18.2% *By this point, 1% optimality gap has been reached in all 5 randomized trials, and the standard deviation does not matter as much.

Figure 5: Among other things, the manager GUI is used to specify the number of employees, the planning horizon, and how to weigh employee preferences and uniform workload in the objective. Various labor regulations and optimization details (e.g., solution methodology and optimality gap) are also specified.
Figure 6: The solution progress is updated in real time including a convergence plot to monitor algorithm performance as it is approaching the desired solution quality. In this example, CPLEX terminated with an optimality gap of 34.57%, whereas scatter search improved the solution to an optimality gap of 4.9% (i.e., below the acceptance threshold of 5%).
Figure 7: The software tool displays the optimized roster and basic statistics about it. In this example, the employees perform almost the same number of shifts overall as well as on weekends (to limit the size of the screenshot, the tabular results at the top are only visible for 6 of the 12 employees). Note that 85% of the employee preferences are satisfied on average, with the lowest satisfaction rate being 70% for employee 9. The solution can be exported to Excel for storage and further processing.

5 Use cases

5.1 Value for the company

We packaged our model and algorithms for employee rostering as a software tool, whose design and functionalities are depicted in Figures 5 to 7. The software includes a GUI to accept manager and employee parameters, and display results. In this section, we present extensions to the basic implementation to meet the user needs at Swissgrid, which may also be relevant to other industries.

5.2 Event-driven optimization

Employees can become unavailable unexpectedly for a number of reasons (e.g., illness). Absence leaves cover requirements under-satisfied, and others who are available must fill in. One strategy is to repeat the rostering from scratch with the new parameters. However, the new roster may be very different from the original roster and cause inconvenience to employees. Therefore, one should re-optimize the roster while minimizing its deviation from the original roster.

We further found that small teams ( 10 employees) at Swissgrid actually favored manual scheduling to an automatized solution because they have full control over their own work schedules. Instead, their main interest was not optimizing rosters from scratch, but re-optimizing existing rosters under new conditions communicated through change requests as many times as needed. This slightly modified implementation is called event-driven optimization.

An example of vacation change request is presented in Figure 8. On the top, the original work schedule (left) and its corresponding vacation parameter (right) are given for an employee, while on the bottom are the the re-optimized schedule under the new vacation parameter. The shifts in weeks 23 and 24 in the original schedule that coincide with the new vacation plans are now removed in the re-optimized schedule. We further note that the degree of change is indeed minimal; Periods 1, 2, 5, 6, and 7, which are not shown, undergo no changes at all, and Period 3 is only slightly modified.

Figure 8: Example vacation change request (bottom right) and the re-optimized schedule for an employee from weeks 9 to 32 (bottom left). The original vacation parameter and schedule are shown on the top. The empty area enclosed in the green box indicates that the solution indeed does not violate vacation plans. The dashed red boxes highlight the changes in the re-optimized schedule compared with the original one, which are kept to a minimum.

5.3 Adaptive rolling horizon scheduling

Adaptive rolling horizon scheduling is a simple, but efficient technique to extend the planning horizon to one year, which would otherwise be impossible within reasonable time (e.g., 8 hours of work time) due to increased computational cost. Specifically, we divide one year into disjoint planning periods of several weeks each and optimize a roster in each period sequentially. As an example, we use seven disjoint 8-week periods.

From one period to the next, we implement an adaptive scheme which adjusts each employee’s workload targets, for weekdays and weekends separately. The intuition behind the scheme is to increase (decrease) the workload targets for an employee whose cumulative workload has fallen short of (exceeded) his/her cumulative targets, by as much as the actual deviation of the cumulative workload from cumulative target. In so doing, we attempt to uniformize workload throughout the year on weekdays and weekends.

In Figure 9, we present the standard deviations of employees’ weekend workload from 10 randomized problems with 12 employees. A small standard deviation indicates that weekend shifts are distributed relatively equally. Figure 9 shows that using the adaptive scheme produces smaller standard deviations with an average standard deviation of 1.2 days (compared to 2.1 days without the adaptive scheme). In other words, with the adaptive scheme most employees are within one Saturday or Sunday shift of each other over an entire year, but this increases to a full weekend without the adaptive scheme.

Figure 9: Comparison of the standard deviation of weekend workload distribution (in number of days) for two scenarios: with and without the adaptive scheme. The results are obtained by solving 10 randomized problems with 12 employees using the MILP-alone approach. For each of the randomized problems, the standard deviation is computed across the 12 dispatchers.

5.4 Incorporation of company-defined work patterns

Aside from employees’ individual preferences, a company may wish to incorporate its organizational preference into the roster. The so-called company-defined work patterns are imposed on all employees alike such that everyone has effectively the same schedule, different only in that it begins in different weeks for each employee. These work patterns may be defined for 8 weeks, which are then repeated for the rest of the year. Therefore, there may typically be only one unique work pattern, but a total of eight patterns are available since there are eight possible starting weeks. Figure 10 depicts example work patterns in year 2020 from the considered team at Swissgrid.

Figure 10: Example of a company-defined work pattern (left) and two of its weekly variations (middle and right) from the considered team at Swissgrid.

Integrating company-defined work patterns is achieved by a two-stage MILP, as illustrated in Figure 11.

Figure 11: Flowchart of the two-stage MILP used to integrate company-defined work patterns in employee rostering. Phase 2 of the hybrid methodology is described in greater detail in Figure 2.

The first-stage problem precedes the relax-and-fix heuristic step in our hybrid methodology (see Figure 2), and finds the optimal assignment of one work pattern per employee. It minimizes violation of employees’ availability, vacation, and preferences by using non-negative slack and surplus variables in the constraints and minimizing their sum. If any one such variable is positive, this implies infeasibility, which is then corrected in the second-stage problem. The optimal solution to the first-stage problem, aptly called the company preference parameter, is used in the second-stage problem, which is phase 1 of our hybrid methodology (see Figure 2).

The second-stage problem is equal to the original employee rostering problem, but minimizes the violation of both individual and company preference parameters, as detailed in Appendix A. We strike a trade-off between the two preference-related objectives with a weight coefficient, . The closer is to 0, the more priority is given to satisfying company preferences.

Figure 12 shows two use cases: rostering with (top) and (bottom). Note that there is a significant difference in the schedules’ appearance despite being the same employee with identical parameters. Indeed, full priority over the work patterns produces a schedule with a close affinity to the examples in Figure 10. By tuning , we can create a schedule which is balanced between these two extreme attitudes to scheduling.

Figure 12: Top: Example schedule with a full regard for company-defined work patterns (). The schedule closely resembles the examples in Figure 10; however, perfect replication is impossible due to employees’ own unavailability. Bottom: Example schedule with no regard for the work patterns () for the same employee with identical parameters. The schedule is more scattered and does not follow the examples in Figure 10 closely.

5.5 Additional use cases

Two additional extensions include vacation co-optimization and staffing level optimization, which are only briefly discussed here. The former is a functionality that corrects infeasibility from significant overlap among employees’ vacation; it makes minimal adjustments while preventing the vacation time from breaking into undesired, disjoint time periods. Staffing level optimization is a functionality that uses the employee rostering model as a simulator to discover the optimal team size and license mix for the various shift types under competing objectives.

6 Conclusion and future work

In this work, we presented a new hybrid methodology to optimize employee rostering and applied it for a team at Swissgrid. The hybrid methodology combines an MILP model with a metaheuristic called scatter search, and could solve many problems involving 24 to 72 employees by an order of magnitude faster than the MILP when solved by CPLEX alone. Additional practical advantages were observed such as considerably slower growth in computational cost with respect to the number of employees and producing more reliable and robust solutions under different randomized parameters.

Being an industry project, our model must reflect the needs of the stakeholders. Among these needs, we identified that our tool must optimize adjustments to pre-computed rosters when problem parameters change unexpectedly, incorporate company-defined work patterns with a user-defined priority level, and scale up the planning horizon to one year in an efficient manner. Simulations illustrated that our tool satisfies all of these needs.

We believe that scheduling software tools with scalable solution engines and a comprehensive application layer, such as the methodology and tool presented in this paper, are required to achieve a widespread adoption of automated rostering solutions in the industry. Among other things, future work on the methodology side will target stochastic extensions of the scheduling optimization problem, as well as computational improvements by means of decomposition techniques. In terms of new software functionalities, we will focus on an enhanced user interface and modeling language that allows the user to input custom scheduling constraints in a straightforward way.

Acknowledgement(s)

The authors would like to thank Dr. Marek Zima, Stéphane Duarte Dätwyler, Joël Egg and Bastien Grand from Swissgrid, and Prof. Dr. Daniel Kuhn and Dirk Lauinger from EPFL for fruitful discussions and feedback.

References

  • American Psychological Association (2010) Ağralı, S., Taşkın, Z. C., & Ünal, A. T. (2017). Employee scheduling in service industries with flexible employee availability and demand. Omega, 66, 159–169. https://doi.org/10.1016/j.omega.2016.03.001
  • American Psychological Association (2010) Al-Yakoob, S. M., & Sherali, H. D. (2007). Mixed-integer programming models for an employee scheduling problem with multiple shifts and work locations. Annals of Operations Research, 155(1), 119–142. https://doi.org/10.1007/s10479-007-0210-4
  • American Psychological Association (2010) Brezulianu, A., Fira, M., & Fira, L. (2009). A genetic algorithm approach for a constrained employee scheduling problem as applied to employees at mall type shops. Proceedings of the 2009 International Conference on Hybrid Information Technology - ICHIT ’09, 497–501. https://doi.org/10.1145/1644993.1645085
  • American Psychological Association (2010) Burke, E., De Causmaecker, P., & Vanden Berghe, G. (1999). A Hybrid Tabu Search Algorithm for the Nurse Rostering Problem. Simulated Evolution and Learning, 187–194. https://doi.org/10.1007/3-540-48873-1_25
  • American Psychological Association (2010) Burke, E. K., Curtois, T., Post, G., Qu, R., & Veltman, B. (2008). A hybrid heuristic ordering and variable neighbourhood search for the nurse rostering problem. European Journal of Operational Research, 188(2), 330–341. https://doi.org/10.1016/j.ejor.2007.04.030
  • American Psychological Association (2010) Burke, E. K., Curtois, T., Qu, R., & Vanden Berghe, G. (2010). A scatter search methodology for the nurse rostering problem. Journal of the Operational Research Society, 61(11), 1667–1679. https://doi.org/10.1057/jors.2009.118
  • American Psychological Association (2010) Burke, E., Kendall, G., & Soubeiga, E. (2003). A Tabu-Search Hyperheuristic for Timetabling and Rostering. Journal of Heuristics, 9(6), 451–470. https://doi.org/10.1023/b:heur.0000012446.94732.b6
  • American Psychological Association (2010) Ernst, A., Jiang, H., Krishnamoorthy, M., & Sier, D. (2004). Staff scheduling and rostering: A review of applications, methods and models. European Journal of Operational Research, 153(1), 3–27. https://doi.org/10.1016/s0377-2217(03)00095-x
  • American Psychological Association (2010) Kassa, B. A., & Tizazu, A. E. (2013). Personnel scheduling using an integer programming model- an application at Avanti Blue-Nile Hotels. SpringerPlus, 2, 333. https://doi.org/10.1186/2193-1801-2-333
  • American Psychological Association (2010) Li, H., Lim, A., & Rodrigues, B. (2003). A hybrid AI approach for nurse rostering problem. Proceedings of the 2003 ACM Symposium on Applied Computing - SAC ’03. https://doi.org/10.1145/952532.952675
  • American Psychological Association (2010) Li, J., Burke, E. K., Curtois, T., Petrovic, S., & Qu, R. (2012). The falling tide algorithm: A new multi-objective approach for complex workforce scheduling. Omega, 40(3), 283–293. https://doi.org/10.1016/j.omega.2011.05.004
  • American Psychological Association (2010) Maenhout, B., & Vanhoucke, M. (2010). A hybrid scatter search heuristic for personalized crew rostering in the airline industry. European Journal of Operational Research, 206(1), 155–167. https://doi.org/10.1016/j.ejor.2010.01.040
  • American Psychological Association (2010)

    Meisels, A., & Schaerf, A. (2003). Modelling and Solving Employee Timetabling Problems. Annals of Mathematics and Artificial Intelligence, 39(1/2), 41–59.

    https://doi.org/10.1023/a:1024460714760
  • American Psychological Association (2010) Xie, F., Potts, C. N., & Bektaş, T. (2017). Iterated local search for workforce scheduling and routing problems. Journal of Heuristics, 23(6), 471–500. https://doi.org/10.1007/s10732-017-9347-8
  • American Psychological Association (2010) Zolfaghari, S., Quan, V., Bouri, A. E., & Khashayardoust, M. (2010). Application of a Genetic Algorithm to staff scheduling in retail sector. International Journal of Industrial and Systems Engineering, 5(1), 20–47. https://doi.org/10.1504/ijise.2010.029755

Appendix A Mathematical formulation

a.1 Notation

a.1.1 Parameters and sets

Table A.1.1 summarizes all parameters involved in the mathematical formulation. The index is used to refer to each employee; the index refers to each time block, which is a pre-defined 8-hour period within a day such as 6:00 - 14:00; lastly, the index is used to refer to each shift type.

Problem parameters and their descriptions. Parameter Description Number of weeks in the planning horizon Number of employees Number of shift types Number of time blocks in the planning horizon, which is equal to . (Each week has seven days, and each day has three 8-hour time blocks; hence 21.) Maximum number of shifts per week Minimum number of shifts per week Minimum number of rest days per year Minimum number of rest Sundays per year {0,1} matrix parameter representing employee availability; means employee is available during time block . {0,1} matrix parameter representing employee vacation; means employee is on vacation during time block . matrix parameter representing employee preferences; = 1 means employee prefers to work during time block whereas 0 means he does not prefer a shift. A missing (null) entry indicates no preference. matrix parameter representing the cover requirements; means one employee is required during time block for shift type . Scalar representing the end-of-horizon workload target for employee for shift type . Scalar representing the end-of-horizon weekend workload target for employee .

Table A.1.1 outlines a list of sets involved in the mathematical formulation. For an arbitrary matrix , the notation represents the row of the matrix . Similarly, the column of the matrix is denoted by .

Index sets and their descriptions. Set Description Set of non-null indices in for every . Set of employees without the necessary license to perform shift type , defined for every . Set of indices which correspond to Sunday time blocks; . Set of indices which correspond to weekend time blocks; .

a.1.2 Decision variables

A three-dimensional binary (0/1) decision variable represents the employee assignments: if employee is assigned during time block to shift type ; 0 otherwise. Continuous auxiliary variables are also introduced to linearize and norms in the objective function and constraints.

a.2 Objectives and constraints of basic implementation

The overall objective function is defined as follows:

(1)

Where the individual objective terms are:

  • Deviation of employees’ workload from their targets

    (2a)
    (2b)
  • Deviation of employees’ weekend workload from their weekend workload targets

    (3a)
    (3b)
  • Violation of employees’ work preferences

    (4a)
    (4b)

where the weighting factors and lie in [0, 1] for every . and are norms, whereas and are norms.

All other requirements of employee rostering are implemented as hard constraints:

  • Employees must not be assigned to more than one shift type at any time.

    (5)
  • Employees are assigned to a shift type only if they have the license for it.

    (6)
  • Both “P” (on-call duty) and “OM” (outage planning) last 24 hours.

    For a particular index which corresponds to “P” or “OM”:

    (7)
  • Employees must not be assigned to any shifts when they are unavailable.

    (8)
  • Employees on vacation must not be assigned to any shifts during those times.

    (9)
  • Employees must have at least 16 hours of rest between any two switching operations shifts.

    For a particular index which corresponds to switching operations:

    (10)
  • Maximum allowed number of switching operations shifts per week per employee.

    Again, for a particular index which corresponds to switching operations:

    (11)

    where 21 comes from the fact that there are three (8-hour) time blocks per day and seven days per week. Minimum allowed number of shifts per week is implemented similarly:

    (12)
  • Minimum required number of rest Sundays per year.

    (13)
  • Cover requirements must be satisfied exactly.

    (14)
  • Minimum required number of rest days per year.

    Counting rest days amounts to counting instances of consecutive 24-hour periods throughout the planning horizon. Within a mathematical program, this is achieved using continuous and integer auxiliary variables in the constraints.

To solve the MILP within the hybrid methodology we used MATLAB and ILOG CPLEX 12.6.1.0 in the distribution available in TOMLAB 8.1.

a.3 Incorporation of company-defined work patterns

In the two-stage MILP used to incorporate company-defined work patterns (see Section 5.4), the second-stage problem admits the optimal solution of the first-stage problem and uses it as a parameter in a slightly altered objective function:

(15)

where the individual terms are described as follows:

  • is equal to the objective function (1) which sums up to , not 3.

    (16)
  • is equal to objective (4a) and quantifies employee preference violation.

  • The new objective term quantifies the deviation of employees’ schedules, , to their assigned company-defined work patterns, denoted .

    (17)
  • The closer the weight coefficient is to 0, the more priority is given to satisfying company-defined work patterns.