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 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/

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

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

Saved successfully!

Ooh no, something went wrong!