Metaheuristics for handling Time Interval Coverage ... - CiteSeerX

7 downloads 0 Views 241KB Size Report
Edmund Burke1, Patrick De Causmaecker2, Sanja Petrovic1,. Greet Vanden .... The nurse rostering literature is described in more detail in (Burke et al., 2004) and (Cheang et al., 2003). ...... Journal of the Society for Health Systems, 2 (2),.
Metaheuristics for handling Time Interval Coverage Constraints in Nurse Scheduling Edmund Burke1 , Patrick De Causmaecker2 , Sanja Petrovic1 , Greet Vanden Berghe2 1 School

of Computer Science & IT, University of Nottingham, Jubilee Campus Nottingham NG8 1BB, UK, Tel: +44 115 9514206 Fax: +44 115 9514254, e-mail: {ekb,sxp}@cs.nott.ac.uk

2 KaHo

St.-Lieven, Information Technology, Gebr. Desmetstraat 1 9000 Gent, Belgium, Tel: +32 9 2658610, Fax: +32 9 2256269 e-mail: {patrick.decausmaecker,greet.vandenberghe}@kahosl.be

Abstract The problem of finding a high quality timetable for personnel in a hospital ward has been addressed by many researchers, personnel managers and schedulers over a number of years. Nevertheless, automated nurse rostering practice is not common yet in hospitals. Many head nurses are currently still spending several days per month on constructing their rosters by hand. In recent years, the emergence of larger and more constrained problems has presented a real challenge because finding good quality solutions can lead to a higher level of personnel satisfaction and to flexible organisational procedures. Compared to many industrial situations (where personnel schedules normally consist of stable periodic morning-day-night cycles) health care institutions often require more flexibility in terms of hours and shift types. The motivation for the research presented in this paper has been provided by real world hospital administrators/schedulers and the approach that we describe has been implemented in over 40 hospitals in Belgium. This paper consists of two main contributions: - Modelling the real world situation more accurately than has been done in the previous literature. - Presenting and evaluating an efficient and effective tabu search procedure to solve these problems (as represented in the real world model). The approach described in this paper concentrates on an advanced representation of the daily personnel requirements of healthcare institutions. We introduce ‘time interval’ personnel requirements. Instead of formulating the requirements as a number of personnel needed per shift type for each day of the planning period, time interval requirements allow for the representation of the personnel requirements per day in terms of start and end times of personnel attendance. This formulation enables the provision of a greater choice of shift work and part time work and reduces the amount of unproductive time because it enables the shifts to be split and combined. We present an algorithmic approach to handle this new formulation. We also set up a series of experiments which indicate that, not only does this approach take into account the requests and requirements of hospital schedulers, but it also generates higher quality schedules when compared with earlier approaches. The obtained results are better in the sense that various specific real world soft constraints can be satisfied by scheduling appropriate shift type combinations whereas in the shift type approach fixed shift types restricted the solution space.

Keywords: timetabling, personnel rostering, nurse scheduling, metaheuristics

1

1

Introduction

Constructing schedules that attempt to satisfy both the hospital requirements and the preferences of personnel has been the subject of previous research papers by the authors. This research has covered successful approaches to the problem such as hybrid tabu search (Burke et al., 1999), memetic algorithms (Burke et al., 2001a) and variable neighbourhood search (Burke et al., 2004a). The work is overviewed in the Handbook of Scheduling (Burke et al., 2004b). In this paper, we model the problem to deal better with the real world situation faced by many hospitals. The presented method aspires to accommodate the customs and practices employed by the personnel planners in hospitals and allows for a high flexibility in constructing good quality timetables. The approach described in this paper has been incorporated in a scheduling system, which has been implemented in over 40 Belgian hospitals. The software deals with some very specific and complex personnel rostering requirements in Belgian healthcare institutions. Sample datasets are available on http://ingenieur.kahosl.be/vakgroep/it/nurse/archive.htm. Since the 1960’s, many papers have been published on nurse rostering problems but the approaches for flexible shift types and time intervals are rare. We are particularly concerned, in this paper, with the real world nature of the problems tackled: the flexibility of defining shift types, work regulations, shift classes, the applicability in practice, etc. The earliest papers mainly discuss the formulation of the problem (Abernathy et al., 1973), (Miller et al., 1976), (Warner, 1976), (Warner and Prawda, 1972) and (Trivedi and Warner, 1976). These mathematical approaches deal with three shift types, usually referred to as Early, Late and Night, and cope with small scale problems only. From the 1980’s on, artificial intelligence techniques were introduced in automated nurse scheduling (declarative approaches, constraint programming, expert systems, etc). Some of these approaches are still relevant to today’s research issues and indeed, nurse scheduling researchers are still working in some of these areas. (Meisels and Lusternik, 1997) represent personnel rostering problems as constraint networks. The approach consists mainly of standard constraint processing techniques, which solve randomly generated test problems. In (Meisels et al., 1995), they combine constraint networks and rules. The described approach is implemented in a commercial software package which is particularly flexible with respect to defining constraints and shifts. Cyclical personnel rostering problems are generated using constraint satisfaction by (Muslija et al., 2000) and applied on real world examples. (Musliu et al., 2001) tackle the problem of shift design. They developed a local search approach for determining a set of possible shifts (with start and end times) for covering the personnel demand. The work of (Meyer auf’m Hofe, 1997) deals with generic techniques of partial constraint satisfaction for complex real world problems. In (Meyer auf’m Hofe, 2001), the same author builds on his previous research and describes a software system which is implemented in practice. The model enables users to flexibly define personnel requirements, provided that they are expressed in terms of shift types. (Winstanley, 2004) tackles the nurse rostering problem in a distributed way and presents a multi-agent architecture for solving it. Individual agents solve partial problems and they communicate with a central agent that applies constraint solving techniques. Many of the most recent papers (1990’s and later) tackle the problem with metaheuristic approaches. (Isken and Hancock, 1990) model variable starting times instead of three fixed shifts per day. They formulate their problem, which is (in other respects) rather simplified, as an integer problem. (Tanomaru, 1995) developed a genetic algorithm to solve a staff scheduling problem. Although the problem dimensions are very basic (one week planning horizon, low number of constraints, etc), this is another one of the very few research papers to allow flexible starting times for shifts. (Brusco et al., 1995) combine simulated annealing and local search to generate cyclical schedules for continuously operating organisations. They allow workers’ schedules to begin at any hour of the day. (Dowsland, 1998) presents a tabu search algorithm which combines different neighbourhoods and oscillates between feasible solutions meeting the personnel requirements and solutions concentrating on the nurses’ preferences. Problem specific knowledge is used both to guide the crossover operator and a hill-climbing operator, in a genetic algorithm developed by (Aickelin and Dowsland, 2000). The algorithm deals with a real world problem consisting of three different shift types, of which one shift type is scheduled separately. An evolutionary approach

