Background

Timetabling is a common problem of educational institutions, e.g., schools and universities. It can be divided into three categories. The first one is school timetabling which includes scheduling of school classes. The second one is university course timetabling which determines which course should be assigned to which lecturer on which day and time slot. The third one is examination timetabling which schedules the examinations of given courses. Examination timetabling is a hard, complex, and time-consuming task. It is very confusing when developed experimentally. Examination timetabling problem (ETP) is to determine the exact date and time as well as the room in which each exam should be held. Such a problem can be formulated using mathematical models.

In this paper, a new model is presented for university examination timetabling problem (ETP). The paper has two main novelties. The first one is that it considers multi-offered or multi-code courses. At the beginning of a semester, the dean of a department may notice that a large number of students wish to take a specific course. The number of these students may be more than the capacity of a class. As a result, that course is offered in two or more classes. This is called the multi-code course. Obviously, these classes may be scheduled on different days of the week, but their exam should be held simultaneously. The second novelty of the paper is that room split is allowed. Naturally, each exam should be held in one room. If the number of students who have taken a course is larger than the capacity of a room, they should be divided into two rooms. Assume that the examination of courses A and B are held simultaneously. The number of students who took these courses is 40 and 45, respectively, and the capacity of each exam room is 30 students. It is possible to assign a room for course A (with a capacity of 30 students) and a room for course B (with a capacity of 30 students), and both courses share a room between the remaining students (10 students for course A and 15 students for course B). This is called room split.

The proposed model includes some hard and soft constraints. The objective function is set in such a way that soft constraints are satisfied as much as possible. The model is applied and tested in the Industrial Engineering Department of Islamic Azad University in Firoozkooh, Iran. In this department, 12 courses are offered in four terms for postgraduate students.

Timetabling problem in educational institutions is categorized in three groups: university examination, university course, and school timetabling. University examination timetabling defines the exact day, time slot, and room that each exam is held. In other words, which exam is scheduled on which day, the time slot, and in which building, floor, and room it is held are determined. Although there are some novel research that focused on the modeling and formulation of ETP, a large number of researchers are interested in the applications of heuristics to solve the problem. Here, a wide range of previous research both on modeling and solution approach are briefly presented.

A comprehensive survey on ETP was performed by Qu et al. (2009a). They considered both theoretical and practical research done in a 10-year period.

Dammak et al. (2006) focused on room assignment of exams and also on a heuristic to solve it. If the solution that resulted from the heuristic indicates that only one exam is held in a room, the problem is finished. Otherwise, the algorithm tries to reach a solution in which two exams are assigned to a single room at most. In a similar research, Ayob and Malik (2011) focused on room assignment for each exam in such a way that the total movement of students between rooms during two consecutive exams was minimized. Also, the model has another objective to minimize the number of rooms assigned to a single exam.

MirHassani (2006) developed a model based on a predefined exam timetable in order to maximize paper spread. Ayob et al. (2007a) used a new objective function for ETP. The objective function they presented was the penalty cost which was a modification of the objectives introduced by Carter et al. (1996) and Burke and Newall (1999).

Ayob et al. (2007b) solved a model with the aim of improving the quality of the timetable, which tried to minimize the number of students with two consecutive exams in a day. Burke et al. (2008) defined a model that included seven objectives. They grouped the objectives in such a way that each group satisfied the specific party (students, markers, invigilators, and estates).

Cheong et al. (2009) developed a model that minimized the length of timetable and prevented students to take exams in consecutive exams as much as possible. They formulated a multi-objective model and solved it using an evolutionary algorithm.

Sagir and Ozturk (2010) formulated the assignment of invigilators to exams as a multi-objective model and calculated the weights of objectives using the analytic network process. Kahar and Kendall (2010) applied a model on a real case regarding some new constraints such as distance between rooms. In the end, they used a heuristic to solve the problem. McCollum et al. (2011) considered an integer programming model with a cost penalty objective function. It tried to satisfy soft constraints as much as possible, and if it failed, a penalty was accounted.

Among the research done based on solution approach, Alvarez-Valdes et al. (1997) proposed a new algorithm that included several heuristics based on tabu search in order to solve an ETP in a Spanish university. The objective of the model was to reach the best schedule for all students. Dimopoulou and Miliotis (2001) focused on developing a course and exam timetable. At first, the course timetable was developed, and its solution was used to generate an initial exam schedule. The initial exam was further improved using a heuristic.

Mansour et al. (2011) applied the scatter search algorithm to generate a timetable for examinations and used it on a real case to show the efficiency of the heuristic. White et al. (2004) proposed a technique based on tabu search to solve an ETP. Naji Azimi (2005) applied the combination of simulated annealing, genetic algorithm, tabu search, and ant colony in order to solve an ETP.

