Genetic Algorithm with Elitist-Tournament for Clashes-Free Slots of Lecturer Timetabling Problem

ABSTRACT


INTRODUCTION
The timetabling problem appears to be a tiresome job that involves scheduling of students, classes, lecturers and rooms at specific time-slots while satisfying all the necessary requirements to build a practical timetable. The normal problem of creating a practical timetable is a scheduling lectures, classes and rooms into fixed timeslots while ensuring that there are no clashes between lecturers and rooms in the same period. Therefore, the resources become difficult to schedule, thus the choice of this project topic to optimize timetable scheduling under given constraints.
The problem considers the allocation of the resources such as lecturers, students and classrooms in timeslots while satisfying the constraints of existing facilities. Traditionally, timetable scheduling was done manually by the education center staffs which require a lot of times and efforts. Numerous aspects should be taken into considerations and it is often difficult to meet all the requirements and satisfy the constraints. One of the biggest problems with the manual timetabling is to deal with finding clashes-free slot [1]. Any changes require the team to undo previous allocation and find a new allocation resulting in a series of backtracks. In short, timetable scheduling is one of the hardest areas that proven to be NP-Complete problem [2]. Educational institutions usually grow in number and its complexity. A general timetable scheduling is considered as a multi-dimensional problem in which it needs to assign a set of students, classrooms, subjects, and staff to timeslots according to required constraints [3].
To overcome these problems, automated and practical timetable generator is needed in which it can help provide the path to find an optimal or near-optimal solution to the problem within a short period of time using different techniques of optimization. A feasible timetable is a schedule which essentially must satisfy several constraints. Constraints are almost universally employed by people dealing with timetable scheduling problem [4]. Although many researchers involved in solving the timetabling problem, it is impossible to perfectly solve it because of the variety of constraints in each problem [5]. There are two categories of constraints which are soft and hard constraints. Hard constraints are constraints that cannot be violated and any violation is unacceptable. For example, a lecturer cannot be in two places at the same time, two subjects cannot have common students scheduled in the same time slot and courses cannot be assigned to the same room at the same time. If the hard constraint is violated, then such a schedule will be considered as a failure. While soft constraints are constraints that can be broken, but must be minimized. Although it fails to satisfy these constraints, it is said to be legal if it satisfies all hard constraints [6]. For example, the travel distance of lecturers and students between classrooms should be minimized. It is very difficult to get a solution to solve timetabling problem with all the constraints.
Therefore, many researchers have come up with several techniques to solve hard constraints while minimize the soft constraints even it is difficult to find the best feasible timetable. It has been research few decades ago in various domains related to timetable including assignment and scheduling [7]- [16]. Varies optimization algorithms had been applied and enhanced to support the timetabling problems as such the combination of standard genetic algorithm and hill climbing algorithm that utilize a meme encoded score as a performance indicator to create new candidate solutions during the process of choosing operators [17], In addition, local optimization with hill climbing algorithm [2], ant colony optimization strategy [18], Harmony search and a modified harmony search algorithm [19], Tabu Search [20], Hyperheuristics search the space of heuristics and use the limited problem specific information to control the search process can be seen as an adaptive version of iterated local search strategy combining some move operators. In short, this approach consists of number of move operators of different strengths and characteristics combined into an adaptive hyper-heuristic approach to produce better results [15]. However, clashes-free slot is still not address well when considering the numbers of lecturers and the number of classes, although, one of the solution for clashes-free slots have been addressed focusing on an examination timetable based on small data set and still need improvement in its solution [2], [21]. This paper addresses the Lecturers' timetabling solution in Faculty of Computer and Mathematical Sciences, Universiti Teknologi MARA, Malaysia as a case study. The interest is on the LTP students and lecturers to fixed timeslots within numbers of constraints. Assigning times and places to lecturers are considered hard problems faced in every university. There are two types of constraints, which are the hard constraint and soft constraint. Hard constraint cannot be violated such as all lecturers must be scheduled and assigned to a distinct room at specified periods. A practical timetable must satisfy hard constraints as it is strictly imposed. While soft constraints are desirable, but they are not essential. They can be violated, but they must be minimized. The remainder of this article is organized as follows. Section 2 explains the LTP and its fitness. The GA is discussed in Section 3. Section 4 presents computational results for the tournament (T) and tournament elitism (TE) selection. Section 5 discussion of the findings and Section 6 concludes this paper.

LECTURER TIMETABLING PROBLEM
Lecturer Timetabling Problem (LTP) emphasizes on the assignment of each of lecturers to each of the classes. Lectures of different capacity load for lecturing must accommodate the class requirement for every week. The slot for each lecturer must be determined and satisfied the allocation of time-slot. The following mathematical formulation considers this requirement as an objective function. The LTP can be linearly defined as follows. The LTP consists of a set of lectures, l, a set of subjects, a set of t time slot, a set of r classrooms, and a set of g student groups. The mathematical model formulation is presented in following section. It was adapted from [22]. The notations and parameters used in the model are as follows: Let: l = {l 1 , l 2 , l 3 , l 4 4 , …cr j } the credit hour for each lecturer P = {P 1 , P 2 , P 3 , …P q } is a set of generated timetables The objective is to minimize the overall summation of all penalties from the generated timetable. Higher penalties will be given for hard constraints violation while lower penalties will be given for soft constraints violation. The penalties will be summed up. The calculation of fitness is shown in Equation. (1) The model is as follows: Subject to: A constraint in Equation.
(2) ensures that lecturer cannot teach more than one course at the same time. Equation (3) ensures that no room can occupy more than one lecture at the same time. Constraint in Equation (4) considers no student can attend more than one lecture at the same time. Constraints in Equation (5) and Equation (6) ensure the capacity of classrooms should match with student size and lecturer cannot teach less than given credit hour, respectively. Table 1 shows the violation and its penalties. Lecturer cannot teach more than one course at the same time 50 2.
No room can occupy more than one lecture at the same time 50 3.
No student can attend more than one lecture at the same time 50 4.
The capacity of classrooms should match with student size. 20 5.
Lecturer cannot teach less than given credit hour 20

