Você está na página 1de 17

School of Computer Science and Information Technology

University of Nottingham
Jubilee Campus
NOTTINGHAM NG8 1BB, UK

Computer Science Technical Report No. NOTTCS-TR-2002-1

A New Adaptive Heuristic Framework for Examination Timetabling Problems


E. K. Burke and J. P. Newall

First released: February 2002

Copyright 2002 E. K. Burke and J. P. Newall

In an attempt to ensure good-quality printouts of our technical reports, from the supplied PDF files, we
process to PDF using Acrobat Distiller. We encourage our authors to use outline fonts coupled with
embedding of the used subset of all fonts (in either Truetype or Type 1 formats) except for the standard
Acrobat typeface families of Times, Helvetica (Arial), Courier and Symbol. In the case of papers prepared
using TEX or LATEX we endeavour to use subsetted Type 1 fonts, supplied by Y&Y Inc., for the
Computer Modern, Lucida Bright and Mathtime families, rather than the public-domain Computer Modern
bitmapped fonts. Note that the Y&Y font subsets are embedded under a site license issued by Y&Y Inc.
For further details of site licensing and purchase of these fonts visit http://www.yandy.com

A New Adaptive Heuristic Framework for Examination


Timetabling Problems
E.K.Burke
J.P.Newall
{ekb|jpn}@cs.nott.ac.uk
Automated Scheduling, Optimisation and Planning Group
School of Computer Science & IT
University of Nottingham
Nottingham NG8 1BB
UK

Keywords: examination timetabling, heuristics, graph colouring


AMS(MOS) classification: 68W99, 90C59

ABSTRACT
Heuristic construction methods, very similar to those used for graph colouring problems, have
long been applied successfully to the examination timetabling problem. Despite the success of
these methods on real life problems, even with limited computing resources, the approach has
the fundamental flaw that it is only as effective as the heuristic that is used. One of the motivations of this paper is to attempt to develop approaches that can operate at a higher level of generality and that can adapt heuristics to suit the particular problem instance in hand. Indeed, the
main aim of this paper is not to beat published results on benchmark problems by special purpose heuristics or meta-heuristics but to develop a more general system that does not depend on
one particular heuristic approach but can still obtain results that are comparable with special
purpose heuristics. We present an adaptive framework that adapts to suit a particular problem
instance on the fly. This framework provides an alternative to existing forms of backtracking, which are often required to cope with the possible unsuitability of a heuristic. We present a
range of experiments on benchmark problems to test and evaluate the approach. In comparison
to other published approaches to solving this problem, the adaptive framework presented in this
paper is more general, significantly quicker and easier to implement and produces results that
are at least comparable (if not better) than the current state of the art. We also demonstrate the
level of generality of this approach by starting it with the inverse of a known good heuristic and
a null ordering and by showing that the adaptive method can transform a bad heuristic ordering
into a good one.

1 Introduction
The exam timetabling problem is essentially concerned with scheduling a number of exams into a limited
number of timeslots or periods in order to satisfy, as much as possible, a set of specified constraints. These
constraints vary from institution to institution. A detailed analysis and study of institutional requirements
in over 50 British universities is presented in [7]. It is often essential that some constraints are completely
satisfied. Such constraints are called hard constraints. Usually these constraints relate to operational limi-

tations that cannot be bypassed in the real world, such as the constraint that one person cannot be in
two places at once or that there is a maximum number of people that can be accommodated in a particular room. We call a timetable that satisfies all hard constraints a feasible timetable.
Another class of constraints that occur in timetabling problems are those that are deemed desirable, but
that are often either difficult or impossible to fully satisfy. This could include providing study time for
each student between any two exams, or making more efficient use of rooms. These constraints are
usually called soft constraints. Such constraints often determine the quality of a timetable. In general
we would think of a good quality timetable as one that is (firstly) feasible and that (secondly) satisfies
the soft constraints to an acceptable level. Of course, the quality of a solution is very much subjective.
One institutions idea of a good timetable could very well be a poor timetable for another institution.
For example, it may be that one institution insists on having a clear day in between exams for all of its
students (i.e. it makes this a hard constraint). Another institution may be more concerned with holding
all of the exams as quickly as possible in which case the inclusion of the above constraint would be
detrimental to the quality of the timetable. Issues surrounding the perceived quality of examination
timetables in real world situations (British Universities) are discussed in more detail in [7].
Over the last forty years or so, there has been a wealth of literature on automated timetabling and there
have been several review papers that discuss the major approaches to timetabling [27, 19, 20, 1, 11,
42]. The early approaches to exam timetabling tended to employ heuristic sequencing where a heuristic
is used to measure the difficulty of scheduling a particular exam [35]. These heuristics are often based
upon graph colouring heuristics [45, 37, 8, 28]. The overall idea is that the difficult exams are scheduled first to get them out of the way and the easier exams are scheduled towards the end of the process.
This general approach has proved to be very effective, particularly when backtracking is added to the
process [21]. The backtracking procedure is called upon when it is not possible to place a particular
exam into the timetable because of earlier placements. In essence, the procedure unschedules certain
exams to allow the problem exam to be scheduled and passes back to the heuristic procedure to work
on the remaining exams in addition to the recently unscheduled events. More details about these heuristic procedures can be found in the survey papers mentioned above. Carter, Laporte and Lee in 1996
[22] presented some very competitive results on a range of benchmark problems. These results are generated by the employment of graph colouring based heuristics and backtracking. Burke, Newall and
Weare [15] did not employ backtracking but incorporated a random element into the heuristic procedure to produce a compromise approach between heuristic sequencing methods and the more time consuming meta-heuristic approaches.
In recent years a range of these meta-heuristic approaches have been applied to examination timetabling. Simulated annealing for the problem has been investigated by Thompson and Dowsland
[44, 30, 31]. They employ a 2 phase approach. The 1st phase is concerned with finding a feasible solution, while the 2nd phase attempts to optimise the soft constraints in an attempt to produce better quality timetables. Bullnheimer [5] also investigated Simulated Annealing for examination timetabling. He
concentrates on small scale problems and one real world problem in particular. Tabu Search has also
been extensively studied. One of the earliest investigations of this meta-heuristic for exam timetabling
was presented by Hertz in 1991 [36]. Boufflet and Nigre employed tabu search to successfully solve a
real world problem at the University of Technology of Compiegne [3]. White and Xie [46] present a
tabu search based approach to examination timetabling. Their approach uses both short term memory
and longer term memory in an attempt to find good quality solutions. Their results on two data sets
compare favourably with the results of Carter, Laporte and Lee [22] and with those reported by Di Gaspero and Schaerf [29] who also investigate a tabu search method for exam timetabling. Di gaspero and
Schaerfs approach draws heavily on graph colouring based heuristic methods. They present a relatively detailed comparison of their approach with other approaches (which are presented in [22], [13]
and [12]) on a range of benchmark problems and produced very competitive results. The authors say,
...our approach works better than the pure memetic algorithm and the constructive one. Only the
approach based on decomposition performs better.. The memetic and decomposition methods are
briefly presented below.