Petrovic et al. (2007) used a case-based reasoning technique to choose the proper order of heuristics that should be applied to find an initial solution. Pillay and Banzhaf (2009) represented a new approach for heuristic combinations in which heuristics were applied simultaneously. Pillay and Banzhaf (2010) applied a genetic algorithm approach in order to get a set of solutions for an ETP in such a way that all hard constraints were met. It then improved the solutions in order to satisfy soft constraints as much as possible.

Modarres et al. (2010) used a new version of the fuzzy analytical hierarchy process to prioritize courses in a management school. They chose the best courses offered by ranking them.

Burke et al. (2010) used variable neighborhood search along with genetic algorithm for an ETP. Turabieh and Abdullah (2011) combined the principle of the electromagnetic-like mechanism with a great deluge algorithm to solve an ETP. Some algorithms based on graph coloring were applied by Malkawi et al. (2008) and Qu et al. (2009b) to solve ETP.

The structure of the paper is as follows. Problem assumptions are discussed in the ‘Problem description’ section. In the ‘Methods’ section, the mathematical model is described and is tested in a real case in the ‘Results and discussion’ section. Concluding remarks are in the ‘Conclusions’ section.

Problem description

In this paper, a binary model is represented to schedule examinations of postgraduate students of the Industrial Engineering Department of Islamic Azad University (Firoozkooh, Iran). Students were taking nine courses during the first three terms and worked on a thesis in the fourth term. In each term, they can take three courses. All exams should be held on the first and second floors of the department. Each floor has three available rooms for exams. Here is a list of educational rules and assumptions:

  1. 1.

    The postgraduate level includes four terms. Students take courses in the first three terms, with the last term dedicated to their thesis.

  2. 2.

    Students are categorized in three groups: beginners (students who are currently on their first term), juniors (students who have studied for one term and are currently on their second term), and seniors (students who have studied for two terms and are currently on their third one).

  3. 3.

    In total, 12 courses are offered by the department.

  4. 4.

    All 12 courses are categorized in three groups; each group includes four courses. The first, second, and third groups are offered to beginners, juniors, and seniors, respectively.

  5. 5.

    Each student should only take the courses offered for his/her group. For example, a junior student cannot take a course offered to beginners or seniors.

  6. 6.

    In each term, a student has to take three courses among the four ones offered to him. Thus, the student has options.

  7. 7.

    All courses are divided in to three groups: simple, medium, and hard.

  8. 8.

    All exams should be held on the first and second floors of the department.

  9. 9.

    On each floor, there are three rooms that can be used for exams.

  10. 10.

    The number of students registered for a course is given.

  11. 11.

    If the number of students who wish to take a specific course is more than the capacity of a class, the course can be offered more than once in the term. This is called the multi-code course.

  12. 12.

    The classes of a multi-code course may be scheduled on different days of the week, but their exam should be held simultaneously.

  13. 13.

    In order to use the capacity of a room efficiently, room split is allowed. It means that a room may be share between two courses whose examinations are held simultaneously. Assume that two exams are held simultaneously, and the number of students of each course is much more than the capacity of a room. In this case, two rooms may be assigned to these exams (one room to each exam) and a room for the remaining students of both exams (in total, three rooms are assigned).

  14. 14.

    All exams should be scheduled in a 6-day period. The planning period begins on a Saturday and ends on a Thursday.

  15. 15.

    Each day includes two time slots.

Methods

In this section, a binary model is developed based on the given rules and assumptions. There are some hard and soft constraints in the model. Obviously, hard constraints should be fully met. The objective function is set in such a way that soft constraints are satisfied as much as possible. In other words, the objective function minimizes the degree of soft constraint dissatisfaction. The model solution determines that each exam is held on which day and time slot and also in which building, floor, and room. The nomenclatures are as follows.

Indices and sets

Here are the indices and sets used:

I is the set of exams (courses).

i is the index of exam (iI).

J is the set of student groups (beginners, juniors, and seniors).

j is the index of student group (jJ).

T is the set of time slots.

t is the index of time slot (tT).

R is the set of rooms.

r is the index of room (rR).

L is the set of days in the scheduled period length.

l is the index of day (lL).

B is the set of buildings. According to assumption 8, all exams should be held in one building. As a result, B includes only one building for the case under study. However, it is defined as we develop the general model.

b is the index of the building (bB).

F is the set of floors.

f is the index of the floor (fF).

c is the index of the code (refer to multi-code courses).

