0% found this document useful (0 votes)
12 views

Time Tabel Base Paper 7

The document describes an automated timetabling system for a university using a co-evolutionary algorithm approach. The system schedules practical courses first and generates a practical population. It then schedules lecture and tutorial courses separately to form a lecture/tutorial population. These two populations co-evolve while sharing resources and constraining each other. The system was able to generate timetables that compare favorably to the previous manual system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Time Tabel Base Paper 7

The document describes an automated timetabling system for a university using a co-evolutionary algorithm approach. The system schedules practical courses first and generates a practical population. It then schedules lecture and tutorial courses separately to form a lecture/tutorial population. These two populations co-evolve while sharing resources and constraining each other. The system was able to generate timetables that compare favorably to the previous manual system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

A Co-evolutionary Algorithm approach to a University Timetable System

C. K. Chan, H. B. Gooi and M. H. Lim


eckchan@,ntu.edu.sp
School of Electrical and Electronic Engineering
Nanyang Technological University
Nanyang Avenue
Singapore

-
Abstract This paper describes an automated curriculum curriculum is fairly dynamic and such software would
timetabling system based on a stochastic search methodology, become obsolete very fast. In addition, commercial software
namely a co-evolutionary algorithm. The application timetable is complex to use and do not meet the needs of the School
is taken from the undergraduate courses of the School of directly.
Electrical and Electronic Engineering (EEE), Nanyang
Technological University (NTU). A co-evolutionary algorithm
approach is found to be well suited. Practical courses have The current approach to planning the timetable was to
duration greater than one hour. A schedule can be generated manually manipulate the previous timetable, taking into
separately and its population, which consists of a set of practical account impending changes. However, with the introduction
schedules, is termed as the practical population. Lecture and of the modular system and the increasing number of students,
tutorial schedules can also be generated separately. These are of such an approach is no longer efficient. Some students are
one-hour duration and they are termed collectively as also taking a combination of subjects that would not have
lecturehtorial schedule. A set of lecture/tutorial schedules been feasible in the past. For example, a third year student, in
could be generated to form the lecture/tutorial population. addition to taking the third year subjects, may also take some
These two populations use the same set of resources and have second and final year subjects.
constraining effects upon one another. Since the placement of
practical courses have a more constraining effect, the schedules
in the practical population are first generated and are then used Many heuristic algorithms for timetabling have been
to guide the generation of the set of lecture/tutorial schedules. proposed. They include simulated annealing, constraint logic
For every lecture/tutorial schedule generated, it is combined programming, linear programming and graph coloring
with its corresponding practical schedule to form a combined heuristic [1,2,3,4]. Heuristic algorithms use the concept of a
schedule. The average fitness of all the combined schedules is multi-dimensional search space, which contains the complete
then computed and used as a measure of the fitness of the solution set. Heuristic techniques are employed to explore
practical schedule that drives them. The practical population is the search space for the best solution. The main difficulty
then evolved progressively to obtain the best practical schedule. faced in this approach is the tendency to be trapped in a local
It is then used as a base configuration for the rest of the courses
to populate and evolve. The resultant system compares optimal point, which may not be the best.
favorably to the current manual system.
Researchers are now turning to evolutionary algorithms, or
its hybrid, as a powerful method of solving the timetabling
I. INTRODUCTION problems. Evolutionary algorithms [5,6] are powerful
An educational institution, such as a University, relies general-purpose optimization technique, which models the
heavily on a curriculum timetable to function smoothly. A principles of evolution. However, the structure of the EEE
curriculum timetable is usually a schedule containing a set of timetable is not apt for a traditional evolutionary algorithm
teaching activities planned over a week. This timetable is approach. This arises out of the need to incorporate courses
used in NTU over an academic semester, which is 13 weeks having different duration per class session.
long. The planning of such a timetable is not trivial. Some of
the courses of EEE in NTU have more than 1000 students. The main objective of this paper is to present the feasibility
Such courses have to be divided into smaller lecture classes of automating the timetabling process in EEE by using a co-
of about 350 each. Hence, the same lecture may have to be evolutionary algorithm. There are five types of courses:
repeated over a week. At NTU, the planning of timetables is lecture, tutorial, project, laboratory and design. Project,
camed out manually, aided by word-processing, spreadsheet, laboratory and design courses can be further grouped as
database and the internally developed facility-booking practical courses. Practical courses, which have duration per
systems. Commercial timetabling software was once class session longer than one hour, are scheduled first on its
considered but later abandoned as it was felt that the NTU own without considering lecture and tutorial courses. The set