A New Adaptive Heuristic Framework for Examination Timetabling Problems

Over the last few years there has been a significant level of interest in evolutionary and genetic
approaches to examination timetabling. In 1993, Corne, Fang and Mellish [23] investigated a straightforward Genetic Algorithm approach for the examination problem at the Department of Artificial Intelligence at the University of Edinburgh. Their approach compared favourably with previously produced
manual results. Corne, Ross and Fang [24] discussed the employment of Evolutionary Algorithms for
exam timetabling problems and noted the potential of Evolutionary Algorithms in this area. They also
discussed and presented mutation operators and a delta-evaluation method to speed up the evolutionary
approach [40]. Burke, Elliman and Weare [10] presented and discussed a series of recombination operators for exam timetabling. Ross and Corne [39] compared three approaches (Genetic Algorithms,
Simulated Annealing and Stochastic Hill climbing) on a test suite of 5 exam timetabling problems. The
authors point out that this was a rather limited experiment but that Simulated Annealing and Stochastic
Hill climbing work better than the Genetic Algorithm in terms of solution quality. Of course, as Ross
and Corne point out, the representation used in the Genetic Algorithm is a particularly important consideration and that comparisons employing different representations may lead to different results.
Burke, Elliman and Weare [9] represent the timetable directly and incorporate graph colouring techniques into the crossover operators. Hybridisation of heuristics and meta-heuristics to solve the problem is a theme that runs through several later papers on the exam timetabling problem. Burke, Newall
and Weare [13] presented a memetic algorithm and applied it to benchmark problems. This Memetic
Approach was a hybrid evolutionary algorithm that employed mutation only (no recombination) and a
hill-climbing algorithm. It produced good results (at the time) on benchmark data. Ergul [33] presented
a genetic algorithm based exam timetabling approach and demonstrated its use on real data from the
Middle East Technical University in Ankara, Turkey. Corne and Ross [25] looked at Peckish initialisation strategies. The term peckish is used to represent slightly hungry algorithms rather than greedy
ones. They showed that peckish strategies are more effective than greedy or random ones on exam
timetabling data from the Department of Artificial Intelligence at the University of Edinburgh. In 1998,
Burke, Newall and Weare [14] presented a study of initialisation strategies for evolutionary exam timetabling. In particular, they concentrated upon the employment of graph colouring heuristics in the initialisation process and showed that such strategies can improve the performance of a memetic
approach. The authors pointed out that the algorithm with initialisation often started out with solutions
which were comparable to the solutions that it finished with when started on a random population. This
meant that the evolutionary algorithm could be employed to fine tune the solutions.
In 1999, Burke and Newall [12] incorporated a problem decomposition method with a memetic algorithm. The basic idea was to split up large timetabling problems into a series of smaller subproblems
and deal with each one in turn. The obvious drawback is that this has the potential to run into difficulties with later sub-problems because of decisions taken in earlier subproblems. The authors addressed
this by using graph colouring heuristics to form the subproblems and by employing a look-ahead
approach as each of the sub-problems is dealt with. The overall strategy is that the hardest exams to
schedule (according to the heuristics) are placed into the earlier sub-problems. The development of the
decomposition method was motivated by the goal of trying to speed up the evolutionary process. However, it also significantly improved the solution quality and produced the best results that have so far
been published on certain benchmark problems. Erben [32] has further investigated the theme of incorporating graph colouring heuristics and evolutionary methods for exam timetabling problems. This
approach uses a representation that draws on the grouping character of graph colouring. For further
details about grouping problems see [34]. Erbens method was developed for the graph colouring problem and initial modifications to apply it to the exam timetabling problem have shown promise. Burke,
Bykov and Petrovic [17] drew on the hill climbing and mutation operators from [13] and [12] to
develop a multi-criteria approach to examination timetabling. It is not possible to compare such
approaches with methods that employ a single cost function but they provide a higher level of flexibility in the handling of constraints. The multi-criteria approach is able to comfortably handle a range of
fundamentally different constraints and to establish a balance between them according to whatever
quality measure may be applied.

A New Adaptive Heuristic Framework for Examination Timetabling Problems

In 1997, Ross, Hart and Corne [41] discussed some of the limitations of Genetic Algorithms and concluded that a future direction for timetabling research might be to investigate Genetic Algorithms to
choose the right algorithm to solve the given problem rather than being employed directly on the problem itself. In 1999, Terashima-Marin, Ross and Valenzuala-Rendon [43] investigated just such an
approach and demonstrated the potential that this shows to raise the level of generality of automated
timetabling methods. Indeed this is one of the research themes that the authors are currently investigating with Ross and Hart on a UK research council funded project [16] to investigate hyper heuristics
which can be thought of as heuristics to choose heuristics. The research presented in this paper has
been carried out under this project.
Another approach to exam timetabling over the years has been to consider constraint based techniques.
In 1994 Nuijten, Kunnen, Aarts and Dignum [38] employed constraint satisfaction on a real world
exam timetabling problem from Eindhoven University of Technology. Boizumault, Delon and Peridy
[2] used a constraint programming language called CHIP to develop an exam timetabling package.
They also presented results on a real world timetabling problem from LUniversite Catholique de
lOuest. In 1997, David [26] presented a constraint based approach that incorporates the use of heuristics and local repair methods. His approach was used at the Ecole des Mines de Nates.
Examination timetabling problems are generating considerable interest from researchers across the
fields of Operations Research and Artificial Intelligence. More details about some future directions for
timetabling research such as case based reasoning (to solve the problem directly and also to select
appropriate heuristics), multi-criteria methods and hyper-heuristics can be seen in [18]. The range of
methods and techniques that have been used over the years to tackle exam timetabling problems have,
on the whole, tended to draw on problem specific information and particular heuristics. This paper
deals with the goal of trying to develop more general exam timetabling systems that are, to a certain
extent, independent of the heuristics being employed.