2

called a co-operative genetic algorithm is applied to solve another 3-shift problem by (Jan et al., 2000). The tabu search model developed by (Chiarandini et al., 2000) allows for scheduling more than three shift types and enables work locations to be taken into account. A very similar problem is presented by (Schaerf and Meisels, 1999). Employees are assigned to tasks that are performed during predefined periods in time, called shifts. They propose a very promising ‘generalised local search’ approach, but the considered examples are rather small (very few constraints and a planning period of one week). Some problems are not explicitly restricted to the three ‘non-overlapping’ shifts regime. (Hung, 1991) schedules three slightly overlapping 10-hour shifts with a simple mathematical algorithm. All approaches in (Chiarandini et al., 2000), (Meyer auf’m Hofe, 1997 and 2001), (Meisels and Lusternik, 1997), (Meisels et al., 1995) facilitate the scheduling of more than three shift types. A case-based reasoning approach that learns from experienced schedulers in the field forms the basis of the research presented in (Petrovic et al., 2002) and (Beddoe and Petrovic, to appear). The approach is developed for solving real-world problems and it appears that a simple 3-shift model is not applicable. In order to satisfy the coverage and the contractual constraints, the model combines four basic shift types with a number of shifts having modified start and end times. (Aickelin and Li, to appear) developed an algorithm based on Bayesian networks which allows to learn from past solutions. (Parr and Thompson, to appear) compare SAWing and Noising methods for the nurse rostering problem. The Noising algorithm both outperforms results obtained with simulated annealing and manually generated results of a number of hospital wards. (Bard and Purnomo, 2005) present a column generation method for a complex nurse rostering problem. The same problem is addressed by relaxation approaches (Bard and Purnomo, to appear) in which relaxation of preference constraints and demand constraints are investigated. Although the shift types are set (there are 5 in total), the approach is unique in the formulation of four (fixed) time intervals for expressing the coverage. There is no one-to-one match between shift types and time intervals. The problem tackled in (Burke et. al 2001a and 2001b) allows for a broad application in practice, by enabling user defined hard and soft constraints, user defined work regulations and shift types, non-hierarchical skill classes, etc. The nurse rostering literature is described in more detail in (Burke et al., 2004) and (Cheang et al., 2003). One of the main conclusions of (Burke et al., 2004c) is that the major challenge for future researchers in nurse rostering is to model and solve real world problems. The personnel requirements are, throughout the literature, nearly always expressed as a number of people required per shift type or even per day. We developed a much more flexible approach which is the result of feedback from the users of this system in several Belgian hospitals. Not only is the number of possible shift types higher than in most problems encountered, but also the approach to compose a schedule with different combinations of shift types is rather unique. Section 2 elaborates on the problem definition, starting from the real world hospital practices that induced the development of the time interval requirements presented in this paper. In Section 3, the hybrid tabu search procedure to construct a shift type schedule from time based personnel requirements, is presented. The method preserves the desirable features of the metaheuristics which were developed in (Burke et al., 2001a). Examples which illustrate the working of the algorithms are given in Section 4. In Section 5, we discuss the impact of the time interval requirements method on the resulting timetable. A comparison with the shift based approach is presented and we conclude in Section 6.

2 2.1

General Problem Definition Terminology

The personnel rostering terminology used throughout this paper is briefly explained in this section. - Skill category: People can be assigned to certain duties and this assignment depends upon their skill category. Unlike some nurse rostering problems described in the literature, skill categories in this research are not hierarchically overlapping by default, which is in line with current practice in Belgian hospitals. Personnel members can, however, move into higher skill categories by experience, promotion or after

3

successfully taking exams. In addition to a personnel member’s main skill category, they can have a list of alternative skill categories. This enables the user to assign staff to these alternative skill categories when there is a particular shortage in personnel. In fact, it is often the case in practice that a regular nurse will temporarily fill in for the head nurse, as long as no decision making tasks are scheduled. - Shift type: A shift type is a personnel task with a fixed start and end time. Elementary examples of shift types in hospitals are presented in Table 1. The data has been taken from a real hospital case. - Personnel requirements are often referred to as coverage constraints. They express, for each skill category, the number of personnel that is needed to staff the ward. They are set by the management and are usually expressed in terms of the minimum and the preferred number of personnel. The minimum number of personnel strictly meets the personnel needed to do all the work while the preferred number of personnel provides the desired working atmosphere by reducing the workload of staff members. The requirements can be formulated either in terms of shift types (which is the shift type approach used in the literature) or in terms of begin and end times (the time interval requirements, introduced in this paper). The personnel requirements depend on the time of the day, the day of the week, etc. Shift types Short Early Early Day Late Short Late Night

From 7:00 7:00 8:00 13:00 15:00 21:00

To 13:00 15:00 17:00 21:00 21:00 7:00

Table 1: Set of shift types; DATASET 1

Shift Type Short Early Early Day Late Short Late Night

Personnel Required Head Nurse Regular Nurse Nurse Aid 1 1 1 0 2 1 1 1

Table 2: An example of daily personnel requirements in a ward, formulated in terms of the shift types from Table 1

2.2

Hard and Soft Constraints

Personnel timetables in hospitals are usually presented as a roster showing which shift types are assigned to which personnel member. The nurse rostering problem consists of finding a schedule that matches the personnel requirements (the hard constraints) while meeting, to the best possible extent, the constraints on the schedules set by the individual personnel members (the soft constraints in this model).

4

