A computational approach to enhancing course timetabling with integer programming
A computational approach to enhancing course timetabling with integer programming
net/publication/222975510
CITATIONS READS
85 742
1 author:
S. A. Mirhassani
Amirkabir University of Technology
97 PUBLICATIONS 2,212 CITATIONS
SEE PROFILE
All content following this page was uploaded by S. A. Mirhassani on 30 July 2018.
A computational approach
to enhancing course timetabling
with integer programming
S.A. MirHassani
Faculty of Mathematics, Shahrood University of Technology, Shahrood 36155-316, Iran
Abstract
We show in this paper that the integer programming approach is well suited for solv-
ing the timetabling problem: the definition of the integer programming model is simple;
its implementation is immediate by using, a mathematical programming language and
an integer programming solver. The power of the integer programming approach allows
us to extend the model in different interesting directions. A novel 0–1 integer program-
ming formulation of the university timetabling problem is presented. The model pro-
vides constraints for a number of operational rules and requirements found in most
academic institutions.
2005 Elsevier Inc. All rights reserved.
1. Introduction
0096-3003/$ - see front matter 2005 Elsevier Inc. All rights reserved.
doi:10.1016/j.amc.2005.07.039
S.A. MirHassani / Appl. Math. Comput. 175 (2006) 814–822 815
2. Problem description
The problem considered here deals with the scheduling of about 200 subjects
over two terms (one year) in the faculty of science. BSc students study 8 terms
before graduation. For example, a student is now at term 4 if he/she started
his/her academic education about two years ago. According to the depart-
mentÕs regulation, a set of certain lectures has to be scheduled in specific terms.
This requirement places students in particular groups, based on the year they
started their studies, which must be considered in any feasible timetable, for
example, basic maths is offered for students at term one and the advanced
one for those at term two and so on. Other subjects will be considered in the
term timetable if the number of students who enrolled is more than a minimum
value. (The minimum value is defined by the departments and can be different
from one subject to another.) For instance, if the grade of a certain student in a
given course during one term in a year is poor enough then he/she has to repeat
the course in the coming terms. Such students cannot graduate on time. Stu-
dents from the 4 different departments of mathematics, physics, chemistry
and geology have to attend some general courses during each term. Thus when
these subjects are scheduled in a term; all the other subjects which are also to be
studied by the students cannot be scheduled at the same time. The most impor-
tant elements of our timetable problem are:
S.A. MirHassani / Appl. Math. Comput. 175 (2006) 814–822 817
3. The model
The mathematical model must represent the correct status of the courses,
lecturers, and classrooms as well as the faculty requirements. A linear model
can be expressed using Boolean variables. First of all, let us define the decision
variables. Let xlcdh (l = 1, . . . , L, c = 1, . . . , C, d = 1, . . . , D, and h = 1, . . . , H) be
a binary variable that is 1 if lecturer l teaches course c on day d at time h; other-
wise 0. It is clear that all combinations of l, c, d and h are not meaningful and
are restricted appropriately. The priority to use different time slots is pre-
defined by parameter ph P 0 with the higher penalty values representing the
lower preferences. The failure to satisfy constraint type (2) or (3) is measured
by the non-negative variable udht, vcd (t = 1, . . . , T, c = 1, . . . , C, d = 1, . . . , D,
818 S.A. MirHassani / Appl. Math. Comput. 175 (2006) 814–822
subject to
X
xlcdh ¼ CS c 8c; ð1Þ
ldh
where the number of sessions necessary for course c is presented by CSc. This is
a hard constraint that must be satisfied properly
X
xlcdh udht 6 1 8d; h; t. ð2Þ
lc
Since all courses that linked to a semester or term may be chosen by the
students simultaneously so it is necessary to schedule in different day and
time slot. The violation of this regulation will be considered by udht, in
constraint (2)
X X
xlcdh þ xlc;dþ1h vcd 6 1 8c; d. ð3Þ
lh lh
This constraint guarantees that no more than one course be assigned to a lec-
turer in each session.
X
xlcdh 6 RoomsðrtÞ 8h; d; rt; ð5Þ
lc;CRT ðcÞ¼RoomTypeðrtÞ
and constraints, in a clear, concise, and efficient way. The variables of the con-
sidered linear programs may be continuous or integer. Its solver computes an
optimal solution to the (integer) linear programs. In order to solve the above
problem, we have formulated it with AIMMS using the following identifiers.
This task is very easy because the obtained program is similar to the usual
mathematical programming formulations. First of all, we need to define sets
and indices.
Data: The following data is presented to the model through a set of param-
eters necessary to avoid having redundant variables or constraints, for exam-
ple, the days a lecturer is working or the courses taught or the number of
sessions to be considered for each course and so on. Some of the tables are
reported here.
Parameters
Identifier Indices Description
CS c Course session requirements
CT c Term no. in which course c will be submitted
CRT c Course room type
LF l, c, d, h 1 if lecturer l is prepared to teach course c on day d
at time h; otherwise 0
Rooms r Number of type r rooms
Variables
Identifier Index domain Description
X (l, c, d, h)jLF(l, c, d, h) 1 if lecturer l teaches course c on day
d at time h; otherwise 0
U (d, h, t) The infeasibility of soft constraint (2)
V (c, d) The infeasibility of soft constraint (3)
820 S.A. MirHassani / Appl. Math. Comput. 175 (2006) 814–822
Constraints
Identifier Index domain Definition
Const1 (c) Sum((l, d, h), X(l, c, d, h)) = CS(c)
Const2 (d, h, t) Sum((l, c)jCT(c) = t, X(l, c, d, h)) U(d, h, t) < = 1
Const3 (c, d) Sum((l, h), X(l, c, d, h)) + Sum((l, h), X(l, c, d + 1, h))
V(c, d) < = 1
Const4 (l, d, h) Sum((c), X(l, c, d, h)) < = 1
Const5 (d, h, r) Sum((l, c)jCRT(c) = RoomType(r), X(l, c, d, h)) <
= Rooms(r)
4. Experimental Results
Problem specification
Parameter name Number Description
Lecturer 25 Full time and part time
Courses 75 Including pre-assigned
Terms 8 As shown in the next table
Days 7 Friday afternoon excluded
Classroom types 3 Labs included
Time slots 6 Except Friday that is 2
Variables 1226 1082 binary
Constraints 944 Excluding simple upper bounds
Non-zeros 3355 Density 0.29%
5. Conclusion
The method for timetabling described in the present paper is superior to the
method currently used by Shahrood University of Technology and performs
well in comparison to other well-known methods that have been applied.
The main point is considering room allocations and students requirements
implicitly in order to avoid model size growth. A possible issue that was not
clearly reflected in the experiments is the relationship between the amount of
time the search is allowed and how much the search process is limited. It seems
logical that if the search process is given more time, the limitation on the search
space can be relaxed (applicable to large problems). Lastly, it is important to
mention the role of the values chosen for cost coefficients. According to our
experience, changing the penalty functions it is possible to change the compu-
tation time by a large factor, meaning that the optimization process may be
guided faster to the optimal solution.
References
[1] R. Alvarez-Valdes, G. Martin, J.M. Tamarit, Constructing good solution for the Spanish
school timetabling problem, Journal of Operation Research Society 47 (1996) 1203–1215.
[2] P. Dige, C. Lund, H. Raun, Timetabling by simulated annealing applied simulated annealing,
Lecture Notes in Economics and Mathematical Science 396 (1993) 151–174.
[3] D. Abramson, Constructing school timetables using simulated annealing sequential and
parallel algorithms, Management Science 37 (1991) 98–113.
[4] A. Hertz, Tabu search for large timetabling problem, European Journal of Operational
Research 54 (1991) 39–47.
822 S.A. MirHassani / Appl. Math. Comput. 175 (2006) 814–822
[5] J. Lions, Matrix reduction using the Hungarian method for the generation of school timetable,
Communications of the ACM 9 (1966) 349–354.
[6] A. Tripathy, School timetabling a case in large binary integer linear programming,
Management Science 30 (12) (1984).
[7] T.B. Cooper, J.H. Kingston, The complexity of timetable construction problems, in:
Proceedings of the First International Conference on the Practice and Theory of Automated
Timetabling, 1995.
[8] S. Daskalaki, T. Birbas, E. Housos, An integer programming formulation for a case study in
university timetabling, European Journal of Operational Research 153 (2004) 117–135.
[9] E.A. Silver, An overview of heuristic solution methods, Journal of the Operational Research
Society 55 (2004) 936–956.
[10] K. Papoutsis, C.V. Alouxis, E. Housos, A column generation approach for the timetabling
problem of Greek high schools, Journal of the Operational Research Society 54 (2003) 230–
238.
[11] S.K. Mirrazavi, S.J. Mardle, M. Tamiz, A two-phase multiple objective approach to university
timetabling utilising optimisation and evolutionary solution methodologies, Journal of the
Operational Research Society 54 (2003) 1155–1166.