0-7803-7282~/02/$10.0002002 IEEE 1946


of the schedules of such practical courses constitutes a a.No student can be in two or more places at any one
practical population. The lecture and tutorial courses, being period;
of one-hour duration per class session, can be scheduled b. There must be sufficient seating capacity in the venue for
together. The set of these schedules constitutes another all the registered students scheduled in any one period.
population. This population is conveniently termed as the
lecture/tutorial population. There is a lot of similarity
between these two populations. They share the same set of For EEE timetable, there are additional hard constraints to
resources. This has given rise to some constraining effect be satisfied. There must be an hour break between two
upon one another. Hence the generation of a lecture/tutorial practical sessions. The same lecture course should not be
schedule has to take into account the practical schedule. conducted on the same day for the same group of students.
Because of this interaction, they have to be co-evolved. This Certain specified timeslots are reserved for other purposes.
paper describes the co-evolution of these two populations. All the lecture, tutorial, project, laboratory and design groups
must be scheduled. The duration of the lecture, tutorial,
project, laboratory and design groups must be respected in the
11. EEE, NTU Curriculum Timetable schedules generated. The start and end time of the classes in
In NTU, there are 6 schools or faculties, EEE being the each day must be respected in the schedule. Students must be
largest. Students join EEE in their second year, after allowed to have lunch within f 1.5 hours from noon.
successfully completing a common-curriculum in the first
year. Third year students are attached to the industry for Any violation of these hard constraints will result in an
practical training in semester two. As such, there is no infeasible timetable. Evolutionary algorithms operators used
scheduled teaching for third year students in semester two. in this system are carefully designed to avoid any violation of
Final year subjects are divided into nine option groups where these hard constraints.
each group has its own prescribed subjects. They must choose
4 subjects with a minimum of 16 academic units. Each Soft constraints are actually preferences. They can be
academic unit is equivalent to approximately one hour of violated. However, a timetable with many such violations are
lecture per week per semester. In addition, they have to study usually considered as poor in quality. Hence, in most
a number of free elective subjects of general nature. timetable system, the amount of violations is used to
determine the fitness value of a schedule. Some of these soft-
All the students have to study core subjects pertaining to constraints are: bad time slots, e.g., teaching after office
their current year of study. Most of these core subjects are hours; very fragmented lecture sessions in a particular day;
offered in both semesters. Furthermore, students who have venues of consecutive classes are far apart.
failed in some subjects have to retake and pass them within
the university specified time frame.
111. Co-evolutionary Algorithm
There are three lecture groups for the second year and third Co-evolution is defined as a change in the genetic
year students. A lecture course for a particular year must be composition of one species (or group) in response to a genetic
conducted for every lecture group. Each of this lecture group change in another. More generally, the idea of some
is M e r divided into 12 smaller tutorial subgroups. reciprocal evolutionary change in interacting species is a
Similarly, within each lecture group, there are 12 subgroups strict definition of co-evolution.
for each of the laboratory, design and project courses as well.
To minimize clashes, a student is only allowed to choose a As discussed earlier, the timetable of EEE consists of the
subgroup belonging to his lecture group. practical schedule and the lecture/tutorial schedule. The
placement of practical courses in a practical schedule has a
In planning a timetable, there are two types of constraints constraining effect upon the placement of lecture and tutorial
that must be considered. They are termed as the hard and soft courses in the lecture/tutorial schedule. Hence, the use of a
constraints. co-evolutionary algorithm approach to the problem is most
appropriate.
There are two hard constraints that are universal to all
timetabling problems. They are: The overall flow chart of the co-evolutionary algorithm is
shown in Figure 1. The prelude module performs most of the
basic set up in the genes, chromosomes and populations of