Hard constraints are those that must be satisfied at all costs. We call a feasible solution one that satisfies the following hard constraints: - all the shifts required to staff the ward at any time have to be assigned to a personnel member - one person cannot be assigned to the same shift on the same day more than once - shifts can only be assigned to people of the required skill category. Soft constraints are those which are desirable but which may need to be violated in order to generate a workable solution. All the constraints on personal schedules are categorised as soft constraints in this approach. They are all modifiable and the system thus allows for a wide applicability. There are certain rules which hold for the entire hospital. For example, in Belgium, a preferred minimum time is stipulated between two consecutive assignments. Another set of soft constraints is the same for all the people with the same contract (full-time, half-time, night nurses, etc). Examples are restrictions on the number of hours worked, the succession of different shift types and arrangements concerning consecutive weekends. When individual personnel members have an agreement with the personnel manager or head nurse, constraints induced by personal requests can be actioned. For more details about possible soft constraints, see (Burke et al., 2004c). The cost function determines the quality of a schedule. It is a modular function, summing per personnel member all the violations of soft constraints (Burke et al., 2001b). The extent to which each soft constraint is violated is multiplied by a cost parameter. The users of the software system are free to adjust the weight factors to match their house rules and preferences. Some constraints affect the schedule of several personnel members at the same time, e.g. balancing the workload (overall, during the weekend, night shifts, etc).

2.3 2.3.1

Personnel requirements Shift Type Requirements

Table 2 presents an example of personnel requirements on a certain day of a planning period (expressed as a number of required shift types per skill category). The personnel requirements are hard constraints, i.e. hospital wards should always have enough skilled people available to carry out the work. 2.3.2

Time Interval Requirements

Although shift type requirements are the most common way for defining the personnel coverage, it is an entrenched habit (within some hospitals) to think in terms of the number of personnel required from hour to hour. We found that manual planners tend to not always define their personnel needs as a combination of shift types (as in Table 2, which presents a simplification of the real-world problem). Therefore, we broadened the framework for defining the daily staff complement, since the formulation used by hospital planners often allows for a higher flexibility in constructing the timetables. If we deduce the personnel requirements from the shift types it is possible to allocate several kinds of part-time employment over the shift period. We call this new representation ‘time interval personnel requirements’ because they are expressed as a varying number of personnel needed for each skill category throughout the day. The main goal of the approach described in this paper is to construct a timetable covering all the personnel requirements, only assigning the current shift types of the hospital. In practice, the time intervals will not always correspond exactly to the start and end time of actual shift types. Compared to our previous work (Burke et al.,1999), (Burke et al., 2001a) and (Burke et al., 2001b), (Burke et al., 2004a) the time interval requirements method changes the size and structure of the problem. On the one hand, the problem definition becomes more intricate and the complexity of constructing feasible solutions increases. We must find a satisfactory combination of the shift types used in the hospital to fulfil the time interval requirements. On the other hand, the search space is considerably enlarged. This formulation creates an extra degree of freedom to construct a high quality timetable, because the time interval requirements can usually be met with different combinations of shift types. Considering the shift types given in Table 1, the period from 7:00 to 21:00 can be covered with a {Short

5

Early - Late} combination but also with an {Early - Short Late} set. In the shift type approach (Burke et al., 2001a), the user has to determine the shift type combination as part of the input data, thus restricting the number of possible solutions. By switching between satisfying shift type combinations, we can try to improve the quality of the personal timetables (see Section 3.2).

2.4

Representation

In order to formulate time interval personnel requirements, we need: - The shift types with their start and end times. - A depiction of which shift types can form legal sequences: when shift types are consecutive we say that they are joined together tightly. The implication for the time interval personnel requirements approach is that such shift types can be replaced by another shift type covering the time intervals which were covered by both individual shift types. In practical applications, however, it is often the case that time gaps or overlaps are not considered to be restrictive. A detailed example is explained later on in Section 4. - The number of personnel needed for each skill category in terms of time intervals. An elementary real world example (DATASET 1), that we even simplified for clarity’s sake, is used to explain the formulation of time interval personnel requirements. The problem consists of the 6 different shift types, presented in Table 1. In practice, legal sequences of shift types are not always as obvious as in this example. Sometimes a gap or an overlap between consecutive shifts does not cause problems at all. In many real world situations, an overlap in time is required to consider shift types as joined together tightly. It is often necessary for two colleagues to have a discussion between shift changes. This can lead to situations in which a 7:00-15:00 cannot be replaced by a 7:00-11:00 – 11:00-15:00 couple. There are other examples in hospitals where there is no great penalty in having an interval between shifts. Cleaner’s and Nurse Aid’s tasks, for example, are not necessarily uninterrupted. In order to construct good timetables, it is important to know which shift types can precede or follow others without affecting the hospital activities. In the DATASET 1 example, the shift types that join together tightly are those that are considered to be consecutive in terms of time (see Table 3). To reduce the complexity of the example (for explanation purposes), we assume that the situation described in Table 3 holds for all the skill categories. Table 4 presents the personnel requirements per day of the week (taken from a real case). Both the minimum and the preferred number of required personnel are given. Short Early Short Early Early Day Late Short Late Night

Early

Day

Late x

Short Late

Night

x x x x

x

Table 3: Shift types that join together tightly in DATASET 1

3

The Metaheuristic Procedure

The method discussed in this paper is a two-step approach towards a high quality schedule: an initialisation algorithm and a metaheuristic procedure. The goal of the first step is to find a solution which

6

Days Monday

Head Nurse From Till 8:00 17:00

Min 1

Pref 1

Tuesday

8:00

17:00

1

1

Wednesday

8:00

17:00

1

1

Thursday

8:00

17:00

1

1

Friday

8:00

17:00

1

1

Saturday

Sunday

Personnel Required Regular Nurse From Till Min Pref 0:00 7:00 1 1 7:00 13:00 2 3 13:00 21:00 2 2 21:00 24:00 1 1 0:00 7:00 1 1 7:00 13:00 2 3 13:00 21:00 2 2 21:00 24:00 1 1 0:00 7:00 1 1 7:00 13:00 2 3 13:00 21:00 2 2 21:00 24:00 1 1 0:00 7:00 1 1 7:00 13:00 2 3 13:00 21:00 2 2 21:00 24:00 1 1 0:00 7:00 1 1 7:00 13:00 2 3 13:00 21:00 2 2 21:00 24:00 1 1 0:00 13:00 1 1 13:00 15:00 2 2 15:00 24:00 1 1 0:00 13:00 1 1 13:00 15:00 2 2 15:00 24:00 1 1

