The Doctor Rostering Problem - Asser Fahrenholz

The Doctor Rostering Problem - Asser Fahrenholz The Doctor Rostering Problem - Asser Fahrenholz

asser.fahrenholz.dk
from asser.fahrenholz.dk More from this publisher
27.07.2013 Views

Chapter 4. Solving the DRP 19 (a) RCL: 50% elements (rounded down) (b) RCL: 5 elements (c) RCL: Value below 5.0 Figure 4.2: Various types of RCL parameters (d) RCL: Value below 60 % of the worst The various construction heuristics all bring advantages and disadvantages. These are outlined in table 4.1. Feasible Construction Evaluation Zero solution No O(1) O(1) Random solution Perhaps O(n) O(n) Greedy solution Perhaps O(n · m) O(n) Table 4.1: The initial solutions Out of the described heuristics, the adaptive greedy algorithm is chosen as the con- struction heuristic of this project, along with the RCL parameter type shown in figure 4.2(a). This type of RCL parameter ensures that a certain degree of randomisation can be achieved, contrary to the RCL parameter shown in figure 4.2(b), where an absolute size is chosen (this can not ensure a certain degree of randomisation when the size of the RCL varies). The adaptive greedy algorithm is outlined in algorithm 4.1. Algorithm 4.1 Adaptive greedy - require: RCL parameter p, schedule S for all Unassigned Shift in S do RCList = {} for all Doctors do RCList ← RCList ∪ V alueOf(Doctor, Shift) end for Sort(RCList) Restrict RCList according to p Pick a doctor randomly from RCList and assign it to Shift end for

Chapter 4. Solving the DRP 20 Given a schedule, a need to improve upon this schedule arises. This is where neighbor- hoods comes in. 4.3.2 Neighborhoods and Local Search To guide the search in finding better solutions, I introduce the well known term Neigh- borhoods. A neighborhood is defined as: N(S) = { solutions obtained by applying a single local transformation to S } A neighbor is a potential replacement for a solution and need only vary from the solution at hand by a single element. The whole set of replacements produced by some change or function on the solution is called a neighborhood. The process of moving from one solution to another in its basic form, is called Local Search (LS) and is, if exhaustive, able to find a local optimum. Figure 4.3 shows how moving through the solution space may increase and decrease the heuristic value of the solution. Only accepting solutions with higher Z(S) is called hill climbing (and analogously hill descending). Figure 4.3: Local and global optima For any given problem, several possible neighborhoods often exist. The neighborhoods identified in this thesis are, thanks to the nature of this problem, two very simple functions: Rotation is moving the doctor of all shifts to another shift in the set, such that all doctors are moved in rotation. The principle is depicted in figure 4.4 on the next page Inversion is for all selected shifts, to populate the shifts with another doctor than the one that is originally assigned to it. Figure 4.5 on the following page illustrates the principle. One could pass an empty schedule to a Local Search algorithm using

Chapter 4. Solving the DRP 19<br />

(a) RCL: 50% elements<br />

(rounded<br />

down)<br />

(b) RCL: 5 elements<br />

(c) RCL: Value<br />

below 5.0<br />

Figure 4.2: Various types of RCL parameters<br />

(d) RCL: Value<br />

below 60 % of the<br />

worst<br />

<strong>The</strong> various construction heuristics all bring advantages and disadvantages. <strong>The</strong>se are<br />

outlined in table 4.1.<br />

Feasible Construction Evaluation<br />

Zero solution No O(1) O(1)<br />

Random solution Perhaps O(n) O(n)<br />

Greedy solution Perhaps O(n · m) O(n)<br />

Table 4.1: <strong>The</strong> initial solutions<br />

Out of the described heuristics, the adaptive greedy algorithm is chosen as the con-<br />

struction heuristic of this project, along with the RCL parameter type shown in figure<br />

4.2(a). This type of RCL parameter ensures that a certain degree of randomisation can<br />

be achieved, contrary to the RCL parameter shown in figure 4.2(b), where an absolute<br />

size is chosen (this can not ensure a certain degree of randomisation when the size of<br />

the RCL varies).<br />

<strong>The</strong> adaptive greedy algorithm is outlined in algorithm 4.1.<br />

Algorithm 4.1 Adaptive greedy - require: RCL parameter p, schedule S<br />

for all Unassigned Shift in S do<br />

RCList = {}<br />

for all <strong>Doctor</strong>s do<br />

RCList ← RCList ∪ V alueOf(<strong>Doctor</strong>, Shift)<br />

end for<br />

Sort(RCList)<br />

Restrict RCList according to p<br />

Pick a doctor randomly from RCList and assign it to Shift<br />

end for

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!