CONSTRUCTION OF GENETIC ALGORITHM 3.1. Solution Mapping
The development GA requires a representation of the problem. We represent using a discrete value and it addresses the time slot, room and subject. Figure 1 is the chromosome representation for GA. The range is based on the datasets obtained for FSKM. The range of range of 1-18 for time slots, 1-43 for the number rooms and 1-34 for the number subjects are considered.

Computational Experiments According to Population Size
The different number of population size of 20, 50, 120 and 180 are evaluated using the LTP datasets consist of a range of 1-18 for time slots, 1-43 for the number rooms and 1-34 for the number subjects. The constant value of crossover rate = 0.9, mutation rate= 0.001, maximum number of generation of 20, tournament size of 5 are used. Both TE and T are evaluated. The result was demonstrated in Table 3. The performance of GA based on population size with respect to the Tournament (T) and Tournament selection scheme combined with Elitism (TE). The optimal generation and optimal solution for each population size was finally obtained after executing many experiments using different parameters.

Computational Experiments according to Probability of Crossover
This section reports the results for different value of crossover rates of 0.7, 0.8, 0.9 and 0.95 are tested. Other parameters are fixed; population size: 10, mutation rate: 0.00, maximum number of generations: 30, tournament size: 5. The optimal generation and optimal solution for each crossover rates were done by running a few tests to get the best results. To summarize the above figures, a summarization of the optimal generation and optimal solution by each selection scheme is exhibited in Table 4. Crossover rate of 0.9 achieved the highest fitness value, 1.0 at generation 6 when using TE. Meanwhile the crossover rate of 0.9 achieved fitness value of 1.0 at generation 9 for T.  Table 5 demonstrates the results of mutation rates of 0.005, 0.002, 0.001 and 0. Table 4.11 shows the result of the experiment for TE based on different mutation rates. A mutation rate of 0.005 achieved fitness value of 1.0 at generation 10 while a mutation rate of 0.01 able to achieve the highest fitness at generation 30. Table 5 shows the result of the experiment for T based on different mutation rates. A mutation rate of 0.01 achieved fitness value of 1.0 at generation 33 while a mutation rate of 0.005 achieved the highest fitness at generation 49. Both T and TE indicate an optimal solution for mutation rates 0.005 and 0.01 at generation number of 10 and 30, respectively.

Computational Experiments based on Average using T and TE
The use of GA with T and TE is further experimented for 50 experiments and average of fitness and penalty values were calculated and evaluated. The experiments were resulted from the application of mutation rate of 0.05, crossover rate 0.9 and elitist value of 1 and 2. Overall, table 6 shows that with more generation number in this case 100 generations, the average of both fitness and penalty value gives better results compared to only 20 generations.
The population size of 40 obtained the lowest average for penalty value and the highest average for fitness value. However, from 50 experiments, there are fitness value = 1.0 obtained from several experiments for all the three population sizes. The maximum generation of 100, revealed more frequent in achieving fitness value =1.0. The effect of different parameter tuning towards the performance of the GA in solving the Timetabling problem. In terms of minimization of sum of penalties to get the best fit for every solution, higher penalties will be given for hard constraint violation while lower penalties will be given for soft constraint violation for satisfying all the constraints. In terms of the best results produced by the GA, with respect to the parameter tuning and the selection schemes, findings showed that a GA with TE selection method achieved optimal generations faster than T selection method for the experiments based on population size, the probability of crossover and probability of mutation. However, for the experiment based on the number of generations, it achieved the best fitness at much later generation compared to the T selection method.
The findings also showed that a higher probability of crossover is better at achieving the optimal solutions while lower probability of mutation is highly encouraged to get the best solutions. It is also shown that the number of the population should not be very small or very high to achieve the optimal solutions. The results indicate that the selection schemes did not seem to affect the number of generations it converges since both selections are the Tournament selection except that one of them is combined with elitist. However, the results produced are not always constant as it is random and the GA tends not to converge. In addition, the termination criteria for the TE and T implementation are fixed to stop once the GA process reached maximum generation or the best fitness value, 1.0. GA is demonstrated at high potential optimization algorithm to solve LTP in a small and large scale.

CONCLUSIONS
The analysis of both selection schemes, T and TE and parameters tuning in terms of minimizing the sum of penalties were performed to see the effects of each selection scheme and different parameter tuning towards minimizing the overall sum of penalties to get the best fit for every solution in solving the timetabling problem. The finding has demonstrated that both T and TE implementation can offer a best fitness value, but the parameter must be carefully selected. The trial and error of using parameters as such mutation rate, crossover rates, population size and maximum number of generations. In future, a big dataset should be considered to see the capability of the GA of handling more complex optimization solutions.