Nurse Aid From Till 8:00 17:00

Min 1

Pref 1

8:00

17:00

1

1

8:00

17:00

1

1

8:00

17:00

1

1

8:00

17:00

1

1

8:00

17:00

1

1

8:00

17:00

1

1

Table 4: Minimum (‘Min’) and Preferred (‘Pref’) personnel requirements of DATASET 1 for a period of one week and for three different skill categories satisfies the hard constraints, without taking into account the soft constraints on the personal schedules. A consistency check algorithm, which performs some simple controls on the input data, informs the user of the system about infeasibilities (hard constraint violations). This algorithm provides assistance in setting the constraints by enabling the adjustment of the personnel requirements or the number of available personnel in the ward. The details of this algorithm are presented in (De Causmaecker and Vanden Berghe, 2002). In the second step, an efficient hybrid tabu search algorithm (Burke et al., 2001a) is applied, in which the required shift types are set. The metaheuristic algorithms will never violate the hard constraints in their process of finding a schedule matching as many soft constraints as possible.

3.1

Initialisation

The initialisation phase employed in the previous approach (Burke et al., 2001a) is maintained in the algorithms described here. The first part of this section summarises the main ideas behind the initialisation. One extra initialisation step has to be performed to translate the personnel requirements from time intervals to shift types. The result of this step is the input for the regular initialisation step (see Fig. 3 in Section 3.3). The procedure is explained in the latter part of this section.

7

3.1.1

Shift type approach

The only aim of the initialisation step is to construct a feasible solution. The quality of the solution is not taken into account because the scheduling algorithms (described in Section 3.2) can cope with any input, as long as it does not violate any hard constraints. Constructing an initial schedule is straightforward, provided that there are enough skilled people in the ward. We distinguish three options for constructing the initial schedule: starting from the current schedule (if that already exists), starting from the schedule of the previous planning period, or creating a completely random initial schedule. Details of the constructive initialisation algorithm can be found in (De Causmaecker and Vanden Berghe, 2002). 3.1.2

Time interval approach

The main goal is to find, for every day of the planning period, shift type combinations that fulfil the personnel requirements. Of course, random ‘time interval demands’ will not lead to feasible shift type combinations. Infeasibilities are reported and assistance is given to planners for setting feasible constraints by either adding appropriate shift types to the problem or by modifying the constraints. Due to the consistency check procedure, the problems are always solvable and we never encountered real world problems with very large numbers of different shift types. For problems of this complexity, a simple mathematical programming algorithm can produce optimal solutions in negligible computation time. In the algorithm, we try to find a set of shift types for which, at each point in time, the personnel requirements are satisfied without a surplus of personnel. If the set contains shift types that ‘join together tightly’ without an exactly matching start and end time, corrections are taken into account. In practice, we enumerate all possible solutions using linear programming and afterwards we choose at random among these possibilities. The method used to translate the time interval personnel requirements into shift type combinations, described in Fig. 1, will only work if at least one shift type combination exists which matches the time interval requirements.

3.2

Improving the quality of the schedule

The aim of the scheduling algorithm is to reorganise the assigned shifts in order to diminish the value of the cost function. In this part of the nurse rostering algorithm, metaheuristics are applied to the preliminary schedule in order to reduce violations of the soft constraints. For this step, we can build upon the algorithms that were developed for the shift type requirements in previous research (Burke et al., 1999 and 2001a). In this section we will first summarise the main ideas of the original methods before we describe the new algorithms in detail. 3.2.1

Metaheuristics in the shift type environment:

In (Burke et al., 1999 and 2001a), the details of a metaheuristic approach are introduced. An initial tabu search algorithm used an environment where shifts can be moved from one person to another on the same day. This step will be referred to as a ‘move’. The only restriction on the moves is to conserve the satisfaction of hard constraints. A shift for a certain skill category can thus not be moved to a person who is not qualified to do it. The move of a shift to a person who is already assigned to this shift on the day considered is also forbidden (according to the second hard constraint). This part of the tabu search algorithm is the basic part. It provides solutions for the impatient scheduler who is, for instance, only interested in testing whether the preferred holiday periods of some nurses are realistic. The algorithm is not powerful enough to produce high quality schedules. To obtain such solutions, we developed hybridisations of the tabu search algorithm. Depending on the required quality of the result, the hospital planner can choose among several planning options. The most time consuming option goes repeatedly through all the hybridisation phases and thus provides a high quality result. One of the hybridisations (complete weekends) consists of solving one particular soft constraint, namely the requirement to either have a weekend free or to work the entire

8

DEFINE - TIMELIST: ordered list of length Ltimelist containing all the start and end times in the time interval requirements in addition to all the start and end times of the shift types, duplicates are removed. - REQUIREMENT: ordered list of length Ltimelist containing the personnel requirements for the corresponding time in TIMELIST. - SOLUTION: list of length N (number of shift types) giving the number of appearances for each corresponding shift type in the solution. - START, END: two lists of length N, giving the start and end times of the corresponding shift types. - JOIN: 1/0 matrix with dimension N*N depicting the shift types which join together tightly. - RELAXATION: list of length Ltimelist , the elements of the list give the relaxation of the personnel requirements according to the JOIN MATRIX. ∀ shift types A,B and ∀ x ∈ TIMELIST IF JOIN[A][B]=1 IF(END[A]< x AND x ≤ START[B]) THEN RELAXATION[x]=min{SOLUTION[A],SOLUTION[B]} ELSE IF(START[B] ≤ x) AND (x < END[A]) THEN RELAXATION[x]=-min{SOLUTION[A],SOLUTION[B]} ELSE RELAXATION[x]=0 - AVAILABLE: list of length Ltimelist , for each element x giving the number of personnel scheduled at time TIMELIST[x] according to SOLUTION and taking RELAXATION into account AVAILABLE[x] P = s (SOLUTION[s]+RELAXATION[x])*((START[s] ≤ TIMELIST[x]) AND (TIMELIST[x] < END[s])) - DIFFERENCE: list of length Ltimelist , for each element x depicting the difference between REQUIREMENT[x] and AVAILABLE[x] SOLVE THE LINEAR PROBLEM: ENUMERATE all possibilities for SOLUTION SUBJECT TO DIFFERENCE[y] ≤ 0 ∀y