0-7803-7282-4/02/$10.00 02002 BEE 1947


timetable. Although the placement of individual courses in a
practical schedule is almost constant, the placement of each
practical subgroup is important in directing placement of the
other one-hour lecture and tutorial courses. Hence, an optimal
placement of student groups in a practical schedule is
desirable. This is obtained by using the evolutionary search

-
methodology on the population of practical schedules. One
Compute fitness important consideration is then the fitness of each practical
schedule. A logical approach is to generate randomly several
lecture/tutorial schedules from each practical schedule. Each
lecture/tutorial schedule and the corresponding practical
schedule are combined into a main schedule. The fitness
value of each combined schedule is computed. The average
fitness value is then used to express the fitness of the
corresponding practical schedule. This is shown in Figure 2.

L--FF-i co= 1

1
Keep best schedule

t co <= coend?

Init lectudtutorial pop


II Computefitness
I

IS Awrage fitness

I
I
Figure 1 Main flow chart

the system. g is a loop counter for each generational step. Figure 2 Compute fitness of practical schedule flow chart
gend is the maximum number of generations. The postlude
module closes all working files and databases and terminates
the program normally. In Figure 2, co is a loop counter over the set of schedules
in the practical population. coend is the number of schedules
An initial population of practical schedules is generated by in the practical population.
a random placement of all practical courses. Due to the large
number of such courses, they are more or less fixed in As shown in Figure 2, one of the key operations is to
position in the practical schedule. The only movable entity is generate a population of lecturehutorial schedules from every
the placement of individual student group. With this in mind, practical schedule. This is usually done randomly. However,
mutation of a practical schedule is simply a random mutual the operation is very time-consuming and can fail. Certain
swapping of two student groups. The mutation used here is practical schedule is very constrained and it is not possible to
very much akin to the manual planning process where a populate other one-hour courses on it without violating some
timetable planner likes to make only minor changes to the

0-7803-7282-4/02/$10.00 02002IEEE 1948


serious hard constraints. Such violations will result in an IV. Implementation
infeasible timetable. Even if there are possible generations of Since courses that are of two or three hour duration are
lecture/tutorial schedules, there may be too few of it. This considered here, only the second and third year courses are
may take many unsuccessful attempts before they are found. incorporated in testing the system. Most of the final year
This imposes great complexity in the design of the operation. courses are of one-hour duration and are not related to these
A simple way will be to assign a pre-specified limit on the lower year courses. However, this option can be considered
number of trials on each generation. Upon reaching the limit in the future as the curriculum for the final year courses
and there is no generation of any lecture/tutorial schedule, a might be changed.
low fitness value is then assigned to the corresponding
practical schedule. A low fitness value for a practical There are altogether 50 timeslots in a week. Each timeslot
schedule implies that it is very likely to be discarded in the is a one-hour slot. Timeslot 1 starts at Monday 8:30 am and
selection module at the next evolutionary step. This approach ends at Monday 9:30 am. Timeslot 2 starts at Monday 9:30
requires careful consideration of the limit value. If it is set too am and ends at Monday 10:30 am.Timeslot 9, which is
high, a lot of processing time is wasted. If it is set too low, a considered a bad timeslot, starts at Monday 4:30pm and ends
good possible practical schedule might be missed. Intuitively, at Monday 5:30pm. Timeslot 50, which is also a bad timeslot,
a good practical schedule does not generate many good starts at Saturday 12:30 pm and ends at Saturday 1:30 pm. At
lecture/tutorial schedules as it is usually very constraining. each timeslot, multiple courses can be conducted as long as
Hence, a higher limit is desirable. no hard-constraints is violated.

The data structure used for the implementation is a linear


