a hybrid method for solving timetabling problems based on the

0 downloads 0 Views 138KB Size Report
Dec 30, 2006 - methods concern only a specific type of problems (e.g. [9, 10]) or a particular problem class (cf. [11, 12]) and ... 9 timeslots each). Test sets for this problem come from ... no physician has duty on two (or more) consecutive days,.
TASK QUARTERLY 11 No 1–2, 137–149

A HYBRID METHOD FOR SOLVING TIMETABLING PROBLEMS BASED ON THE EVOLUTIONARY APPROACH MACIEJ NORBERCIAK Institute of Applied Informatics, Wroclaw University of Technology, Wybrzeże Wyspiańskiego 27, 50-370 Wroclaw, Poland [email protected] (Received 30 December 2006; revised manuscript received 17 January 2007) Abstract: Timetabling problems are often difficult and time-consuming to solve. Most of the methods of solving these problems are limited to one problem instance or class. This paper describes a universal method for solving large, highly constrained timetabling problems in various domains. The solution is based on an evolutionary algorithm framework and employs tabu search to quicken the solution finding process. Hyper-heuristics are used to establish the algorithm’s operating parameters. The method has been used to solve three timetabling problems with promising results of extensive experiments. Keywords: evolutionary algorithms, hybrid methods, timetabling

1. Introduction Timetabling problems have been quite popular with researchers for more than thirty years now. Their practical importance should not be underestimated, as institutions involved in education, healthcare, transportation, sports, courts of law, production enterprises and many others devote considerable resources to establish effective plans of their actions. Over these years, many approaches to partial or complete automation of such tasks have been presented, roughly divisible into four types [1]: – Sequential methods, using domain heuristics to order events and then assign them sequentially to valid periods of time (also called timeslots) so that no events in the period are in conflict with each other. Events are most often ordered so that those most difficult to schedule are assigned to timeslots first (this course of action being called a direct heuristic based on successive augmentation) [2]. – Cluster methods, in which events are collected in clusters so that no two events in a particular cluster are in conflict with each other. The clusters of events are formed and fixed at the beginning of the algorithm, which is the

138

M. Norberciak

main disadvantage of this approach, as it may result in a timetable of poor quality [3]. – Constraint-based methods, in which a timetabling problem is modeled as a set of variables (i.e. events) having a finite domain to which values (i.e. resources such as time periods) need to be assigned to satisfy a number of constraints; a number of rules is defined for assigning resources to events and, when no rule is applicable to the current partial solution, backtracking is performed until a solution is found that satisfies all constraints. Algorithms are usually allowed to break some constraints in order to produce a complete timetable (which must be done in a controlled manner), as it may be impossible to satisfy all constraints [4]. – Meta-heuristic methods, a variety of which have been investigated for timetabling, including simulated annealing, tabu search, evolutionary algorithms and hybrid approaches. Meta-heuristic methods begin with one or more initial solutions and employ search strategies to find the optimal solution, attempting to avoid local optima in the process [3, 5–8]. Most approaches use heuristics (or metaheuristics) because timetabling problems are considered to be NP-hard (although mathematical proof of this exists only for small-sized problem). Traditional combinatorial optimization methods most often come with a considerable computational cost and, although capable of producing high quality solutions, they are not suitable for solving large, highly constrained problems. The above might suggest that AI-based automatic planning has already reached a level of relative maturity, all the problems have been solved in principle, and the research is focused on making the existing methods faster, more effective and yielding solutions of better quality for more complex and larger problems. (It is, of course, possible to find an instance large enough for a combinatorial optimization problem of a given class, where modern metaheuristics perform poorly or even fail, but these are rarely real-life problems.) Nevertheless, it must be pointed out that a vast majority of methods concern only a specific type of problems (e.g. [9, 10]) or a particular problem class (cf. [11, 12]) and require time and resources to be adapted for specific practical applications. This paper presents an attempt to create a universal method capable of solving problems from different areas with minimum user interaction. Three problems from different classes have been chosen for testing, so that universality and flexibility of the method be assured. We begin with a typical university course timetabling problem, very popular and widely researched, thus facilitating access to test data, both real-life and artificially generated. A similar but more specific problem with different constraints is timetabling at the Faculty of Computer Science and Management of the Wroclaw University of Technology. Our last problem belongs to the personnel scheduling class and concerns monthly duty plan of a Polish hospital’s ward. Its relatively small size makes facilitates analysis, while its constraints are unlike those of school timetabling.

A Hybrid Method for Solving Timetabling Problems...

139