Figure 1: Algorithm for the initialisation phase in case of time interval personnel requirements

9

weekend. While solving this constraint to the highest possible extent, the solution moves to a completely different part of the search space, because the other constraints are not taken into account. We consider this as a diversification move, after which the simple tabu search algorithm can run again. A second hybridisation (worst personal schedule) aims at improving the worst personal schedule by switching a big part (between one day and half of the planning period) of this schedule with somebody else’s schedule. The algorithm will choose the best possible switch but it can still worsen another person’s schedule. In any case, the simple move algorithm will be applied to search for better solutions afterwards. The third major hybridisation step (greedy shuffling) is a rather time consuming step. It is popular among users, though, because it is almost impossible to manually improve a solution generated in this way. This step exhaustively searches the environment of all possible switches between parts (again going from one day to half of the planning period) of two nurse’s schedules. Neither of the hybridisations considered allow violations of hard constraints. 3.2.2

Metaheuristics in the time interval requirements environment:

In this compound algorithm, shift types in the personal schedules will be moved from one person to another while the shift type combinations satisfying the personnel requirements will be varied (these are the ‘swaps’ in Fig. 3; Section 3.3). In this alternating system, the possibility of satisfying the personnel requirements with different shift type combinations enlarges the solution space which affects the calculation time considerably. In order to keep the execution time down, we have tuned the alternation of ‘moves’ and ‘swaps’ experimentally by adjusting the stop criteria for each of them (see Fig. 2). The algorithm starts with the tabu search ‘moves’ until the stop criterion for the moves is reached (which is a number of iterations without improvement). In the time interval personnel requirements approach, we allow for a diversification by making ‘swaps’ in the schedule instead of immediately switching to the hybridisations. For every day of the planning period, the algorithm searches all possible alternatives for the shift type combinations. The best one of these swaps will be performed in any case (even if the quality of the schedule deteriorates). The cost function in use (Burke et al., 2001b) allows for a quick calculation of the best people to which to assign the new set of shift types. Suppose, for example, that person A works during the period 8:00-17:00 and that we want to swap that shift type to 8:00-12:00 13:00-17:00 (provided they are defined as joined together tightly). Our algorithms will find (considering the current schedule) the best (in terms of the cost function) personnel pair B and C to carry out the 8:00-12:00 and the 13:00-17:00 shift type. The swap step will be repeated until it worsens the schedule. After swapping, it is very likely that some tabu search moves will enable an improvement of the schedule again. This combined process of moves and swaps is repeated until another stop criterion, calculating the iterations without improvement, is reached. Depending on the problem characteristics and on the wishes of the planner, the next step is one of the hybridisations described above. The dimensions of the problem, (the number of personnel to be scheduled, the number of different shift types, the duration of the planning period, etc) will influence the size of the solution space. The dimensions will depict the overall stop criterion as well as the stop criteria for the moves and hybridisations. Fig. 2 demonstrates the most advanced option, in which all the hybridisation steps are executed.

3.3

Diagram of the modules

In this section we demonstrate where the newly developed parts of the algorithm are situated. The initialisation and hybridisations, which are summarised in Section 3.1 and 3.2, and fully elaborated in (Burke et al., 2001a), are represented by a single frame in Fig. 3. The diagram only shows that part of the scheme which is affected by the time interval personnel requirements. In the case where the personnel requirements are expressed as time interval requirements, the pieces in dashed frames are employed. The software can still be used in the original way (with shift type personnel requirements) and it then simply skips the parts of the algorithm represented by dashed boxes in the diagram.

10

INITIALISE schedule X (result of Fig. 1) BEST SCHEDULE=X; number steps=0 WHILE (number steps < maximum number steps) number moves=0; number swaps=0; weekend step=0; worst personal schedule=0 WHILE (number moves < maximum number moves) X’=move(X) IF (f (X 0 ) < f (BEST SCHEDU LE)) number moves=0, number steps=0, BEST SCHEDULE=X’ ELSE number moves=number moves+1, number steps=number steps+1 X=X’ END WHILE (number swaps = 0) X’=swap(X) IF (f (X 0 ) < f (BEST SCHEDU LE)) number steps=0, BEST SCHEDULE=X’ ELSE number swaps=number swaps+1 X=X’ END IF (number weekend steps < maximum number weekend steps) X’=WEEKEND STEP(X) IF (f (X 0 ) < f (BEST SCHEDU LE)) number steps=0, BEST SCHEDULE=X’ ELSE number weekend steps=number weekend steps+1 X=X’ END ELSE WHILE (worst personal schedule=0) X’=WORST PERSONAL SCHEDULE(X) IF (f (X 0 ) < f (BEST SCHEDU LE)) number steps=0, number weekend steps=0, BEST SCHEDULE=X’ ELSE worst personal schedule=worst personal schedule+1 X=X’ END END BEST SCHEDULE=GREEDY SHUFFLING(BEST SCHEDULE) maximum number steps, maximum number moves and maximum number weekend steps are calculated before the algorithm starts as function of the dimensions of the search space, f denotes the cost function

Figure 2: Heuristics for the scheduling phase when using time interval personnel requirements

11

Hybrid Tabu Search Algorithm Initialisation Shift Types moves

?



hybridisations

6

Initialisation

-

? swaps

Hard Constraints

? Result

Figure 3: Diagram of the heuristics for the nurse rostering problem with time interval personnel requirements

4

Examples

Considering the real world example given in Tables 1, 3 and 4; there are three feasible shift type combinations on weekdays for the minimum, and also three for the preferred requirements. If we consider a schedule that does not violate either of them, six different combinations of shift types can satisfy the (Regular Nurse’s) personnel requirements on the weekdays Monday to Friday (see Table 5). Both the

Short Early Early Day Late Short Late Night

Minimum Requirements MC1 MC2 MC3 2 1 1 2 2 1

1 1 1

Preferred Requirements PC1 PC2 PC3 3 2 1 1 2 2

2 1

1

1 1 1

2 1