The fitness value of each combined schedule is computed
collection of available resources arranged according to their
based on the amount of soft-constraint violations. There are
timeslot in an ascending order. Each of these available
several soft-constraints to be considered in the EEE
resources is termed as a gene and has a type, room capacity
timetable. One particular important soft-constraint violation
and its availability status. In each timeslot, each available
is that some courses are conducted outside normal office-
resource for that timeslot is coded as a gene in the
hours, which is 5pm for weekday and lpm for weekend. For
chromosome. For example, if there are five lecture theatres
EEE, these are timeslots that end at 5:30 pm on weekdays and
available in timeslot 1, then five genes for timeslot 1, which
1:30 pm on Saturday. These assignments actually represent
have type lecture will be coded into the chromosome.
failures to place all courses on the proper timeslot. Placing
courses after office-hours is highly undesirable, as it requires
Each collection is like a chromosome in a population. A
additional resources and manpower. In addition, such population consists of a set of these chromosomes. Two
timeslots are not popular with students. This will result in an
populations are needed in this system. They are the practical
uneven distribution of all the courses. Hence, practical
and lecture/tutorialpopulation. These populations have
schedules, which allow generation of lecture/tutorial similar genetic structure. A population of practical schedules
schedules with minimum amount of such violation, are
consists of a set of such chromosomes with practical courses
desirable. Therefore, the fitness value of each combined
being properly scheduled in. Similarly, a population of
schedule is computed based on the amount of violation of this
lecture/tutorial schedules consists of a set of such
soft-constraint. There are other soft-constraints, which are not
chromosomes with lecture and tutorial courses properly
considered here but will be included in future works.
scheduled in.

The linear scaling over the fitness values and the roulette TABLE 1 NEEDS AND RESOURCES TABLE
selection method are used to select the set of practical
schedules for mutation [ 121. Just before mutation, the best 1 Types of courses 1 Number of sessions I Number of sessions I
needed available
practical schedule is kept. After mutation, the previously kept Lecture 69 150
best practical schedule replaces the worst practical schedule Tutorial 152 600
in the latest population of practical schedules. This is done to Laboratory 76 80
preserve the good practical schedules and at the same time Project 38 40
allows some urobabilistic diversitv. Design 38 40

0-7803-7282-4/02/$10.00 82002 IEEE 1949


Table 1 shows the needs and resources of the whole second schedule. To ease the situation, either the number of courses
and third year timetable in semester 1. A session is a number offered or the number of student groups has to be reduced.
of timeslots placed consecutively together. As can be seen in
the table, the available sessions for the laboratory, project and
design courses are very close to the need. This explains the
tight and constraining situations for the practical schedules.
Although there are relatively many available sessions for
lectures and tutorials, their placements are severely affected u) 225
u)
by the practical courses placed in parallel with these sessions. a
c
CI
ii
An initial population of five practical schedules is
randomly generated. For every generation, an initial
population of ten lecture/tutorial schedules is generated on
every practical schedule. A schedule from the lecture/tutorial
population is combined with its corresponding practical
schedule. The fitness of the combined schedule is then
computed. This combination of schedules and computation of
fitness is repeated over the whole lecture/tutorial population. Figure 3 Fitness vs generation
An average fitness value of these ten fitness values is then
computed and is considered being a measure of the fitness of
the corresponding practical schedule. This is repeated for
every schedule in the practical population. This concludes the TABLE 2 NO. OF FAILURES VS GENERATION
computation of one generation. The number of generations is Generation # I No. of failures I Generation # I No. of failure
set at 20. 11 I n
0 I 11
11 I 3
?
2 0 12 0
Mutation involves randomly selecting two positions on a 3 1 1-4 A
particular chromosome of the practical schedule. The distance
between the two points is empirically set at 30% of the length
of the chromosome. These positions denote the portion of the
chromosome whereby mutation can take place. Each of the
genes within this portion is considered for swapping with
another gene within the same chromosome but not in this
portion. Swapping will take place only if no hard-constraints
is violated. Hard-constraints violations are clashes in the
usage of resources within the chromosome. These have been Table 2 shows the number of infeasible situation whereby
mentioned earlier. a particular practical schedule fails to produce a feasible
lecture/tutorial schedule. The number of failures is relative to
The whole algorithm is implemented in Microsoft Visual a population of 5 practical schedules. As the evolution
Basic on a PC platform. Microsoft Access is also used to progresses, the practical schedule improves in its fitness.
store the timetable and other auxiliary data structures. However, the number of failures increases too. This is in a
way, expected. A better practical schedule produces fewer
lecture/tutorial schedules. In fact, the failures would be higher
V. Results if the trial limit is set too low. It has been found that the
Figure 3 shows the average fitness value of each number of trials has to be progressively increased in order to
population of practical schedule in each evolution step. The find a set of feasible solutions. Eventually, a maximum of 10
result is obtained after 20 generations. The fitness value trials has been assigned to each generation of the
reflects the average number of unoccupied bad slots. The lecture/tutorial schedule. This has significantly increased the
figure should be as high as possible. The highest possible computational time.
value for this set of data is 276. As shown in Figure 3, after
20 generations, the average number of unoccupied bad slots
saturated at about 230. This reflects the tightness of the

