• Nem Talált Eredményt

A PROGRESSIVE APPROACH TO THE EMPLOYEE SCHEDULING PROBLEM

N/A
N/A
Protected

Academic year: 2022

Ossza meg "A PROGRESSIVE APPROACH TO THE EMPLOYEE SCHEDULING PROBLEM"

Copied!
6
0
0

Teljes szövegt

(1)

MultiScience - XXXIII. microCAD International Multidisciplinary Scientific Conference University of Miskolc, 23-24 May, 2019, ISBN 978-963-358-177-3

A PROGRESSIVE APPROACH TO THE EMPLOYEE SCHEDULING PROBLEM

Benedek Pintér1, Bence Kővári2 M.Sc. Student, Associate professor

Budapest University of Technology and Economics Faculty of Electrical Engineering and Informatics Department of Automation and Applied Informatics

ABSTRACT

Employee scheduling is a complex problem due to the wide varieties of requirements that can be drawn towards it. Furthermore, it is proven to be an NP hard problem. Artificial intelligence based methods became popular in the past few years on the field, but they cannot guarantee the quality of the resulting schedule nor the time they require to produce it. In this paper we present a progressive approach to the employee scheduling problem, which is flexible enough to tackle the wide varieties of requirements and is able to guarantee that it produces a result within a given timeframe. A case study shows different techniques to improve the execution time of the presented algorithm by 69% on the Scheduling Benchmarks data set.

INTRODUCTION

Employee scheduling by hand is a time consuming and tedious work where one has to take into account many requirements during the timetable construction.

The requirements usually consist of various labour laws, e.g. restrictions on maximum working hours and minimum rest periods, employer preferences e.g. find the cheapest possible schedule, and employee preferences e.g. requests for day offs.

Many of these requirements are contradictory thus finding the best possible compromise among them is a challenging task. The need arises to move the burden of scheduling to computers and researchers have been trying to automate the problem since the 1960’s [1]. A comprehensive survey on scheduling recommends that in general, metaheuristic approaches (simulated annealing, tabu search, genetic algorithms) give better results to complex scheduling problems, at the risk of unpredictable, long execution times and not providing a solution for every case [2].

Therefore, it is worth to try out other approaches with more predictable execution times and results like the progressive approach presented by this paper. This approach relies heavily on the linear assignment problem (LAP), hence the algorithm used to solve it has a reasonable impact on the total execution time of the approach.

RELATED WORK

The employee scheduling problem can be defined as assigning employees to tasks so that all the tasks have exactly one employee assigned to them [3]. There are many variations of the employee scheduling problem, like assigning people to shifts where more shift types exist and not everyone is able to do all types of shifts, or when

DOI: 10.26649/musci.2019.026

(2)

there are demands for two types of workloads at the same time and it is allowed to assign both workloads to one person. Usually the scheduling problems taken from reality are more complex than the ones that were made for experiments and researches and it is difficult to come up with a general solution that can solve most, if not all of the practical problems, because small changes in the problem definition can have a huge impact on what kind of algorithm is best suited for the problem. [4] summarizes the gap between practical and research employee scheduling in great detail.

Keeping the focus at simpler problems that were defined for research purposes, nurse rostering is a popular topic in scheduling papers. Many competitions and public data sets were made for it [5], [6], one of them, known as Scheduling Benchmarks New Instances [7] are used by this paper. These instances define a planning horizon ranging between 2 and 52 weeks, the employees and their labour contracts, which describes the circumstances under which an employee can work, the type of shifts and the required number of employees for each day of a given shift, days when a specific employee is unavailable and finally requests from employees either to work or to not work a specific shift on a specific day The number of employees ranges between 8 and 150 and the different types of shifts range between 1 and 32. A set of hard constraints are defined via the labour contracts, which cannot be broken, some of them are listed below:

- the minimum and maximum number of total minutes an employee can work during the horizon,

- the minimum number of minutes an employee must rest between two shifts, - the minimum number of consecutive days an employee must rest,

- the minimum and maximum number of consecutive days an employee can work,

- the maximum number of weekends an employee can have assignments on, where a weekend counts as having assignments on if the employee has shift either on Saturday or Sunday.

A few other soft constraints are also defined, which can be broken, but in exchange penalty points are given for them. Some examples are assigning a shift to an employee despite asking for a day off, or under- and overstaffing compared to the demanded number of employees. The Scheduling Benchmarks instances were specifically designed to be challenging to solve, they define resource deficient environments;

more can be read about the rules in [8].

A convenient way of solving the employee scheduling problem is going through the planning horizon and finding the cheapest employee-task assignments in every time period, where the cost of an employee-task assignment is calculated from the predefined requirements. This way the problem of finding the best assignment in a time period can be formulated as a linear assignment problem. Surprisingly it is not common to solve the employee scheduling problem with this approach, only a handful of papers seem to use a similar method, e.g. [9] and [10], and usually they are combined with other approaches.

(3)

Shift “A” Shift “B”

1 1.2 1.8 0.6

1.2 0.8 1.2 0.4 1 1.1