Table 5: Possible solutions for the Regular Nurses on a weekday (DATASET 1) MCx: Minimum personnel requirements shift type Combination; PCx: Preferred personnel requirements shift type Combination; the index x denotes the number of the combination feasible shift type combinations for the minimum personnel requirements (denoted by MC) and for the preferred personnel requirements (PC) are given. The results for the weekend requirements are presented in Table 6. In this table, we can see that only one combination satisfies the personnel requirements. In order to study the mechanism of the swaps, we have counted (in a period of one month) the number of appearances of each shift type combination (initially and after the algorithm). The results for the weekdays only are displayed in Table 7. The swap algorithm has given preference to the second solution (MC2 in Table 7). This is most probably due to the character of the personnel constraints. In the DATASET 1 example, there was a restriction on the maximum number of each shift type a person could work during the planning period. The solutions MC1 and MC2 both combine a lower number of shift types, which could in some circumstances lead to violations of the particular constraint. The next illustrative example (Tables 8, 9, 10 and 11) is also one of the easier problems that was taken from a real hospital ward. The shift types are represented by an abbreviation from the (Dutch) names given in the particular hospital. The example illustrates the extra difficulty of the joined tightly constraint of shift types. It is easy to understand that the shift types Vk and D2 join together tightly. 12

Minimum Requirements

Preferred Requirements

1

1

1

1

1

1

Short Early Early Day Late Short Late Night

Table 6: Possible solutions for the Regular Nurses on a weekend day (DATASET 1)

Initially Result after the algorithm

MC1 6 2

MC2 8 13

MC3 6 5

Table 7: Appearance of the shift type combinations in the initial solution and in the final result (DATASET 1); MCx: Minimum personnel requirements shift type combination with index x (Table 5) Vk lasts till 10:00 and D2 starts at 10:00. The impact of this characteristic is that replacing one person working before and after 10:00 by two people who switch shifts at 10:00 does not affect the coverage of the work schedule. In the example, the only exceptions to the expected shift-type-joins are D2-LL and Lk-LL, as can be derived from Table 9. The joins are exceptional because both D2 and Lk last until 18:00 and LL starts at 17:00. Fig. 4 illustrates possible swaps between shift type sets. A nurse working the L shift (from 14:00 till 22:00) can be replaced by two colleagues working the Lk shift (from 14:00 till 18:00) and the LL shift (from 17:00 till 22:00) respectively, because of the allowed sequences. The opposite swap is more notable, because, if we replace two nurses (both in the Lk and the LL shift) by one carrying out the L shift; the number of personnel in the ward between 17:00 and 18:00 is reduced by one. Fig. 4 also demonstrates how 2 people (working the VV and L shift) can be replaced by 3 people in the Vk, D2 and LL shift, and vice versa. From these allowed ‘swaps’ in shift types, others can be derived, as shown in the last line of Fig. 4.

Lk + LL ↔ L V V + L ↔ V k + D2 + LL

V V + Lk

⇓ ↔ V k + D2

Figure 4: Possible swaps between shift types of DATASET 2

5

Test Results

Solutions that are not satisfying the hard constraints in the shift type approach (Burke et al., 2001a), can be constructed by the swap steps in the time interval requirements model. However, due to the increased complexity, there is no direct and simple way to compare the new model and algorithms to the previous

13

Shift types VV Vk V D2 Dk L Lk LL N

From 6:00 6:00 8:00 10:00 8:00 14:00 14:00 17:00 22:00

To 14:00 10:00 17:00 18:00 12:00 22:00 18:00 22:00 6:00

Table 8: Shift types in DATASET 2 Join tightly VV Vk V D2 Dk L Lk LL N

VV

Vk

V

D2

Dk

L x

Lk x

LL

N

x x x x x x x

x

Table 9: The shift types that join together tightly in DATASET 2 ones. We have developed a particular method to compare both approaches. First, we run tests on shift type and time interval requirements datasets, each with the developed algorithms for the problem type. Afterwards, tests have been carried out on the two kinds of datasets, Shift Type Algorithms (eliminating the swaps) for the time interval requirements dataset and Time Interval Algorithms (enabling swaps) for the shift type dataset. Schematically, both kinds of experiment, set up for comparison reasons, are: - Allowing ‘swaps’ in a ward with shift type personnel requirements. - Omitting the ‘swaps’ in a ward with time interval personnel requirements. We now compare the following algorithms: - Algorithm constructed for the shift type personnel requirements. - Algorithm for the time interval personnel requirements (subject of this paper). For the purpose of comparison, the scheduling algorithm chosen is the TS1 algorithm which consists of moves and the first two diversification steps (described in detail in (Burke et al., 2001a)). TS1 consists of the tabu search moves combined with the ‘complete weekends’ and ‘worst personal schedule’ hybridisations discussed in Section 3.2. The results of the experiments with data obtained from real hospital cases are presented in Tables 12 and 13. The column Value represents the value of the evaluation function. The duration of the calculations on an IBM Power PC RS6000 is given in the column entitled ‘Calculation Time’. It was necessary to reformat the input data slightly for these tests. We will explain here how the user data constructed for the shift type formulation is made fit for the time interval approach and vice versa. In the shift type problem 1 (STP1: 12 people, 6 shift types), we defined the shift types which join together

14

From 00:00 06:00 08:00 17:00 18:00 22:00

To 06:00 08:00 17:00 18:00 22:00 24:00

Requirements 1 2 4 3 2 1

Table 10: Personnel requirements for a single qualification on one day (DATASET 2) Combinations VV Vk V D2 Dk L Lk LL N

C1 2 2 2

C2 2 2

2 2 1

1

C3 1 1 2 1

C4

C5

2

2

2 2 1

1 1 1 1

1 1 1

C6 1 1 2 1

C7 2

C8 2

2

2

1 2 1

2 2 1

1 1 1 1