2 The Examination Timetabling Problem and heuristic construction


The general problem that will be presented and discussed in this paper is concerned with scheduling a
number of exams into a set number of periods or timeslots. The constraints of the problem are:
1. No student should be required to attend two exams at the same time.
2. The allocated number of seats per period should not be exceeded.
3. Students should be given where possible a full period between any two exams.
In reality there are often a number of other side constraints on top of these for certain exams such as
limiting an exam to certain times or rooms etc.
As has been mentioned in the introduction above, it is often useful to think of the clash elimination part
of this problem in terms of graph colouring. The relationship with the graph colouring problem can be
illustrated by associating exams with vertices and by associating clashes between exams with the edges
between the vertices. The relationship is completed by associating colours with the periods in the timetable. With this obvious similarity it is no surprise that a number of graph colouring approaches (as
briefly discussed in the introduction above) have been applied to the exam timetable problem. Probably
the best known of these is that of Heuristic Construction or Heuristic Sequencing.
In terms of graph colouring, these methods function by using a heuristic to estimate how difficult each
vertex will be to colour. The overall idea is that by colouring the most difficult vertices first it is likely
that we will require a lower number of colours to completely colour the graph than if we had coloured
the vertices in a random order. Examples of common heuristics that are often used to estimate difficulty
include:

A New Adaptive Heuristic Framework for Examination Timetabling Problems

Largest Degree First. Vertices with a large number of edges with other vertices (this being
termed the Degree) are dealt with first. These are considered to be more difficult to schedule
than those with a lower degree.

Largest Colour Degree First. This is similar to largest degree except that we only count edges
with vertices that are already coloured. For example, if we had a vertex with a high degree but
where none of its adjacent vertices have been coloured yet, then this is considered to be not currently difficult as it could be assigned any colour.

Saturation Degree. This heuristic chooses the exams with the least valid periods that are currently available in the timetable. The idea here is that these exams need scheduling sooner rather
than later because the number of options could be running out.
Other similar techniques are often used for graph colouring such as Brelazs DSATUR algorithm
[4] which is based on a dynamic ordering system, as opposed to largest degree first which is obviously
a static ordering.
As mentioned above in the introduction, a method was proposed by Burke, Newall and Weare
[15]to improve on the results of traditional heuristic construction methods by adding a random element
to the process. Here instead of always scheduling the most difficult exam at each stage, we could
schedule a random choice of the five most difficult exams. With this random element we are likely to
get a different solution each time the algorithm is run, having the effect that the method can be run
multiple times and the best solution kept. The results presented in [15] showed this iterated approach
could produce substantially better results that a single non-randomised run.

3 An Adaptive Heuristic Construction Method