Employees for each time period:

Employee selection

Employee - Demand cost calculation

Employee - Demand matching (LAP) Demand

selection

CONTRIBUTIONS

In the following section we present an algorithm for the employee scheduling problem that solves an instance of the Scheduling Benchmarks dataset in a progressive, time forward manner.

The algorithm goes through the planning horizon, takes each day and finds the best employee-shift match for the given day. This process involves three main steps as Figure 1 shows: selecting the demands and employees for a given day, calculating the cost of each demand-employee pair, and finally finding the cheapest overall matching so that all the shifts are assigned to an employee.

Figure 1:

Main steps of the progressive algorithm (left) and the LAP as a graph (right) The demand for a number of employees on a given day, which is defined in the algorithm’s input, form one part of the bipartite graph. The soft constraints define that under- and overstaffing is possible, the handling of this option is not discussed in this paper. When selecting employees into the other part of the graph, we can use the information about their availabilities for filtering, which is known beforehand and does not change over time as the employees are being scheduled during the planning horizon. Further filtering opportunities are presented in the case study.

The next step after selecting the demands and employees for a day is to assign a cost to each pair that helps to select the best possible matches. The costs are calculated by functions, which represent the requirements, e.g. favours an employee who requested a specific shift on a specific day, or ensures that nobody is assigned to shifts on more weekends than it is allowed by the labour contract by giving a sufficiently high cost to the pair.

Another more complex example is the cost function that is responsible for the consecutive work days rule. In order to ensure that the employee has at least the minimum number of consecutive work days, a sufficiently small cost is given while there is work on the previous day but not enough in a row to fulfil the criteria.

Between the minimum and maximum number of consecutive working days a

(4)

relatively small cost is given to favour the employee compared to the others, so that their maximum workload can be leveraged in the resource deficient environment. In addition, this cost function can further improve the overall schedule by selecting the most appropriate employees to start their next burst of working days with the following calculation: a ratio is calculated for how many days one can work compared to their maximum allowed consecutive working days, and a cost based on this ratio is assigned to the employee-demand pair. Finally, a sufficiently high cost is assigned to the pair after the employee reached their maximum number of consecutive working days.

The result of all cost functions must be aggregated into a single cost which is calculated by taking their geometric mean so that the aggregated cost is within the boundaries of the minimum and maximum allowed values of the costs. When a cost function returns the maximum allowed value, the aggregate will be the maximum value as well, to ensure that an employee is indeed prevented to be assigned to any of the shifts.

The last step is to find a matching in the bipartite graph so that the sum of the selected edges’ weights is minimal. It ensures that the best possible assignments are selected into the schedule according to the initial requirements. This task is equivalent with the linear assignment problem. The matching can contain edges with maximum cost values; therefore, they must be excluded from the final schedule when processing the results.

To efficiently calculate the costs of the different requirements that are taken into account during the graph matching algorithm, a state is maintained for each employee. It is updated only when an event occurs in the system that has effect on the state, thus only those properties change from one time period to the other which are affected by some events, compared to the process of recalculating the complete set of state properties in every time period.

CASE STUDY

The following section compares different versions of the algorithm, in which two optimization techniques are performed.

The progressive scheduling algorithm relies heavily on the linear assignment problem, as it spends the majority of its time by calculating the minimum complete matching in the graph. Therefore, it is a good candidate to improve the overall performance. A well-known algorithm for the problem is the Hungarian method, which has an O(n4) computational complexity. It can be swapped with the Jonker- Volgenant algorithm to achieve better performance, which has an O(n3) complexity [11].

Another important factor is the input size of the linear assignment problem, which can be easily decreased by filtering out employees from the graph when it is known beforehand that an employee cannot be assigned to any of the shifts. The most obvious property to filter on is the availability of the employees, but more complex filtering can be applied as well by incorporating properties of the employees’

prevailing state, e.g. filter out those employees who cannot have work for the number of their minimum required consecutive days because some of these days are on

(5)

weekends, and the employee cannot work anymore on weekends on the planning horizon.

In case of scheduling 150 employees for 52 weeks, employee filtering improves the execution time by 37% with the Hungarian method and by 50% with the Jonker-Volgenant algorithm. Swapping the LAP algorithm to the Jonker- Volgenant variant yields in a 39% performance improvement when employee filtering is used and in 51% performance improvement employees were not filtered.

Altogether a 69% execution time improvement achieved during the benchmarks when both improvements were applied as Figure 2 shows.

To measure the execution times, each version of the algorithm ran 50 times in a row, and the average of the execution times was taken of the rounds. The environment used .NET Core 2.2 without tiered compilation on an Intel Core i7- 4650U with 8 GB of RAM.

1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0

Hungarian algorithm without employee

filtering

Hungarian algorithm with employee filtering

Jonker-Volgenant algorithm without employee filtering

Jonker-Volgenant algorithm with employee filtering

Figure 2:

Performance differences of using employee filtering and different LAP algorithms CONCLUSIONS AND FUTURE WORK