Table 11: Possible shift type combinations satisfying the daily personnel demand of DATASET 2 tightly in the most careful way. Gaps and overlaps are forbidden and thus shift type swaps are only allowed if they cover exactly the same time period. For the second problem (STP2: 20 people, 8 shift types), we constructed more possibilities for the swaps. There is a case in which we allow a swap with a 30’ overlap and legalise another swap with a 60’ gap. The test data formulated as time interval requirements problems, already introduced as DATASET 1 and DATASET 2, required reformatting in order to match the shift type formulation. Translating the time interval requirements into shift type personnel requirements, which is necessary to create an input for the Shift Type Algorithm, was performed in two different ways. TIP1 and TIP2 are slight variations of DATASET 1; TIP3 is the DATASET 2 problem. In the first approach (TIP1), the requirements are equal to the combination of shift types that is the first solution obtained by the mathematical programming algorithm described in Fig. 1. Several days of the planning period have exactly the same time interval requirements, and therefore the result in terms of shift type requirements will be the same on these days. The TIP2 data set was constructed from the same original set as TIP1, but it differs in the translation to shift type requirements. Instead of selecting the first shift type combination that matches the time interval requirements (obtained by the mathematical programming algorithm in Fig. 1), we selected a random solution for every day of the planning period. Just like TIP2, the daily shift type combinations of TIP3 have been chosen randomly from the possibilities in DATASET 2. Experiments aiming at exactly matching the minimum personnel requirements (‘Minim Requirements’ in Tables 12 and 13) and with a feasible domain between the minimum and the preferred personnel requirements (‘Min-Pref’) obviously lead to different results. For the sake of clarity, we briefly explain the details of these options. There is only a minor difference between the Minimum Requirements and the Min-Pref option. After carrying out the TS1 part of the program, an additional algorithm searches the best (not increasing the value of the cost function) personnel members to assign extra shift types to. These extra shift types will not be added if the preferred number of personnel is already scheduled on that particular day. In (De Causmaecker and Vanden Berghe, 2002), the procedure and the difference between ‘Minimum Requirements’ and ‘Min-Pref’ are explained in detail.

15

Shift Type Problem STP1 STP2

Shift Type Algorithm Time Interval Algorithm Shift Type Algorithm Time Interval Algorithm

Minimum Requirements Value Calculation Time 643 8’27” 511 1h15’36” 1862 21’44” 1009 3h57’12”

Min-Pref Requirements Value Calculation Time 618 8’31” 500 1h18’07” 1715 22’13” 932 5h24’30”

Table 12: Test results of the Shift Type and Time Interval Algorithm on a problem with a shift type personnel demand formulation The calculation time for the Time Interval Algorithm is much higher than for the Shift Type Algorithm. The conclusion holds for both experiments (Tables 12 and 13). This is according to our expectations because the number of feasible solutions is increased considerably by not restricting the schedule to a given shift type combination. In all the test examples, the quality of the result is better for the Time Interval Algorithm. Splitting long shift types into two or more shorter shifts and assigning them to different people, or vice versa, can overcome soft constraint obstacles in the personal schedules. Although the TIP1 and TIP2 data set of Table 13 are basically the same, it is not surprising that the Shift Type Algorithm produces better results for the TIP1 variant. Since the shift type combinations are chosen randomly in TIP2, the initialisation results in a wide variety of daily shift type combinations. The Shift Type Algorithm has no swap steps thus the scattered shift type combinations will be maintained during further calculations. Many soft constraints (e.g. the minimum number of consecutive shifts of the same type) are much easier to solve when the shift types on consecutive days are equal. The considerable increase of the solution space, due to the high number of shift type combinations satisfying the requirements, can be observed from the calculation time of TIP3. No further comparison is possible because, so far, there are no other approaches for solving this particular problem.

6

Conclusion

In this paper, we introduced an efficient and effective metaheuristic procedure for handling time interval coverage constraints in nurse rostering. Time interval personnel requirements have been identified to reflect the particular difficulties that hospital planners face when automating their personnel rostering process. The presented model generally matches the real world practice in hospitals much better than the more common shift type requirements did. It enables planners to flexibly address the strongly varying personnel coverage necessities that hospitals usually deal with. Work can be structured more around Time Interval Problem TIP1 TIP2 TIP3

Shift Type Algorithm Time Interval Algorithm Shift Type Algorithm Time Interval Algorithm Shift Type Algorithm Time Interval Algorithm

Minimum Requirements Value Calculation Time 1555 4’20” 1197 1h47’08” 1799 5’54” 1197 1h47’08” 2641 17’27” 1622 5h08’48”

Min-Pref Requirements Value Calculation Time 1456 4’34” 1014 3h59’46” 1714 6’04” 1014 3h59’46” 2598 18’04” 1014 12h57’27”

Table 13: Test results of the Shift Type and Time Interval Algorithm on a problem with a time interval personnel demand formulation

16

patients’ needs and thus unproductive time will often be reduced. In spite of being more time consuming than rostering personnel problems on a shift type base, the time interval personnel approach induces much better quality schedules, with respect to the personal constraints of the staff (the soft constraints). The considerably larger search space allows for tackling particular soft constraint problems by making the most of different shift type combinations in the construction of the timetable. It allows for many kinds of part-time employment without requiring preliminary restrictive decisions on shift type combinations from the personnel manager or planner. Experiments have shown that both personnel and hospitals benefit from this new approach. Everything which was possible with the originally developed model and algorithms remains possible with the current methods. In fact, the search space in the shift type approach is a subspace of the new search space. Time interval personnel requirements are an important improvement of the shift type system. This approach provides a higher level of personnel satisfaction, creates plenty of possibilities for part-time employment, and leads to efficient and flexible organisations.

References Abernathy WJ, Baloff N, Hershey JC, Wandel S. 1973. A Three-Stage Manpower Planning and Scheduling Model - A Service-Sector Example. Operations Research 22, 693-711 Aickelin U, Dowsland K. 2000. Exploiting problem structure in a genetic algorithm approach to a nurse rostering problem. Journal of Scheduling, 3 (3), 139-153 Aickelin U, Li J. (to appear). An Estimation of Distribution Algorithm for Nurse Scheduling. Annals of Operations Research, Special Issue on Personnel Scheduling and Planning. Bard JF, Purnomo HW. 2005. A column generation-based approach to solve the preference scheduling problem for nurses with downgrading, Socio-Economic Planning Sciences 39, 193-213 Bard JF, Purnomo HW. (to appear). A Lagrangian-Based Approach for Cyclic Preference Scheduling of Nurses, Journal of Scheduling Beddoe GR, Petrovic S. (to appear). Selecting and weighting features using a genetic algorithm in a case-based reasoning approach to personnel rostering. European Journal of Operational Research Burke EK, Cowling P, De Causmaecker P, Vanden Berghe G. 2001a. A Memetic Approach to the Nurse Rostering Problem. Applied Intelligence, 15 (3), 199-214 Burke EK, De Causmaecker P, Petrovic S, Vanden Berghe G. 2001b. Fitness Evaluation for Nurse Scheduling Problems. Proceedings of Congress on Evolutionary Computation, Seoul, IEEE Press, 11391148 Burke EK, De Causmaecker P, Petrovic S, Vanden Berghe G. 2004a.: Variable Neighbourhood Search for Nurse Rostering Problems, in Metaheuristics: Computer Decision-Making (edited by Mauricio G.C. Resende and Jorge Pinho de Sousa), Chapter 7, Kluwer, 153-172 Burke EK, De Causmaecker P, Vanden Berghe G. 1999. A Hybrid Tabu Search Algorithm for the Nurse Rostering Problem, B. McKay et. al. (Eds.): Simulated Evolution and Learning 1998, Lecture Notes in Artificial Intelligence, Vol. 1585, Springer, 187-194 Burke EK, De Causmaecker P, Vanden Berghe G. 2004b. Novel Meta-heuristic Approaches to Nurse