0-7803-7282-4/02/$10.00 02002 IEEE 1950


VI. Conclusions Notes in Computer Science 1153, pages 46-75, Springer-Verlag,
A co-evolutionary algorithm approach has been Berlin, 1996.
successfully applied to solve a university curriculum E.K.Burke, J.P.Newal1, “A Multi Evolutionary Algorithm for the
timetable, namely that of EEE. The EEE curriculum timetable timetable Problem”, IEEE Transactions on Evolutionary
has a natural intrinsic structure in which separate practical Computation, Vol. 3, No 1, pp.63-74, April 1999.
and lecture/tutorial schedule can be obtained. An optimal
E.K. Burke and A.J. Smith”A Memetic Algorithm for the
combined schedule of the two separate schedules, after Maintenance Scheduling Problem“, Proceedings of the ICONIP’97
successive co-evolution between them, has been generated. Conference, Dunedin, New Zealand, (published by Springer), pp
This is a first step in automating the scheduling of EEE 469-474., 24-28 November 1997
timetable. It will not only relief the tedious task of
M. W. Varter, G. Laporte, and S.Y. Lee, “Examination timetabling:
timetabling, but will provide some form of measurement to a Algorithmic strategies and application“, Dept. Industrial Eng, Univ.
completed timetable. There are many alternative timetables Toronto, Working Paper 94-03, Jan. 1995.
generated for the planner to choose from as compared to the
manual system. M. R. Garey and D. S. Johnson, “Computers and Intractability: A
Guide to the Theory of NP-Completeness”, W. H. Freeman, New
York, 1979.
Future works will focus on ways to reduce the number of
failed attempts and improve on the computation of the fitness D.E. Goldberg, “Genetic Algorithms in Search, Optimization and
value of the practical schedule. The initialization of the Machine Learning”, Addison-Wesley, 1989.
lecturehtorial population module is very time-consuming as
compared to the other operations. Hence, future effort will
also be focused on reducing the computation time of this
module.

References

E.K. Burke, D. G. Elliman, R. Weare, “Automated Schedulingof


University Exams”, proceedings of the IEEE Colloquium on
Resource Scheduling for Large Scale Planing System, June 1993.

M.W.Cater, G. Laporte, “Recent Developments in Practical


Examination Timetabling”, First InternationalConference in
Practice and Theory of Automated Timetabling, pp. 3- 21, Sept
1995.

M.W.Cater, G; Laporte, “Recent Developments in Practical


Examination Timetabling”, Second Intemational Conference in
Practice and Theory of Automated Timetabling 11, pp. 3-19, Aug
1997.

A. Schaerf, “Tabu Search Techniques for Large High-School


Timetabling Problems”, proceeding of the 13* National Conference
of the American Association for Artificial Intelligence (AAA1-96,
1996),

E.K. Burke, D.G. Elliman and R.F. Weare, “A Hybrid Genetic


Algorithm for Highly Constrained Timetabling Problems”,
proceedings of the 6th Intemational Conference on Genetic
Algorithms pp 605-610, Morgan Kaufinann, San Francisco, CA,
USA, (ICGA’95, Pittsburgh, USA, 15th-19th July 1995).

R. Dawkins “The Selfish Gene”, London, U.K.: Oxford Univ. Press,


1976.

A. Wren, “Scheduling, timetabling and rostering - a special


relationship?”The Practice and Theory of Automated Timetabling:
Selected Papers from the 1” Intemational Conference, Lecture

0-7803-7282-4/02/$10.00 02002 JEEE 1951

You might also like