The Doctor Rostering Problem - Asser Fahrenholz
The Doctor Rostering Problem - Asser Fahrenholz The Doctor Rostering Problem - Asser Fahrenholz
Chapter 4 Solving the DRP In this chapter, the reader is presented with several methods for solving the DRP. First, the complexity of the problem is analysed and based on this, an approach is chosen. For each chosen method I briefly discuss the background, the theory and common extensions. In the last section I cover how they were implemented in this project. 4.1 DRP complexity Complexity theory investigates how algorithms scale when the problems given as input to the algorithms scales. Problems are divided into two main complexity classes, the P and NP classes. The two classes represent the problems that can be solved in polynomiel time and those that can be solved nondeterministicly in polynomiel time. The NP-class also have the property that a postulate in the form of a Yes/No question is verifiable in polynomiel time. Another class is NP-hard problems, that are defined as those problems which all NP-problems can be transformed into. NP-hard problems are, put another way, those which are at least as hard as NP problems (but may be harder). NP-hard problems does not need to be a postulate in the form of a Yes/No question. Some problems are also NP-complete and are defined as those which are both NP-hard and are also NP. With these definitions in mind, one should be aware of the complexity of the problem for which a solution is sought. The NP-complete problems should be given special attention, as the time to solve these grow exponentially with the size of the problem. These problems are also called intractable. Meaning, exploring the entire feasible region of any but the smallest problems, is impossible in any lifetime. This means, that if DRP is NP-complete, we can start looking for approximations or partial solutions since there is little chance an algorithm can be developed able to solve 15
Chapter 4. Solving the DRP 16 it in a short amount of time (Hopcroft et al. [13]). If the DRP problem is NP-complete and an algorithm does exist, able to solve the problem deterministically in polynomial time, then it would follow that all NP-complete problems are solvable deterministically in polynomial time and so P = NP , a statement that has been investigated for the last 50 years without any definite results 1 . As such, it is widely believed that P = NP , since no polynomial time algorithms has been devised to solve an NP-complete problem. To prove that a problem is NP-complete, one can transform an already known NP- complete problem (in polynomial time) to the problem for which a proof is sought. Fortunately, a problem, very close to the DRP, has already been proven NP-complete. It is stated in Garey and Johnson [10] as [SS19], referring to Even et al. [9] who transformed the 3SAT (Karp [15]) problem, which again was transformed from the SAT problem (Cook [6]). The chain of transformations is shown in figure 4.1. Figure 4.1: The transformation chain from SAT to Timetable Design Garey and Johnson [10] defines the instance as: A set H of ”work periods”, a set C of ”craftsmen”, a set T of ”tasks”, a subset A(c) ⊆ H of ”available hours” for each craftsman c ∈ C, a subset A(t) ⊆ H of available hours for each task t ∈ T , and, for each pair (c, t) ∈ C × T , a number R(c, t) ∈ Z + 0 of ”required work periods”. Applying this to the DRP: The set H defines the work periods in which shifts must lie, the set C is the set of doctors and the set T is the shifts. A(c) defines when a doctor is available, which in this project is defined by all the hard constraints except H4. A(t) describes when a shift can be performed and R(c,t) defines how long a shift t takes for doctor c to perform. In this project R(c, t) = 1 ∀ c, t. This instance describes a timetable for completing all shifts in time. The Timetable Design problem can thus be transformed to the DRP and hence, DRP is NP-complete. This means that no known algorithm can deterministically find an optimal solution to the DRP in polynomiel time. 4.2 Exact methods Given a set of constraints, as described in chapter 3, the goal of finding a solution to the problem can be accomplished by using an optimal solver such as GAMS. As concluded above, solving the DRP to optimality can take an exponential amount of time. Due to 1 One of the Millennium Problems : Claymath.org/millennium/
- Page 1 and 2: TECHNICAL UNIVERSITY OF DENMARK The
- Page 3 and 4: TECHNICAL UNIVERSITY OF DENMARK Abs
- Page 5 and 6: Acknowledgements Foremost, I would
- Page 7 and 8: Contents vi 4.3.1 A construction he
- Page 9 and 10: List of Figures 4.1 The transformat
- Page 11 and 12: List of Algorithms 4.1 Adaptive gre
- Page 13 and 14: Chapter 1. Introduction and problem
- Page 15 and 16: Chapter 2. The Doctor Rostering Pro
- Page 17 and 18: Chapter 2. The Doctor Rostering Pro
- Page 19 and 20: Chapter 3 A mathematical model for
- Page 21 and 22: Chapter 3. The model and design 10
- Page 23 and 24: Chapter 3. The model and design 12
- Page 25: Chapter 3. The model and design 14
- Page 29 and 30: Chapter 4. Solving the DRP 18 4.3.1
- Page 31 and 32: Chapter 4. Solving the DRP 20 Given
- Page 33 and 34: Chapter 4. Solving the DRP 22 Since
- Page 35 and 36: Chapter 4. Solving the DRP 24 1. Co
- Page 37 and 38: Chapter 4. Solving the DRP 26 decre
- Page 39 and 40: Chapter 4. Solving the DRP 28 This
- Page 41 and 42: Chapter 4. Solving the DRP 30 Simul
- Page 43 and 44: Chapter 5. Optimal solution 32 The
- Page 45 and 46: Chapter 6 The DRP Program Through t
- Page 47 and 48: Chapter 6. The DRP Program 36 Figur
- Page 49 and 50: Chapter 6. The DRP Program 38 of th
- Page 51 and 52: Chapter 6. The DRP Program 40 Figur
- Page 53 and 54: Chapter 7 Metaheuristic tests This
- Page 55 and 56: Chapter 7. Tests, results and discu
- Page 57 and 58: Chapter 7. Tests, results and discu
- Page 59 and 60: Chapter 7. Tests, results and discu
- Page 61 and 62: Chapter 7. Tests, results and discu
- Page 63 and 64: Chapter 7. Tests, results and discu
- Page 65 and 66: Chapter 8. Future considerations 54
- Page 67 and 68: Chapter 8. Future considerations 56
- Page 69 and 70: Chapter 9. Conclusion 58 The three
- Page 71 and 72: Appendix A. Implementation 60 27 //
- Page 73 and 74: 2 Appendix A. Implementation 62 3 i
- Page 75 and 76: Appendix A. Implementation 64 A.3 G
Chapter 4<br />
Solving the DRP<br />
In this chapter, the reader is presented with several methods for solving the DRP. First,<br />
the complexity of the problem is analysed and based on this, an approach is chosen. For<br />
each chosen method I briefly discuss the background, the theory and common extensions.<br />
In the last section I cover how they were implemented in this project.<br />
4.1 DRP complexity<br />
Complexity theory investigates how algorithms scale when the problems given as input<br />
to the algorithms scales. <strong>Problem</strong>s are divided into two main complexity classes, the P<br />
and NP classes. <strong>The</strong> two classes represent the problems that can be solved in polynomiel<br />
time and those that can be solved nondeterministicly in polynomiel time. <strong>The</strong> NP-class<br />
also have the property that a postulate in the form of a Yes/No question is verifiable in<br />
polynomiel time. Another class is NP-hard problems, that are defined as those problems<br />
which all NP-problems can be transformed into. NP-hard problems are, put another way,<br />
those which are at least as hard as NP problems (but may be harder). NP-hard problems<br />
does not need to be a postulate in the form of a Yes/No question. Some problems are<br />
also NP-complete and are defined as those which are both NP-hard and are also NP.<br />
With these definitions in mind, one should be aware of the complexity of the problem<br />
for which a solution is sought. <strong>The</strong> NP-complete problems should be given special<br />
attention, as the time to solve these grow exponentially with the size of the problem.<br />
<strong>The</strong>se problems are also called intractable. Meaning, exploring the entire feasible region<br />
of any but the smallest problems, is impossible in any lifetime.<br />
This means, that if DRP is NP-complete, we can start looking for approximations or<br />
partial solutions since there is little chance an algorithm can be developed able to solve<br />
15