17

Rostering Problems in Belgian Hospitals, Chapter 44 in J. Leung: Handbook of Scheduling: Algorithms, Models and Performance Analysis, CRC Press, 2004, 44.1-44.18 Burke EK, De Causmaecker P, Vanden Berghe G., Van Landeghem H. 2004c. The State of the Art of Nurse Rostering, Journal of Scheduling, Vol 7 issue 6, Nov/Dec 2004 Brusco MJ, Jacobs LW, Bongiorno RJ, Lyons DV, Tang B. 1995. Improving personnel scheduling at airline stations. Operations Research, 43 (5), 741-751 Cheang B, Li H, Lim A, Rodrigues B. 2003. Nurse rostering problems - a bibliographic survey. European Journal of Operational Research, 151, 447-460 Chiarandini M, Schaerf A, Tiozzo F. 2000. Solving Employee Timetabling Problems with Flexible Workload using Tabu Search. Burke EK, Erben W (Eds). Proceedings of the 3rd international conference on the Practice and Theory of Automated Timetabling, Konstanz, 298-302 De Causmaecker P, Vanden Berghe G. 2002. Relaxation of Coverage Constraints in Hospital Personnel Rostering, E.K. Burke, P. De Causmaecker (Eds.); Practice and Theory of Automated Timetabling, Fourth International Conference, Gent, Springer, Lecture Notes in Computer Science, Vol. 2740, 129-147 Dowsland K. 1998: Nurse scheduling with Tabu Search and Strategic Oscillation. EJOR 106, 393-407 Hung R. 1991. A Cyclical Schedule of 10-Hour, Four-Day Workweeks. Nursing Management 22 (5) 30-33 Isken M, Hancock W. 1990. A Heuristic Approach to Nurse Scheduling in Hospital Units with NonStationary, Urgent Demand, and a Fixed Staff Size. Journal of the Society for Health Systems, 2 (2), 24-41 Jan A, Yamamoto M, Ohuchi A. 2000. Evolutionary Algorithms for Nurse Scheduling Problem. Proceedings of the 2000 Congress on Evolutionary Computation, San Diego, 196-203 Meisels A, Gudes E, Solotorevski G. 1995. Employee Timetabling, Constraint Networks and KnowledgeBased Rules: A Mixed Approach. Burke EK, Ross P (Eds): Practice and Theory of Automated Timetabling, First International Conference Edinburgh, Springer, Lecture Notes in Computer Science, 1153, 93-105 Meisels A, Lusternik N. 1997. Experiments in Networks of Employee Timetabling Problems. Burke EK, Carter M (Eds): Practice and Theory of Automated Timetabling, Second International Conference, Toronto, Springer, Lecture Notes in Computer Science, 1408, 130-141 Meyer auf’m Hofe H. 1997. ConPlan/SIEDAplan: Personnel Assignment as a Problem of Hierarchical Constraint Satisfaction. Proceedings PACT 97, 257-271 Meyer auf’m Hofe H. 2001. Solving Rostering Tasks as Constraint Optimization. Burke EK, Erben W (Eds): Practice and Theory of Automated Timetabling, 3rd international conference, Konstanz, Springer, Lecture Notes in Computer Science, 2079, 191-212 Muslija N, Gaertner J, Slany W. 2000. Efficient Generation of Rotating Workforce Schedules. Burke EK, Erben W (Eds). Proceedings of the 3rd international conference on the Practice and Theory of Automated Timetabling, Konstanz, 314-332

18

Musliu N, Schaerf A, Slany W. 2001. Local Search for Shift Design. MIC’2001, Proceedings of the 4th Metaheuristics International Conference, Porto, 465-469 Miller H, Pierskalla W, Rath G. 1976. Nurse Scheduling Using Mathematical Programming. Operations Research 24, 857-870 Parr D, Thompson JM. (to appear). Solving the multi-objective nurse scheduling problem with a weighted cost function. Annals of Operations Research, Special Issue on Personnel Scheduling and Planning. Petrovic S, Beddoe GR, Vanden Berghe G. 2002. Case-based reasoning in employee rostering: learning repair strategies from domain experts. Technical Report NOTTCS-TR-2002-4, Automated Scheduling Optimisation and Planning Research Group, School of Computer Science and Information Technology, University of Nottingham Schaerf A, Meisels A. 1999. Solving employee timetabling problems by generalised local search. Proceedings Italian AI (AIIA-99), Lecture Notes in Computer Science, 1792, 493-502 Tanomaru J. 1995. Staff Scheduling by a Genetic Algorithm with Heuristic Operators, Proceedings of the IEEE Conference on Evolutionary Computation, 456-461 Trivedi VM, Warner M. 1976 A branch and bound algorithm for optimum allocation of float nurses. Management Science 22 (9), 972-981 Warner M. 1976. Scheduling Nursing Personnel According to Nursing Preference: A Mathematical Programming Approach. Operations Research 24, 842-856 Warner M, Prawda J. 1972. A Mathematical Programming Model for Scheduling Nursing Personnel in a Hospital. Management Science 19, 411-422 Winstanley G. 2004. Distributed and Devolved Work Allocation Planning. Applied Artificial Intelligence 18 (2), 97-115

19

Suggest Documents