3.1 Motivation
A key motivation in the design of the method presented in this paper is the goal of developing more
general solutions to exam timetabling problems. Many timetabling researchers over the years have
designed exam timetabling algorithms and approaches and this work has certainly increased our
knowledge of such problems and how to solve them. However, it is the case that many of the techniques and methods focus on one problem or type of problem. Carter and Laporte [20] point this out in
their survey paper. Until recently, there has not been much research to try and develop timetabling systems that can operate at a higher level of generality. This is beginning to change now (see [41, 43, 16,
6, 18]. The overall goal of this paper is to attempt to make the choice of heuristic in the automated
exam timetabling process much less important than it currently is.
For example, take largest degree first. As a heuristic it functions by estimating how difficult each
vertex will be to colour, this being based on the assumption that vertices with more edges are typically
more difficult to colour. As we move from graph colouring to related problems like timetabling more
additional factors come in to play. For instance an event may be difficult because there is only one suitable room available, or that it must be scheduled within a limited timespan. This means that largest
degree first becomes less useful as more factors are added to the problem.
In essence we want to arrive at an estimation of difficulty by experience, rather than by a pre-specified
metric. A good current example of this is saturation degree sorting, which estimates difficulty based on
the number of valid colours/periods currently available to assign to a vertex/event. Carter et al. conclude in [22] when comparing different algorithmic strategies:
...We have shown that the combined use of a backtracking strategy and of a saturation degree
sorting rule almost systematically yields shorter schedules in less computing time. This is clearly
the case of the random test problems and for the more difficult real problems....

A New Adaptive Heuristic Framework for Examination Timetabling Problems

A key point with experience based approaches is that we would expect them to have a better worst and
average case performance than those based on pre-defined metrics. This would then alleviate the need
for the for time consuming tweaking by a human operator.
In [15] an iterated heuristic construction method was used, however each iteration of this method was
essentially isolated from every other iteration with no reuse of partial solutions. However it seems logical that instead of merely using a heuristic to guess how difficult an exam will be to schedule, we
could augment this with the experiences of previous iterations when actually trying to schedule that
exam.
As an example suppose that exam A is deemed by our heuristic to be only moderately difficult. The
algorithm will then schedule all the exams that are deemed to be more difficult before it comes to exam
A. By this time it may not be able schedule exam A without breaking one or more hard constraints. If
this is the case, it would a good idea to promote exam A up the difficulty order in future runs of the
algorithm. This could be thought of as being analogous to a human performing the task manually. If he
or she has trouble scheduling certain exams then he or she will probably remember this the following
year and give them priority. The proposed approach however will use a somewhat more accelerated
timescale.
It could also be argued that this approach could be employed to reduce violations of soft constraints.
This is somewhat problematic as determining what is an acceptable level of violation is a very subjective matter. We will, however, try to address this issue in our implementation which is presented in the
next section.

3.2 Implementation
3.2.1 Basic Heuristic Approach
Figure 1 shows a sample pseudo-code implementation of the simple heuristic method used as the basis

FOR each exam e in order of decreasing estimated difficulty


IF e can be schedule in the timetable THEN
schedule e in the period of least penalty
ELSE
leave e unscheduled
ENDIF
ENDFOR

Figure 1. Pseudo-code for a basic heuristic approach

for these experiments. Quite often the heuristic chosen is not completely appropriate and a form of
backtracking, such as that employed by Carter et al. [22], is needed to produce a feasible timetable.
The overall goal of the research presented in this paper is to attempt to reduce the level of importance
of this choice of heuristic.
3.2.2 Heuristic Modifiers
To implement this idea we introduce the heuristic modifier. This is simply an integer that is added to
that produced by our heuristic to give a new measure of difficulty. The perceived difficulty of an exam
e at iteration i is given in EQ-1, where heuristic(e) gives the heuristic estimate of difficulty and heurmodei gives the heuristic modifier for exam e at iteration i.
difficulty ( e, i ) = heuristic ( e ) + heurmod ei

A New Adaptive Heuristic Framework for Examination Timetabling Problems

(EQ 1)

Having defined this modifier we must now define under what circumstances we should alter it. One
possibility would be to increase the modifier if we find that an exam cannot be scheduled without
breaking one or more hard constraints. This should help in the generation of feasible timetables which
can itself be a problem. In addition we could also increase the modifier if an exam cannot be scheduled
without breaking certain soft constraints, the aim here being to improve the overall quality of the timetable. We will discuss both feasibility and quality.
3.2.3 Feasibility (i.e. when Considering hard Constraints only)
As we are concerned with hard constraints here we need only increase the modifier when an exam cannot be scheduled without breaking any such constraints. EQ-2 shows the formulation used for increasing the modifier for the next iteration.
heurmod ei + 1 = heurmod ei

heurmod ei + 1 = heurmod ei + 1

, iff exam e can be scheduled


, iff exam e cannot be scheduled

(EQ 2)

It is clear that implementing this will require only a negligible amount of system resources over the
standard approach. The pseudo-code implementation for the framework, using the definitions in EQ-1
and EQ-2, is shown in figure 2.

FOR i := 1 TO <max number of iterations>


FOR each exam e in order of decreasing difficulty(e, i)
IF e can be schedule in the timetable THEN
schedule e in the period of least penalty
heurmodei+1 := heurmodei
ELSE
heurmodei+1 := heurmodei + 1
ENDIF
ENDFOR
evaluate solution and store if best found so far
ENDFOR

Figure 2. Sample pseudo-code for the adaptive framework


3.2.4 Quality (i.e. when Considering both hard and soft Constraints)
As mentioned above, considering soft constraints presents the question of What level of violation is
acceptable?. This will inevitably depend on the nature of each problem and will vary considerably
from institution to institution. For this approach we choose to implement a method whereby the level
of acceptable violation is lowered gradually under certain conditions.
In all test cases we use a linear weighted penalty function to evaluate solutions. This can also be used
to evaluate the cost of scheduling a single exam. We can then say that an exams cost is acceptable if it
is less than a variable maxCost. A reasonable initial value for maxCost can be found by doing a dummy
run and selecting the highest cost found when scheduling an exam. This can then be gradually reduced
in order to increase the pressure to find better solutions.
The rate at which to reduce maxCost presents a new problem. To get round some of the pitfalls maxCost is only reduced when the solution is in a state of equilibrium, by which we mean that all exams
can be scheduled with a cost lower than maxCost. Once the solution is in such a state subsequent runs

A New Adaptive Heuristic Framework for Examination Timetabling Problems

will produce identical results until maxCost is lowered enough to cause at least one exam to be viewed
as unacceptable.
It is possible that when using this method we may have cases where two or more exams cannot all have
a cost lower than maxCost all at the same time, even when they are all scheduled first. This results in a
cycle, that unless broken, will continue forever. To break these cycles we maintain a count of how
many times an exam has had its modifier increased, once it reaches a set limit (of say 100 times) we
then regard an exam as being exempt. What this essentially means is that a solution can still be in a
state of equilibrium even if one or more exempt exams have just been modified. This allows the algorithm to lower maxCost, even when a cycle occurs, and concentrate on the other exams.
A possible advantage of this approach is that the maximum cost for any exam, at least for solutions in
a state of equilibrium, will tend to be lower because we have a set limit on maxCost. This might be
viewed as being a fairer system. The system of maxCost could also be adapted for different needs.
For instance, we could determine it in terms of cost per student so large exams take more of the burden from the smaller exams. It also has possibilities for multi-objective problems where we have a
hierarchy of constraints. For example we might want to try and eliminate students having two exams in
a row, before trying to eliminate two exams in a day.

4 Results
4.1 Benchmark Setup
To evaluate the possible benefits of the method it was tested on a wide range of real world timetabling
problems that were used by Carter et Al[22] to evaluate algorithmic strategies for timetabling. These
problems were also used by Di Gaspero and Schaerf [29] to test Tabu Search techniques. A subset of
these problems was also used by Burke and Newall[12] to evaluate the effects of decomposing a problem into smaller chunks. Thanks to this use of free available data we can make direct comparison with
these three different techniques. Table 1 lists all problems used for testing together with their characteristics. Where appropriate the number of periods used for testing by Carter et al is given.

Data

Institution

Periods

Number
of
Exams

Number
of
Students

Number of
Enrolments

Density of
Conflict
Matrix

car-f-92

Carleton University, Ottawa

32

543

18,419

55,552

0.14

car-s-91

Carleton University, Ottawa

35

682

16,925

56,877

0.13

ear-f-83

Earl Haig Collegiate Institute,


Toronto

24

190

1,125

8,108

0.29

hec-s-93

Ecole des Hautes Etudes


Commerciales, Montreal

18

81

2,823

10632

0.20

kfu-s-93

King Fahd University, Dharan

20

461

5,349

25,118

0.06

lse-f-91

London School of Economics

18

381

2,726

10919

0.06

pur-s-93

Purdue University, Indiana

N/A

2,419

30,032

120,690

0.03

sta-f-83

St Andrews Junior High


School, Toronto

13

139

611

5,751

0.14

tre-s-92

Trent University, Peterborough,


Ontario

23

261

4,360

14901

0.18

uta-s-93

Faculty of Arts and Sciences,


University of Toronto

35

622

21,267

58,981

0.13

Table 1. The benchmark problems used

A New Adaptive Heuristic Framework for Examination Timetabling Problems

Data

Institution

Periods

Number
of
Exams

Number
of
Students

Number of
Enrolments

Density of
Conflict
Matrix

ute-s-92

Faculty of Engineering,
University of Toronto

10

184

2,750

11,796

0.08

yor-f-83

York Mills Collegiate Institute,


Toronto

21

181

941

6029

0.27

nott

Nottingham University, UK

N/A

800

7,896

34,265

0.03

Table 1. The benchmark problems used


Two methods were used for evaluating solutions. The first is that shown by Carter et al [22] where a
proximity cost ws is assigned whenever a student has to sit two examinations s periods apart. These
weights are defined as: w1 = 16, w2 = 8, w3 = 4, w4 = 2, w5 = 1. The sum of all these measures is then
divided by the number of students to give an average penalty for each student. For these problems there
are no limits on the amount of seating available each period.
The second method of evaluation is that presented by Burke and Newall[12]. For these problems there
is a set limit on the number of students that can sit an exam in each period. The penalty function is calculated by counting all situations where a student had two exams in adjacent periods on the same day,
weighted by 3, plus the number of situations where a student had two exams in adjacent periods but
split over 2 days. Any exams that are left unscheduled incurred a further penalty of 5000 each. The
weights were arbitrarily chosen though they are intended to reflect the relative of importance of the
constraints. This function is shown in EQ-3.
penalty ( t ) = 3.sameDay ( t ) + overnight ( t ) + 5000.unscheduled ( t )

(EQ 3)

A major aspect of this proposed approach is the ability to adapt initial choices of heuristic. Experiments were conducted with various initial orderings for the method:

Largest Degree First. This is generally thought of asa simple but reasonably effective heuristic
for graph colouring and timetabling problems. We might, therefore, expect our adaptive
approach to work reasonably well when started on this heuristic.

Flat Ordering. Here we start the process by a assigning value of zero to each exam instead of
using the degree, resulting in a flat ordering. We would expect poor results when using this
ordering usually, and therefore there is a lot of scope for the adaptive method to outperform it.

Smallest Degree First. Here we take the opposite of Largest degree first to form a misleading
heuristic. We might expect here results even worse than when using a randomised ordering. The
challenge here for an adaptive approach is that it will have to virtually reverse the ordering
before it will find reasonable results.
It is worth noting that Colour Degree and Saturation Degree orderings were not used. This is because
their dynamic nature would complicate the adaption process. Experiments were performed both with
and without the mechanism for taking into account soft constraints for modification. As the method
does not include any random elements only a single run for each scenario and problem needed to be
run.
All the experiments presented here were run on a Athlon 900Mhz system running linux. Please note in
the comparisons that the other methods were run on slower systems. The results given by Di Gaspero
and Schaerf[29] were performed on a Athlon 650Mhz, those of Burke and Newall[12] were run on a
300Mhz Alpha EV-6 system. The experiments of Carter et al.[22] were run on a 16.7Mhz SUN SPARC
sever 330. Given the relatively slow speed of this machine cpu times were not included in the comparisons for the experiments of Carter et al. Where we compare with randomised approaches we take the
average costs as this seems the fairest way to compare randomised and deterministic methods.

A New Adaptive Heuristic Framework for Examination Timetabling Problems

4.2 When Adapting Based on Hard Constraints Only


The first experiments were performed using the mechanism to increase the modifier only when an
exam could not be scheduled due to hard constraints. Here the method will stabilise and then terminate
when it has found a feasible solution. As it does not particularly try to optimise the soft constraints we
would not expect it to particularly excel with respect to those constraints.
4.2.1 Using a Largest Degree First Initial Ordering
Table 2 shows the results obtained when using Largest Degree First as our base heuristic. The best
Tabu Solver (avg.)
Data

Di Gaspero & Schaerf

Carter et al.

Adaptive (LD)

Cost

Time

Cost

Cost

Time (s)

car-f-92

5.6

834.4

6.2-7.6

5.23

1.4

car-s-91

6.5

30.12

7.1-7.9

5.97

1.6

ear-f-83

46.7

3.6

36.4-46.5

40.53

0.3

hec-s-93

12.6

4.9

10.8-15.9

15.01

0.02

kfu-s-93

19.5

14.8

14.0-20.8

18.07

1.2

lse-f-91

15.9

23.7

10.5-13.1

13.8

0.4

sta-f-83

166.8

7.3

161.5-165.7

169.71

0.1

tre-s-92

10.5

14.5

9.6-11.0

10.63

0.3

uta-s-93

4.5

36.0

3.5-4.5

4.48

2.5

ute-s-92

31.3

16.0

25.8-38.3

33.82

0.1

yor-f-83

42.1

25.2

41.7-49.9

45.95

0.3

Table 2. Results when seeding with largest degree first


results are presented in bold. Even though the algorithm does not modify on the basis of soft constraints it manages to achieve the best result on the car-f-92 and car-s-91 problems, and is comparable
to Carter et als approach in the other cases. It should be noted that the results of Carter et al. are a
range based on using different heuristics, the best result was not always found with the same heuristic
and, of course, our approach employs the same heuristic throughout. The Tabu Solver also competes
well in most cases.
4.2.2 Using other Initial Orderings
In order to establish how much the initial ordering can affect the results, experiments were conducted
with two other ordering methods. Firstly a flat ordering was used to identify how much benefit there is
to using an initial heuristic ordering at all. Secondly the reverse of largest degree (i.e. smallest degree
first) was tried so as to evaluate the performance of the method when given an inappropriate heuristic.
When using a flat initial ordering we lose any benefits gained by using largest degree first.We would
expect our method here to maybe generate worse solutions and take longer as it has to evolve its own
ordering. The results in table 3 show that in most cases we indeed achieve a slightly worse result, howData

Using LD initial order

Using flat initial order

Using SD initial order

Cost

Time(s)

Cost

Time(s)

Cost

Time(s)

car-f-92

5.23

1.4

4.92

0.9

6.00

7.9

car-s-91

5.97

1.6

6.06

1.15

6.91

10.8

Table 3. Results achieved when using different initial orderings

A New Adaptive Heuristic Framework for Examination Timetabling Problems

10

Using LD initial order

Data

Using flat initial order

Using SD initial order

Cost

Time(s)

Cost

Time(s)

Cost

Time(s)

ear-f-83

40.53

0.3

48.27

0.1

50.87

0.7

hec-s-93

15.01

0.02

19.07

0.01

15.31

0.1

kfu-s-93

18.07

1.2

18.25

0.3

21.20

3.2

lse-f-91

13.8

0.4

14.43

0.3

16.56

1.91

sta-f-83

169.71

0.1

164.95

0.01

167.28

0.05

tre-s-92

10.63

0.3

10.36

0.2

11.21

1.0

uta-s-93

4.48

2.5

4.02

1.0

4.82

11.8

ute-s-92

33.82

0.1

36.28

0.03

32.77

0.2

yor-f-83

45.95

0.3

48.02

0.2

46.68

0.5

Table 3. Results achieved when using different initial orderings


ever the time taken is generally considerably less. Here the results for car-f-92, sta-f-83, tre-s-92 and
uta-s-93 are actually slightly better than when using largest degree first. Indeed, the approach, when
employing the flat initial order, produces the best solution across all comparisons (including Carters
results) for the car-f-92 problem. This is a little surprising. The overall impression here is that largest
degree first is not an entirely suitable heuristic for some of these problems.
As largest degree first is generally regarded to be a reasonable heuristic for timetable problems we
would expect the reverse of this ordering to achieve very poor results when used on its own. Therefore
starting the method with an initial smallest degree first method should present a challenge to the
method and give a good idea of worst case performance. The ordering was achieved here by giving
each exam a heuristic value obtained by subtracting the degree of the exam from the total number of
exams. The results in table 3 show that, as we would expect, it takes much longer for the algorithm to
evolve an ordering that produces a feasible solution. This is because the genuinely hard exams will
tend to be placed towards the end of the ordering. There is then a long process where they must fight
their way towards the front. As was found with the flat initial ordering there are cases where the final
result is actually better than when using largest degree first and, in the case of ute-s-92, it produces the
best results across the three orderings although it does not beat Carters approach. In all cases though
the results remain competitive, which is a considerable achievement given that the method has been
given a completely inappropriate heuristic. It should be noted that even the Tabu Solver of Di Gaspero
and Schaerf uses graph colouring heuristics to generate an initial feasible solution.

4.3 When Adapting Based on both hard and soft Constraints


While competitive results were found when adapting on hard constraint violation only it may be the
case that we can improve the results further by considering violation of soft constraints using the
method out-lined above. The results shown in table 4 confirm this to be the case although the improvements are relatively small. Using the LD initial ordering, the approach is able to produce the best
Tabu Solver (avg.)
Data

Di Gaspero & Schaerf

Carter et
al.

Using LD initial ordering

Using flat initial ordering

Cost

Time(s)

Cost

Cost

Time(s)

Cost

Time(s)

car-f-92

5.6

834.4

6.2-7.6

4.43

23.1

4.49

18.9

car-s-91

6.5

30.12

7.1-7.9

5.23

33.1

5.35

26.6

ear-f-83

46.7

3.6

36.4-46.5

38.12

0.5

40.46

2.5

hec-s-93

12.6

4.9

10.8-15.9

12.44

0.5

12.60

0.7

kfu-s-93

19.5

14.8

14.0-20.8

15.76

17.8

16.32

16.4

Table 4. Results when considering soft constraints when adapting

A New Adaptive Heuristic Framework for Examination Timetabling Problems

11

Tabu Solver (avg.)


Data

Di Gaspero & Schaerf

Carter et
al.

Using LD initial ordering

Using flat initial ordering

Cost

Time(s)

Cost

Cost

Time(s)

Cost

Time(s)

lse-f-91

15.9

23.7

10.5-13.1

11.46

13.8

11.39

13.5

sta-f-83

166.8

7.3

161.5165.7

170.15

2.2

166.51

1.2

tre-s-92

10.5

14.5

9.6-11.0

8.80

2.0

8.86

3.0

uta-s-93

4.5

36.0

3.5-4.5

3.38

32.7

3.47

31.3

ute-s-92

31.3

16.0

25.8-38.3

27.93

2.6

29.20

2.3

yor-f-83

42.1

25.2

41.7-49.9

42.07

3.1

43.28

1.0

Table 4. Results when considering soft constraints when adapting


results on 4 of the test cases even though the initial aim of the approach is to be general and competitive rather than to beat other approaches to the problem. Indeed, we would have considered the
approach to be a success if it could get into the same ball-park as these heuristic dependent
approaches while being more general, much quicker and easier to implement. It is not only comparable
to these approaches but can actually produce better results in some cases.

4.4 Comparisons with Burke and Newall


In addition to the above comparisons we shall also compare with the approach presented by Burke and
Newall[12]. Results for the same data sets were also presented by Di Gaspero and Schaerf[29] providing another angle for comparison with the Tabu Solver approach. In general the problems here are
based more on the real life situation and include limits on the number of seats per period. The penalty
function used was as given in EQ 3. Table 5 lists the problems used and the time and seating limitations
on them.
Data

Number
of periods

Max students per


period

car-f-92

36

2,000

kfu-s-93

21

1,955

nott

23

1,550

pur-s-93

30

5,000

Table 5. Data used by Burke and Newall[12]


As the approach presented in [12] involves a number of different techniques and parameters we will
compare with the setup that produced the best results in general, namely saturation degree with a set
size of 50 and a look ahead set. Table 6 shows the comparative results of Di Gaspero and Schaerfs
Tabu Search Solver, Burke and Newalls decomposition approach[12] and the adaptive method with
both largest degree first and flat initial orderings. As can be seen the decomposition approach domiData

TS Solver

Decomposition

Adaptive (LD)

Adaptive (Flat)

average

average

time(s)

cost

time(s)

cost

time(s)

car-f-92

3377

1765

186

1973

13.1

1926

7.2

kfu-s-93

1845

1626

105

1877

1769

8.1

nott

810

552

156

557

17.2

613

24.9

pur-s-93

126046

80323

1522

105116

163.7

108577

184.9

Table 6. Comparison with Burke and Newall [12]


nates the results for these problems. The adaptive approach however does follow closely behind and

A New Adaptive Heuristic Framework for Examination Timetabling Problems

12

has substantially lower run times, even when taking the difference in machine speed into account. The
decomposition approach is also a much more complicated method to implement.

5 Conclusions
The experiments have shown the adaptive method to perform very efficiently and competitively on a
wide range of problems. The method compares well with other more time consuming approaches and
is relatively easy to implement. The specific aim of the research represented in this paper is not to
present another heuristic approach that can produce better results on benchmark problems. Instead the
objective is to investigate fundamentally more general ways of handling exam timetabling problems
that are not dependent on particular heuristics or problem specific information. This should lead to the
development of systems that can handle a wide range of exam timetabling problems and the approach
could be investigated for problems other than exam timetabling.
Although using deliberately unsuitable heuristics does have a detrimental effect on performance, both
in terms of solution quality and the time taken to find even a feasible solution, we have shown that a
good starting heuristic is not crucial to the process. It is in any case unlikely that the such an unsuitable
heuristic would ever be used in a real life application.
The adaptive method does in fact give us two mechanisms by which to solve the problem. If the given
ordering heuristic is ideal for the problem then a good solution will be produced at the start of the process. Otherwise if the heuristic is not, as is likely, entirely suitable then the adaptive method can try to
improve or salvage the initial ordering. This could lead to significant developments of software that
would ultimately be used by relatively novice users with little familiarity with graph theory and with
little idea of the suitability or unsuitability of particular heuristics. Another potential benefit is that
more general knowledge poor systems are cheaper to develop than problem specific systems and this
could lead to greater use of more general systems in the user community.
While numerical results on relatively simple problems like examination timetabling are an important
indication of effectiveness, a major advantage of this approach may be its ability to gradually increase
the pressure to produce fairer timetables. While the approach we have taken is to cap the total penalty of any one exam, it would be possible to concentrate only on certain constraints that we regard to
be particularly important. For instance, in exam timetabling it is usually very desirable to spread the
exams as evenly as possible across the entire timetable. We could call these constraints firm in that
they are actually treated somewhere between hard and soft constraints.

Acknowledgments
The research described in this paper was supported by EPSRC grant GR/N36837/01.

References
[1]

V. A. Bardadym. Computer-aided school and university timetabling: A new wave. In Peter Ross
Edmund Burke, editor, The Practice and Theory of Automated Timetabling: Selected Papers
from the 1st International Conference, Lecture Notes in Computer Science 1153, pages 2245.
Springer-Verlag, Berlin, 1996.

[2]

Patrice Boizumault, Y. Delon, and L. Peridy. Constraint logic programming for examination
timetabling. Journal of Logic Programming, 26(2):217233, February 1996.

[3]

Jean Paul Boufflet and Stephane Negre. Three methods used to solve an examination timetable
problem. In Edmund Burke and Peter Ross, editors, The Practice and Theory of Automated
Timetabling: Selected Papers from the 1st International Conference, Lecture Notes in Computer
Science 1153, pages 327344. Springer-Verlag, Berlin, 1996.

[4]

D. Brelaz. New methods to colour the vertices of a graph. Communications of the Association for

A New Adaptive Heuristic Framework for Examination Timetabling Problems

13

Computing Machinery, 22:251256, 1979.


[5]

Bernd Bullnheimer. An examination scheduling model to maximize students study time. In


Michael W. Carter Edmund K. Burke, editor, Lecture Notes in Computer Science 1408, pages
7891. Springer-Verlag, Berlin, 1998.

[6]

E. K. Burke, P. I. Cowling, and S. Petrovic. A case based approach to heuristic selection for
timetabling. Research Project funded by the Engineering and Physical Sciences Research
Council (EPSRC), Grant Ref: GR/M95516/01, 2000.

[7]

E. K. Burke, D. G. Elliman, P. H. Ford, and R. F. Weare. Examination timetabling in british


universities - a survey. In Edmund Burke and Peter Ross, editors, The Practice and Theory of
Automated Timetabling: Selected Papers from the 1st International Conference, Lecture Notes in
Computer Science 1153, pages 7690. Springer-Verlag, Berlin, 1996.

[8]

E. K. Burke, D. G. Elliman, and R. F. Weare. A university timetabling system based on graph


colouring and constraint manipulation. Journal of Research on Computing in Education,
27(1):118, 1994.

[9]

E. K. Burke, D. G. Elliman, and R. F. Weare. A hybrid genetic algorithm for highly constrained
timetabling problems. In Larry J. Eshelman, editor, Genetic Algorithms: Proceedings of the 6th
Internation Conference, pages 605610, San Francisco, 1995. Morgan Kaufmann.

[10] E .K. Burke, D. G. Elliman, and R. F. Weare. Specialised recombinative operators for timetabling
problems. In T. C. Fogarty, editor, Lecture Notes in Computer Science 993 (AISB Workshop on
Evolutionary Computing), pages 7585. Springer-Verlag, Berlin, 1995.
[11] E. K. Burke, Kirk Jackson, Jeffrey H. Kingston, and R. F. Weare. Automated university
timetabling: The state of the art. The Computer Journal, 40(9):565571, 1997.
[12] E. K. Burke and J. P. Newall. A multi-stage evolutionary algorithm for the timetable problem.
IEEE Transactions on Evolutionary Computation, 3(1):6374, 1999.
[13] E. K. Burke, J. P. Newall, and R. F. Weare. A memetic algorithm for university exam
timetabling. In Edmund Burke and Peter Ross, editors, The Practice and Theory of Automated
Timetabling: Selected Papers from the 1st International Conference, Lecture Notes in Computer
Science 1153, pages 241250. Springer-Verlag, Berlin, 1996.
[14] E. K. Burke, J. P. Newall, and R. F. Weare. Initialization strategies and diversity in evolutionary
timetabling. Evolutionary Computation, 6(1):81103, 1998.
[15] E. K. Burke, J. P. Newall, and R. F. Weare. A simple heuristically guided search for the timetable
problem. In International ICSC Symposium on Engineering of Intelligent Systems (EIS 98),
pages 574579. ICSC Academic Press, Canada/Switzerland, 1998.
[16] E. K. Burke, P. M. Ross, P. I. Cowling, S. Petrovic, and G. Kendall. An investigation of hyperheuristic methods. Research Project funded by the Engineering and Physical Sciences Research
Council (EPSRC), Grant Ref: GR/N36837/01, 2000.
[17] Edmund Burke, Yuri Bykov, and Sanja Petrovic. A mulitcriteria approach to timetabling. In
Edmund K. Burke and W. Erben, editors, Practice and Theory of Automated Timetabling III
(Lecture Notes in Computer Science 2079), pages 118131. Springer, Berlin, 2001.
[18] Edmund Burke and Sanja Petrovic. Recent research directions in automated timetabling. To
appear in the European Journal of Operations Research, 2002.
[19] M. W. Carter. A survey of practical applications of examination timetabling. Operations
Research, 34:193202, 1986.
[20] M. W. Carter and G. Laporte. Recent developments in practical examination timetabling. In
Edmund Burke and Peter Ross, editors, The Practice and Theory of Automated Timetabling:
Selected Papers from the 1st International Conference, Lecture Notes in Computer Science 1153,

A New Adaptive Heuristic Framework for Examination Timetabling Problems

14

pages 321. Springer-Verlag, Berlin, 1996.


[21] M. W. Carter, G. Laporte, and J.W.Chinneck. A general examination scheduling system.
Interfaces, 11:109120, 1994.
[22] M. W. Carter, G. Laporte, and S. Lee. Examination timetabling: Algorithmic strategies and
applications. Journal of the Operational Research Society, 47(3):373383, 1996.
[23] D. Corne, H. L. Fang, and C. Mellish. Solving the modular exam scheduling problem with
genetic algorithms. In Proceedings of the Sixth International Conference on Industrial and
Engineering Aplications of Artificial Intelligence and Expert Systems, pages 370373, 1993.
[24] D. Corne, P. Ross, and H. Fang. Fast practical evolutionary timetabling. In T.C.Fogarty, editor,
Lecture Notes in Computer Science 865, pages 250263. Springer-Verlag, Berlin, 1994.
[25] Dave Corne and Peter Ross. Peckish initialisation strategies for evolutionary timetabling. In
Peter Ross Edmund Burke, editor, The Practice and Theory of Automated Timetabling: Selected
Papers from the 1st International Conference, Lecture Notes in Computer Science 1153, pages
227240. Springer-Verlag, Berlin, 1996.
[26] Philippe David. A constraint-based approach for examination timetabling using local repair
techniques. In Edmund K. Burke and Michael W. Carter, editors, Lecture Notes in Computer
Science 1408, pages 169186. Springer-Verlag, Berlin, 1998.
[27] D. de Werra. An introduction to timetabling. European Journal of Operations Research, 19:151
162, 1985.
[28] D. de Werra. Restricted coloring models for timetabling. DMATH: Discrete Mathematics, 165,
1997.
[29] Luca Di Gaspero and Andrea Schaerf. Tabu search techniques for examination timetabling. In
Edmund K. Burke and W. Erben, editors, Practice and Theory of Automated Timetabling III
(Lecture Notes in Computer Science 2079), pages 104117. Springer, Berlin, 2001.
[30] K. A. Dowsland. Simulated annealing solutions for multi-objective scheduling and timetabling.
In Modern Heuristic Search Methods, pages 155166. Wiley, Chichester, England, 1996.
[31] Kathryn A. Dowsland. Off=the-peg or made-to-measure timetabling and scheduling with sa and
ts. In Edmund K. Burke and Michael W. Carter, editors, Lecture Notes in Computer Science
1408, pages 3752. Springer-Verlag, Berlin, 1998.
[32] Wilhelm Erben. A grouping genetic algorithm for graph colouring and exam timetabling. In
Edmund K. Burke and W. Erben, editors, Practice and Theory of Automated Timetabling III
(Lecture Notes in Computer Science 2079), pages 132156. Springer, Berlin, 2001.
[33] Ayhan Ergul. GA-based examination scheduling experience at a middle east technical university.
In Peter Ross Edmund Burke, editor, The Practice and Theory of Automated Timetabling:
Selected Papers from the 1st International Conference, Lecture Notes in Computer Science 1153,
pages 198211. Springer-Verlag, Berlin, 1996.
[34] Emanuel Falkenauer. Genetic Algorithms and Grouping Problems. John Wiley and Sons,
Chicester, 1998.
[35] E. Foxley and K. Lockyer. The construction of examination timetables by computer. The
Computer Journal, 11:264268, 1968.
[36] A. Hertz. Tabu search for large scale timetabling problems. European Journal of Operations
Research, 54:3947, 1991.
[37] N. K. Mehta. The application of a graph coloring method to an examination scheduling problem.
Interfaces, 11:5764, 1981.
[38] W. P. M. Nuijten, G. M. Kunnen, E. H. L. Aarts, and F. P. M. Dignum. Examination timetabling:

A New Adaptive Heuristic Framework for Examination Timetabling Problems

15

A case study for constraint satisfaction. In ECAI 94 Workshop on Constraint Satisfaction Issues
Raised by Practical Applications, pages 1119, 1994.
[39] Peter Ross and Dave Corne. Comparing genetic algorithms, simulated annealing and stochastic
hillclimbing on timetable problems. In T. C. Fogarty, editor, Lecture Notes in Computer Science
993 (AISB Workshop on Evolutionary Computing), pages 94102. Springer-Verlag, Berlin, 1995.
[40] Peter Ross, Dave Corne, and Hsiao-Lan Fang. Improving evolutionary timetabling with delta
evaluation and directed mutation. In Y. Davidor, H-P. Schwefel, and R. Manner, editors, Parallel
Problem Solving in Nature, volume III, pages 565566. Springer-Verlag, Berlin, 1994.
[41] Peter Ross, Emma Hart, and Dave Corne. Some observations about ga based timetabling. In
Michael W. Carter Edmund K. Burke, editor, Lecture Notes in Computer Science 1408, pages
115130. Springer-Verlag, Berlin, 1998.
[42] A. Schaerf. A survey of automated timetabling. Artificial Intelligence Review, 13(2):87127,
1999.
[43] Hugo Terrashima-Marin, Peter Ross, and Manuel Valenzuela-Rendon. Evolution of constraint
satisfaction strategies in examination timetabling. In Proceedings of the Genetic and
Evolutionary Computation Conference, pages 635642. Morgan Kaufmann, San Francisco,
1999.
[44] J. M. Thompson and K. A. Dowsland. General cooling schedules for a simulated annealing based
timetabling system. In Peter Ross Edmund Burke, editor, The Practice and Theory of Automated
Timetabling: Selected Papers from the 1st International Conference, Lecture Notes in Computer
Science 1153, pages 345364. Springer-Verlag, Berlin, 1996.
[45] D. J. A. Welsh and M. B. Powell. An upper bound for the chromatic number of a graph and its
application to timetable problems. The Computer Journal, 10:8586, 1967.
[46] George M. White and Bill S. Xie. Examination timetables and tabu search with longer-term
memory. In Edmund K. Burke and W. Erben, editors, Practice and Theory of Automated
Timetabling III (Lecture Notes in Computer Science 2079), pages 85103. Springer, Berlin, 2001.

A New Adaptive Heuristic Framework for Examination Timetabling Problems

16

Você também pode gostar