2. Description of the problems A typical timetabling problem consists in assigning a set of activities/actions/ events (e.g. work shifts, duties, classes) to a set of resources (e.g. physicians, teachers, rooms) and time periods, fulfilling a set of constraints of various types. Constraints either stem from the very nature of timetabling problems or are specific to the institution involved. In other words, timetabling (or planning) is a process of putting in a sequence or partial order a set of events to satisfy temporal and resource constraints required to achieve a certain goal. It is sometimes confused with scheduling, which is a process of assigning events to resources over time to fulfill certain performance constraints, although some scientists consider scheduling as a special case of timetabling or vice versa [7]. Timetable problems are subject to numerous constraints, usually divided into two categories: hard and soft. Hard constraints are rigidly enforced and have to be satisfied in order for a timetable to be feasible. Soft constraints are desirable but not absolutely essential. The first problem considered is a typical university course timetabling problem (UCTP). It consists of a set of events (classes) to be scheduled in a certain number of timeslots and a set of rooms of certain features and sizes in which the events can take place. There is a defined set of students attending each event and the number of timeslots is 45 (5 days, 9 timeslots each). Test sets for this problem come from International Timetabling Competition (ITTC) [13]. A feasible UCTP timetable is one in which all the events have been assigned a timeslot and a room, while the following hard constraints have been satisfied: (1) only one event is scheduled in each room at any timeslot, (2) each room is large enough for all the attending students and has all the features required for the event, and (3) no student attends more than one class at the same time. There are also three soft constraints defined, which are broken if: (1) a student has a class in the last slot of the day, (2) a student has more than two classes in a row, (3) a student has a single class on a day. The second problem – timetabling at the Faculty of Computer Science and Management of the Wroclaw University of Technology – is similar to the first, but has additional constraints related to teachers and the set of students attending each event is undefined (only the number of students and the faculty they attend is known) and has to be concluded from other data. In this problem, the number of timeslots is 35 (5 days, 7 timeslots each) and each event is attributed to a defined course (each class is a part of a particular university course). Some test sets for this problem come from real FCSM data while others have been generated artificially. In this problem, a feasible timetable is one in which all the events have been assigned a timeslot and a room so that the following hard constraints have been satisfied (apart from constraints (1) and (2) of UCTP): – no teacher teaches more than one class at the same time, – no teacher teaches any class in timeslots which are forbidden for him, and

140

M. Norberciak

– if a particular course has only one class assigned, no class with students from the same faculty is scheduled at the same timeslot with this course (this covers the obligatory courses which are usually taught for all the faculty’s students). The third problem concerns a typical hospital department where about a dozen physicians of various specialties are employed. Every day one or more doctors have duty, but the number of doctors on duty may vary from day to day. A planning horizon (i.e. a period of time for which the problem must be solved) amounts to one month. If specialties of physicians in a particular department are not homogenous (e.g. the casualty ward employs surgeons and anesthesiologists) doctors of particular specialty are often required to be on duty. The following hard constraints have been defined: – all the timeslots (i.e. days) have a proper number of physicians of appropriate specialties assigned, – no physician has duty on two (or more) consecutive days, – no physician has duty more often than twice a week, – at least one physician on each duty is able to perform his duties single-handedly (viz. has a sufficient degree of medical education and experience). In order to consider and model issues of fairness and job satisfaction, the following soft constraints have been introduced: – physicians have duties on their preferred days of the month and, symmetrically, have no duties assigned in timeslots they would rather avoid, – if more than one physician have duty at the same time, their interpersonal preferences are taken into consideration (so that doctors have duty with persons they like).

3. Solution details Evolutionary algorithms (EA) are considered to be a good general-purpose optimization tool due to their high flexibility and conceptual simplicity. Moreover, as they have been proven to solve timetabling problems effectively ([3, 14]), the EA framework has been chosen as the basis for a universal solver of timetable problems. The term “EA” is used in this paper in its most generic meaning to indicate any population-based metaheuristic optimization algorithm that uses mechanisms inspired by biological evolution, such as reproduction and mutation.

3.1. Representation of the solutions In order to assure universality of the approach, each solution (genotype) of a particular problem’s instance is represented directly – each timeslot has a list of events assigned and each event – a list of resources. Genotype length is constant for particular problem – in the case of hospital duties the genotype has the length of the number of physicians on duty multiplied by the number of timeslots, while the course timetable genotype’s length equals the number of timeslots multiplied by the number of rooms. The data (e.g. constraints) required to describe a particular problem class is abstract and unified for all problem classes. Some weak constraints (those with more than two preference levels – desired and undesired) require a special description: a constraint is defined by its type and the number of preference levels. The latter must

A Hybrid Method for Solving Timetabling Problems...

141

always be odd; the first level is the most desirable, the last level is the least desirable and the middle level is neutral. Weak constraints may be of two types: timeslots which have preferred resources and resources which have preferred resource combinations. Examples of such constraints may be found in the duty assignment problem in the form of interpersonal preferences (doctors may “love”, “like”, “dislike” or “hate” one another, or merely be “indifferent”).

3.2. The evaluation function A penalty-based evaluation function has been used. Penalty for genotype g amounts to: Xi

Suggest Documents