The initialisation of the scheduling algorithm consists of two phases for con- structing a feasible initial solution. It suffices for a schedule to satisfy all the hard constraints to be called feasible. In the first phase, the input is loaded (after an option has been selected, Section 5.4.1). The second phase makes the schedule feasible.
5.4.1
Input for the initialisation
For practical planning problems three possible strategies are introduced. - Current schedule
The option starts from the currently available schedule, which can either be the result of a previous attempt to generate a solution, or the planning that existed before certain extra restrictions occurred. Very regularly the rostering does not happen in one go. The hospital planner will often quickly calculate a schedule to check certain constraints or personal preferences, after which (by making changes to constraints or personnel requirements if necessary), a final schedule will be calculated. The option to take the current schedule as input for the initialisation phase is especially useful when urgent changes in an existing schedule are required. In real life this may happen when a personnel member is suddenly ill and has to be replaced. Of course, this emergency is not supposed to change the schedule for other people drastically. In many practical occasions, schedulers applying this option make use of the ‘freezing’ tool (Section 5.3.3).
- Schedule of the previous planning period
This option is useful when the schedule in the previous planning period is of very high quality and when the constraints on the current and the previous planning period are similar. It is not recommended to use
holidays. We also advice not to select this option when the pattern
constraint has a period different from the planning period for some personnel members.
- Empty schedule
The simplest input option starts the initialisation from an empty schedule. Although the two first initial schedule constructors may seem very attractive, our experiments show that it is not too difficult for the meta-heuristic algo- rithms to produce schedules of comparable quality starting from a random ini- tial schedule. Indeed it is often the case that with the two latter initialisations, the algorithm is already in a local minimum and has problems escaping from it.
5.4.2
Create a feasible solution
Given the entire search space of the ANROM problem, each element of that search space, called a schedule, corresponds to a potential solution. We call the schedule feasible when it satisfies all the hard constraints. In order to satisfy the hard constraints in the initial schedule, an algorithm is used that adds and/or removes shifts until the personnel requirements (according to the planning op- tions of Section 5.6) are met. The process takes some of the soft constraints into account but it is mainly random driven. Users of the software based on ANROM suggested to force satisfaction of the personal requests for days and shifts off (Constraint 24 and 25), and satisfaction of the patterns (Constraint 22). These are precisely the constraints that play a role in determining the consistency of the data (Section 5.2). It seems contradictory to the previously explained concept of treating the cost function (which sums violations of all the constraints, Chapter 4) as the only evaluation means. However, even though the planners can freely set cost parameters, a schedule in which less personal constraints are violated will often be preferred to better quality schedules (with respect to the cost function) containing more violations of these particular con- straints. Fig. 5.7 describes the entire initialisation phase but the procedure will be explained step by step. The initialisation is always executed per skill cate- gory. The group of people belonging to the skill category is extended with the people who have that skill as an alternative qualification. In Fig. 5.6, we demon- strate how the schedule is divided into sub-schedules that correspond to each skill category. Some of the personnel members have alternative qualifications in this simplified example and 1 person even changes skill category during the planning period. The initialisation algorithm makes a first attempt, only in the case when the Empty scheduleoption holds, to satisfy the pattern constraint. When a pattern requires an obligatory shift, the algorithm assigns a randomly chosen shift to the corresponding people, provided the assignment never violates the hard constraint on the number of people required. In order to be general, we have used a simplified notationrequirements(see also Section 5.2) for the
P2 P2
P3 P3
P4 P4
P5 P5
P6 P6
skill categoryQO2
P1 P2 → P3 P4 P5 alternative P6
skill categoryQO3
P1 P2 P3 P4 P5 P6 alternative
Figure 5.6: Example of the division of a schedule into partial schedules that are solved per skill category. P3 moves from skill categoryQO2 toQO1 during the planning period. P5 belongs toQO3 but is also allowed to carry out shifts for
QO2, and P6 belongs toQO1 with alternative qualificationQO3.
personnel requirements. The notation does not specify whether it is minimum or preferred requirements. In Section 5.6, we explain which type of personnel requirements determine the hard coverage constraints.
In case the shift type is specified (building block PAT-2 of the pattern, Con- straint 22), the shift will be assigned to the person if there is a shortage in the schedule for the shift on the particular pattern day. For the 3rd building block, PAT-3, the algorithm randomly chooses a shift type of the specified duration (allowing the small deviation of the preset time, i.e. 15’), for which the person- nel requirements are not yet met.
The algorithm afterwards moves to an iterative phase which stops when the per- sonnel requirements are fulfilled for every assignment unit or when a maximum number of attempts to assign randomly is reached. The maximum number of attempts is function of the number of people who can carry out jobs for the skill
corresponding shift type randomly to a personal schedule, provided it is part of the search space for that qualification.
Experiments with varying real world problems led to the procedure described in this section. It turned out to be a very satisfying approach for tackling the large set of nurse rostering problems occurring in practice.
We will now explain the procedure in detail. The personnel are divided into groups with equal eagerness for the assignment. In the case where all people in a group already have an assignment for the shift (either for the currently scheduled skill category or for another), the assignment fails. The algorithm stops if a random assignment is possible in a group, that is if a person of the group has no assignment. If no such person exists, the algorithm moves to the next group. People can only belong to a group if the considered part of the schedule (assignment unit) belongs to the search space. The number of groups for adding assignments is calledadd max in Fig. 5.7.
ADD–1 All the people having a personal request for the shift corresponding to the time to be scheduled (Constraint 26) and no assignment yet. ADD–2 All the people working according to a predefined pattern, for which a
PAT-2 type corresponds to the day and the detail to the shift to be scheduled, with an empty schedule for that assignment unit.
ADD–3 All the people working according to a predefined pattern, for which a PAT-3 type corresponds to the day and the detail to the duration of the shift to be scheduled (+/- the deviation), and an empty schedule for that assignment unit.
ADD–4 All the people who have the scheduled skill category as main skill cat- egory and do not have a personal request (with a high importance) for a day off or shift off at the time to be scheduled (see Constraint 24 and 25), and have an empty schedule for that assignment unit.
ADD–5 All the people who have the skill category as alternative and do not have a personal request (with a high importance) for a day off or shift off at the time to be scheduled, and have an empty schedule for that assignment unit.
ADD–6 All the people who belong to the skill category, have a marked assign- ment for another skill category that has not been scheduled in this run (a skill category which is lower in the planning order hierarchy). ADD–7 All the people who have the skill category as alternative, have a marked
assignment for another skill category that has not been scheduled in this run (a skill category which is lower in the planning order hierarchy) and which is different from the main skill category of the particular people.
The group ADD-7 is exceptional in that a marked assignment will be removed in order to enable the assignment that will make the schedule feasible.
An analogous procedure has been developed for removing shifts when a sched- ule exceeds the requirements for certain shifts. We identifyrem max different groups (see Fig. 5.7). The hierarchy of the groups to which the removal of a shift is applied is listed below:
REM–1 All the people who have the skill category as alternative and have a marked (see Section 5.6) assignment for the skill category being sched- uled.
REM–2 All the people who belong to the skill category and have a marked assignment for it.
REM–3 All the people who have the skill category as alternative and have an assignment for the skill category being scheduled.
REM–4 All the people who belong to the skill category and have an assignment for it.
In Section 5.6, we will explain how the personnel requirements for the initiali- sation depend on the planning options.