This paper presented a progressive approach to the employee scheduling problem that can guarantee a level of quality in the resulting schedule and an upper bound to the time it requires for the operation. Then, it compared the execution time of different versions of the algorithm and briefly explained the techniques to achieve better results. Overall, the performance could be improved by 69% between the initial and the optimized version of the algorithm.

Future work includes improvements on the quality of the resulting schedule by enabling re-scheduling on the planning horizon and by leveraging more information about the remaining part of the planning horizon in a given time period.

Since the requirements towards scheduling can vary highly, it is also advisable to examine the different approaches of the implementation of requirements and to study the commonalities among them in order to generalize their implementation and make them more robust.

Execution time (s)

(6)

ACKNOWLEDGEMENT

The research has been supported by the European Union, co-financed by the European Social Fund (EFOP-3.6.2-16-2017-00013, Thematic Fundamental Research Collaborations Grounding Innovation in Informatics and Infocommunications).

This work was performed in the frame of FIEK_16-1-2016-0007 project, implemented with the support provided from the National Research, Development and Innovation Fund of Hungary, financed under the FIEK_16 funding scheme.

REFERENCES

[1] H. Wolfe and J. P. Young, “Staffing the Nursing unit: Part I,” Nursing Research, pp. 236-242, 1965.

[2] E. K. Burke, P. De Causmaecker, G. Vanden Berghe and H. Van Landeghem,

“The State of the Art of Nurse Rostering,” Journal of Scheduling, pp. 441- 499, 2004., DOI: 10.1023/B:JOSH.0000046076.75950.0b

[3] A. Meisels and A. Schaerf, “Modelling and Solving Employee Timetabling Problems,” Annals of Mathematics and Artificial Intelligence, pp. 41-59, 2003., DOI: 10.1023/A:1024460714760

[4] S. Petrovic, ““You have to get wet to learn how to swim” applied to bridging the gap between research into personnel scheduling and its implementation in practice,” Annals of Operations Research, pp. 161-179, 2017., DOI:

10.1007/s10479-017-2574-4

[5] S. Haspeslagh, P. De Causmaecker, A. Schaerf and M. Stølevik, “The first international nurse rostering competition 2010,” Annals of Operations Research, pp. 221-236, 2010., DOI: 10.1007/s10479-012-1062-0

[6] S. Ceschia, N. Dang, P. De Causmaecker, S. Haspeslagh and A. Schaerf,

“The Second International Nurse Rostering Competition,” Annals of Operations Research, pp. 171-186, 2015., DOI: 10.1007/s10479-018- 2816-0

[7] E. K. Burke and T. Curtois, “New approaches to nurse rostering benchmark instances,” European Journal of Operational Research, pp. 71-81, 2014., DOI: 10.1016/j.ejor.2014.01.039

[8] T. Curtois and R. Qu, “Computational results on new staff scheduling benchmark instances,” [Online]. Available:

http://www.schedulingbenchmarks.org/papers/computational_results_on_new _staff_scheduling_benchmark_instances.pdf. [Accessed 22 March 2019].

[9] P. Franses and G. Post, “Personnel Scheduling in Laboratories,” International Conference on the Practice and Theory of Automated Timetabling, pp. 113- 119, 2002., DOI: 10.1007/978-3-540-45157-0_7

[10] A. A. Soukour, L. Devendeville, C. Lucet and A. Moukrim, “Staff scheduling in airport security service,” IFAC Proceedings Volumes, pp. 1413-1418, 2012., DOI: 10.3182/20120523-3-RO-2023.00169

[11] R. Jonker and T. Volgenant, “A shortest augmenting path algorithm for dense and sparse linear assignment problems,” Computing, pp. 325-340, 1987., DOI:

10.1007/BF02278710

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

Az új kötelespéldány törvény szerint amennyiben a könyvtár nem tudja learatni a gyűjtőkörbe eső tar- talmat, akkor a tartalom tulajdonosa kötelezett arra, hogy eljuttassa azt

● jól konfigurált robots.txt, amely beengedi a robo- tokat, de csak a tényleges tartalmat szolgáltató, illetve számukra optimalizált részekre. A robotbarát webhelyek

Az Oroszországi Tudományos Akadémia (RAN) könyvtárai kutatásokat végeztek e téren: a Termé- szettudományi Könyvtár (BEN RAN) szerint a tudó- soknak még mindig a fontos

Hogy más országok – elsősorban a szomszédos Szlovákia, Csehország, Ausztria, Szlovénia és Horvátország – nemzeti webarchívumaiban mennyi lehet a magyar

részben a webarchiválási technológiák demonstrá- lása céljából, részben pedig annak bemutatására, hogy egy webarchívum hogyan integrálható más digitális

Friedel Geeraert and Márton Németh: Exploring special web archives collections related to COVID-19: The case of the National Széchényi Library in Hungary.. © The

Service- level agreements (SLAs) are contracts between service providers and customers that define the services provided, the metrics associated with these services, acceptable

Based on the different work functions, an electronic interaction between Au particles and these oxides is proposed, which facilitates the formation of reactive negatively charged CO