J i is the set of student groups included in course i. According to assumption 4, each course is only for one group of students. As a result, J i includes only one member for the case under study. However, it is defined as we develop the general model.

I j is the set of courses offered to student group j.

I m,j is the set of medium courses offered to student group j.

I h,j is the set of hard courses offered to student group j.

T l is the set of time slots available for day l.

C i is the set of codes for course i (number of classes offered for course i). If course i is a multi-code course, it is offered more than once due to the large number of students who wish to take it. For example, if a multi-code course is offered twice in a single term, C i has two members (1 and 2). If a course is offered only once, C i has only one member (1).

F b is the set of floors in building b.

R b,f is the set of rooms located in floor f of building b.

Parameters

Here are the parameters used:

S i,c is the number of students registered at code c of course i.

Cap bfr is the capacity of room r which is located on floor f of building b.

NC i is the number of times that course i is offered in a semester. If i is not a multi-code course, NC i is one.

Variables

Here are the variables used:

X ijlt is a binary variable that has a value of 1 if exam i for student group j is scheduled on day l and time slot t; otherwise, it has a value of 0.

Y icbfrlt is a binary variable that has a value of 1 if the examination of code c of course i is scheduled on day l and time slot t and is held in room r of floor f of building b; otherwise, it has a value of 0.

H iclt is a binary variable that has a value of 1 if code c of course i is scheduled on day l and time slot t; otherwise, it has a value of 0.

Z icbf is a binary variable that has a value of 1 if the examination of code c of course i is held on floor f of building b; otherwise, it has a value of 0.

W bfrlt is a binary variable that has a value of 1 if room r of floor f of building b is split on day l and time slot t; otherwise, it has a value of 0.

Constraints

All constraints are divided into hard and soft ones. They are as follows.

Hard constraints

There are some constraints that should not be violated. These are called hard constraints, and they are as follows:

  1. 1.

    All exams should be scheduled. For this, the following equation is used:

    j J i l t T l X ijlt = 1 i .
    (1)
  2. 2.

    No student should have two exams in a day. As beginners, juniors, and seniors, they can only choose among the courses offered to them. The constraint is formulated as follows:

    i I j t T l X ijlt 1 l , j .
    (2)
  3. 3.

    All codes (classes) of a multi-code course should be scheduled simultaneously. If two or more classes are offered for a single course, their examination should be held on a single day and time slot. For this, the following equation is used:

    c C i H iclt = N C i X ijlt i , j J i , l , t T l .
    (3)
  4. 4.

    At most, two rooms can be assigned to students of a class. For this, the following equation is used:

    l t T l r R bf y icbfrlt 2 Z icbf i , c C i , b , f F b .
    (4)
  5. 5.

    All students of a class should be scheduled on the same floor. In other words, if the number of students of a class is more than the capacity of a room, they naturally should be split in two rooms. This constraint ensures that those two rooms should be in a single floor. For this, the following equation is used:

    b f F b Z icbf = 1 i , c C i .
    (5)
  6. 6.

    All codes (classes) of a multi-code course should be scheduled on the same building. For this, the following equation is used:

    f F b Z icbf = f F b Z ićbf i , c , ć C i , c ć , b .
    (6)
  7. 7.

    Each room can be assigned to two exams at the most. For this, the following equation is used:

    i c C i y icbfrlt 2 b , f F b , r R bf , l , t T l .
    (7)
  8. 8.

    Room capacity should not be violated. As shown in relation 8, half of the capacity of a room is decreased if it is split:

    S ic Z icbf + X ijlt 1 M r R bf Ca p bfr y icbfrlt 1 2 r R bf Ca p bfr W bfrlt i , j J i , c C i , b , f , F b , l , t T l .
    (8)
  9. 9.

    The following constraints relate variables Y icbfrlt and W bfrlt . In other words, these constraints show the relation between Y icbfrlt and W bfrlt . According to constraint 7, each room can be assigned to at most two exams. From constraint 9, it is clear that if a room is assigned to two exams, the left-hand side = 1. In that case, W bfrlt  = 1. On the other hand, relation 10 ensures that if W bfrlt  = 1, the room is split:

    i c C i y icbfrlt 1 W bfrlt b , f F b , r R bf , l , t T l ,
    (9)
    2 W bfrlt i c C i y icbfrlt b , f F b , r R bf , l , t T l .
    (10)
  10. 10.

    The following constraint relates Y icbfrlt and H iclt . It shows that whenever exam i is scheduled on day l and time slot t, variable H iclt  = 1:

    b f F b r R bf y icbfrlt M H iclt i , c C i , l , t T l .
    (11)

Soft constraints

Soft constraints are those that should preferably be satisfied. However, if a soft constraint is not met, the model will not be infeasible. In this section, soft constraints are introduced. The objective function is then set in such a way that deviations from soft constraint satisfaction are minimized. There are three soft constraints:

  1. 1.

    Each student should have at least one free day to study for a medium course. In other words, if a student takes the exam of a medium course on day l, he/she should not take any exam on day l − 1.

    s I j , s i t T l X sj l 1 t 1 t T l X ijlt M j , i I m , j , l > 1.
    (12)
  2. 2.

    There should be at least two free days to study for a hard course. This is actually shown in two constraints. Relation 13 shows that if a student takes a hard exam on the second day of the planning horizon (Sunday), he/she should not take any exam on the first day (Saturday). Relation 14 is written for l > 2.

    s I j , s i t T l X sj l 1 t 1 t T l X ijlt M j , i I h , j , l = 2 ,
    (13)
    s I j , s i t T l X sjl 2 t + s I j , s i t T l X sjl 1 t 1 t T l X ijlt M j , i I h , j , l > 2.
    (14)
  3. 3.

    Hard courses should not be scheduled for the first two days of the planning period. According to relations 13 and 14, a hard course may tend to be scheduled for the first two days of the planning period. To avoid this and in order that students would have more time to study for a hard course, a soft constraint is applied to prevent hard courses to be scheduled on the first two days of the period.

    j i I h , j l = 1 2 t T l X ijlt 0.
    (15)

Objective function

In order to make sure that soft constraints are satisfied as much as possible, a penalty value is related to a deviation from the ideal situation. As a result, relations 12, 13, 14, and 15 are rewritten as follows:

s I j , s i t T l X sjl 1 t + g ijl g g ijl = 1 t T l X ijlt M j , i I m , j , l > 1 ,
(16)
s I j , s i t T l X sj l 1 t + k ijl k k ijl = 1 t T l X ijlt M j , i I h , j , l = 2 ,
(17)
s I j , s i t T l X sj l 2 t + s I j , s i t T l X sj l 2 t + v ijl v v ijl = 1 t T l X ijlt M j , i I h , j , l > 2 ,
(18)
j i I h , j l = 1 2 t T l X ijlt + d dd = 0.
(19)

With the aim of satisfying relations 12, 13 and 14, gg ijl , kk ijl , and vv ijl are minimized. Also, both d and dd are minimized to ensure the satisfaction of relation 15. As the importance of all soft constraints is assumed the same, the objective function is written as follows:

Min i j J i l g g ijl + k k ijl + v v ijl + d + d d .
(20)

Results and discussion

The presented model was applied and tested in a real case, i.e., in the Department of Industrial Engineering of Islamic Azad University in Firoozkooh, Iran. We are going to develop the best examination timetable for postgraduate students of the department. The courses offered by the department are shown in Table 1. For example, it shows that course A1 is a fairly simple course that is offered to beginners. Also, it is not a multi-code course, while A3 is a hard course and is offered twice in the term (A3-1 and A3-2) due to the fact that a large number of students wish to take it.

Table 1 Descriptions of courses

According to assumption 8, all exams should be held on the first and second floors of the department. Thus, there is only one building in this case. According to assumption 9, there are three available rooms on each floor. Information about floors and rooms is shown in Table 2. The capacity of each room is 25 students.

Table 2 Room data

The model is solved using GAMS 22.5, and the timetable is shown in Figure 1. The solution shows that the first soft constraint is satisfied: medium exams are not scheduled exactly after other exams. As shown in Figure 1, these exams (A2, B2, B3, and C2) are scheduled on the first day of the planning period. The second soft constraint is not fully satisfied. Although A3, B4, and C1 are hard exams, students do not have two free days to study for them. However, they have two free days to study for other hard exams (A4 and C1). The third soft constraint is also fully satisfied. From Figure 1, it is clear that no hard exam is scheduled on the first two days of the planning period. The results also show that all hard constraints are fully met. For example, no student group takes two exams in a single day, no room is assigned to more than two exams, and all codes (classes) of a multi-code course are scheduled simultaneously.

Figure 1
figure 1

Examination timetable.

Conclusions

In this paper, a new binary model is presented to generate a university examination timetable. The contributions of the model considered multi-code courses as well as room split. The model was applied in the Industrial Engineering Department of Islamic Azad University. The model includes some hard and soft constraints. The objective function is set in such a way that deviation from soft constraint satisfaction is minimized. The result shows that all soft constraints are fully satisfied, except for the one indicating that students have two free days for hard exams. There are totally five hard exams in the case. The result shows that students have two free days to study for just two hard exams. This is the best feasible solution as it is impossible to satisfy all soft constraints of the model.