0% found this document useful (0 votes)
39 views8 pages

A Combination of Genetic Algorithms and Local Search To Solve A Real Data University Timetable Scheduling Problem

This document presents a Hybrid Genetic Algorithm (HGA) developed to solve the complex problem of university timetable scheduling, incorporating local search techniques to enhance optimization. The algorithm was tested on real data from the University of Udine, Italy, and aims to efficiently generate feasible timetables while considering various constraints. The study discusses the integration of new techniques that ensure timetable integrity and compares the HGA's performance with previous methods in the field.

Uploaded by

roshnixbadrinath
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)
39 views8 pages

A Combination of Genetic Algorithms and Local Search To Solve A Real Data University Timetable Scheduling Problem

This document presents a Hybrid Genetic Algorithm (HGA) developed to solve the complex problem of university timetable scheduling, incorporating local search techniques to enhance optimization. The algorithm was tested on real data from the University of Udine, Italy, and aims to efficiently generate feasible timetables while considering various constraints. The study discusses the integration of new techniques that ensure timetable integrity and compares the HGA's performance with previous methods in the field.

Uploaded by

roshnixbadrinath
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/ 8

A Combination of Genetic Algorithms and Local

Search to Solve a Real Data University Timetable


Scheduling Problem
Evgenia Psarra1, Dimitris Apostolou1,2
1
Department of Informatics, University of Piraeus, Piraeus, Greece
2
Institute of Communications and Computer Systems, Athens, Greece

{jennypsarraemp, dapost}@mail.ntua.gr, [email protected]


2023 14th International Conference on Information, Intelligence, Systems & Applications (IISA) | 979-8-3503-1806-7/23/$31.00 ©2023 IEEE | DOI: 10.1109/IISA59645.2023.10345845

Abstract—The problem of generating a University method of our work implements novel updating techniques
timetable is a very complex one because it comprises a lot of in the construction of successive generations and it results in
parameters (courses, classrooms and their capacities, lectures, widening the problem’s domain of definition and thus it
professors, students’ and professors’ preferences etc.) which enhances the optimization process. Our work was tested on
should be combined successfully. In order to contribute to the the real dataset of university of Udine (Italy) [13].
solution of this problem we developed a Hybrid Genetic
Algorithm (HGA). Generally, a genetic algorithm simulates the II. BACKGROUND AND RELATED WORK
nature of the chromosomes in biology, which are comprised of
cells called genes. More specifically we adapted to the A. Related Work
specificities of this complicated problem a genetic algorithm In this section we cite approaches addressing the
and we enriched it with prototype local search methods so as to university timetable scheduling problem. John H. Holland
enhance the optimization process. The main contribution of [14] introduced in 1985 a baseline form of the genetic
this work is the integration of new techniques that guarantee algorithm. Ashish Jain et al. [6] implemented an evolutionary
the integrity of the timetables which are simulated as based genetic algorithm to solve a course timetabling
chromosomes. Our algorithm was based on the real dataset of
problem. Alberto Colorni et al. [7] developed and compared
University of Udine, Italy, and achieves feasible results within a
a model including the definition of a hierarchical structure
few minutes
for the objective function and the generalized genetic
Keywords—timetable scheduling, hybrid genetic algorithm, operators which can be applied to matrices representing
local search. timetables. The outcomes of the utilization of the
implemented system to the specific case of the generation of
I. INTRODUCTION a school timetable. Then the comparison of two versions of
Developing a university timetable is a complex and time- the genetic algorithm (GA), with and without local search,
consuming problem and thus achieving a handmade solution, both to a handmade timetable and to two other approaches
most probably not the optimum, requires a high time based on simulated annealing and tabu search proved that
consumption. A typical university timetable is very GA with local search and tabu search with relaxation both
complicated task and comprises too many parameters, such outperform simulated annealing and handmade timetables.
as curricula, courses, lecture hours, professors and their Branimir Sigl et al. [8] proposed a genetic algorithm for
preferences, students and their preferences, classrooms and solving timetable scheduling problem which was enhanced
their capacities, available laboratories etc. The timetable with modification of basic genetic operators. Safaai Deris et
scheduling of a University is a NP (Nondeterministic al. [9] proposed a hybrid algorithm consisting of a genetic
Polynomial) problem which includes many constrains and algorithm and constraint-based reasoning.
thus finding an optimum solution constitutes a very Sehraneh Ghaemi et al. [10] propose models of genetic
demanding procedure. For the solution of this problem algorithm (GA) for solving university course timetabling so
several methods have been implemented, such as "Particle as to minimize the number of conflicts in the timetable. Two
Swarm Optimization" [1], [2], [3] tabu [4], statistical approaches of Modified GA and Cooperative GA are
techniques [5], and genetic algorithms [6], [7], [8], [9], [10], applied. The results show the modified GA (MGA) method
[11], [12]. was significantly better than modified basic genetic
This work is an extension of our previous approach [1] operators. Salwani Abdullah et al. [11] propose an algorithm
where we tackled the problem of timetable scheduling of an based on Genetic Algorithms (GA) and sequential local
educational institution by leveraging the PSO method search to solve course timetabling problem. Dennise
enhanced by Local Search, which is the way of updating the Adrianto [12] conducted a research which implemented a
particles by incorporating adequate cell swaps to improve the model of Particle Swarm Optimization (PSO) used to
quality of the timetable. In the present work we modify and automatically generate optimal lecturer timetable scheduling,
extend our old Local Search method, so as to be in comparison model based on a Genetic Algorithm. The
implemented on a real University timetable dataset and results showed that the amount of penalty obtained by the
additionally we integrated it in a suitable Genetic Algorithm. PSO is much smaller than the GA after a considerable
It should be noted, that the term “particles” of our PSO number of iterations. Vinayak Sapru et al. [15] propose a
algorithm [1] are the candidate timetables, which are the model based on a university time table scheduling algorithm.
product of our mechanism, that corresponds to the term The authors claim that their proposed guided mutation
“chromosomes” of our genetic approach. The innovative operator helps in convergence of the fitness values.

IEEE 979-8-3503-1806-7/23/$31.00 ©2023 IEEE


Authorized licensed use limited to: Sri Sivasubramanya Nadar College of Engineering. Downloaded on September 28,2024 at 08:28:35 UTC from IEEE Xplore. Restrictions apply.
Dipesh Mittal et al. [16] propose another algorithm based their corresponding penalties for curricula based real dataset
on Genetic Algorithms (GA) so as to generate a time table of university of Udine, in Italy.
schedule. Rupert Weare et al. [17] present a hybrid genetic
algorithm based around a heuristic timetabling framework Lars Vestergaard Kragelund [33] presents a research
which combines a direct representation of the timetable with project, where Genetic Algorithms (GAs) are used as the
heuristic crossover operators to ensure that the most basis for solving a timetabling problem concerning medical
fundamental constraints are never violated. Meysam doctors attached to an emergency service and where all the
Shahvali Kohshori et al. [18] introduce hybrid genetic doctors express personal preferences, thereby making the
algorithms for solving the university course timetabling scheduling rather difficult. In its natural form, the
problem where fuzzy logic is used to measure violation of timetabling problem for the emergency service is stated as a
soft constraints in fitness function to deal with inherent number of constraints to be fulfilled. Amol C. Adamuthe et
uncertainly and vagueness involved in real life data. Can al. [34] propose a genetic algorithmic approach to the
Akkan et al. [19] propose a model with a bi-criteria solution of the problem of personnel timetabling in
optimization procedure, implemented by a hybrid Multi- laboratories in which the objective is to assign tasks to
objective Genetic Algorithm. Peter Wilke et al. [20] employees and nurse scheduling in medical centre where the
objectives are to assign staff to particular day in planning
implement a genetic algorithm with an adaptation
mechanism for the repair operators which can be applied period and minimization of personnel cost by avoiding
without additional computing time. These operators are overtime pay.
switched on when the normal Genetic Algorithm does not Our work investigates the integration of our Local Search
yield any more improvements. method with Genetic Algorithms and compares it with our
Nabeel R. AL-Milli [21] proposes a hybrid algorithm to previous Hybrid PSO with Local Search method.
solve course timetabling problem based on Genetic III. UNIVERSITY TIMETABLE PROBLEM
Algorithm and Great Deluge algorithm. Amir Hossein
Karami [22] proposed a method based on a hybrid genetic A. Problem Restrictions
algorithm (HGA) where the initial population, which comes A university timetable scheduling deals with two kinds of
from Heuristics, is stored into red-black tree data structure. constraints: hard and soft ones. The fist must be met so as to
Tuncay Yigit [23] proposes a hybrid genetic algorithm secure the timetable’s integrity. If at least one of the hard
(HGA) for solving the constraint-based school timetabling constrains is not met then this timetable is discarded. The
problem which has a new operator called repair operator, in main hard constraints of a university timetable are the
addition to standard crossover and mutation operators. Amin following:
Rezaeipanah et al. [24] present a hybrid method based on the
Improved Parallel Genetic Algorithm and Local Search • All courses of every curriculum must not coincide for
(IPGALS) to solve the course timetabling problem. The an unobstructed attendance by the registered
Local Search (LS) approach is used to strengthen the Genetic students.
Algorithm (GA). S. Ishak et al. [25] consider a Hybrid • Every classroom holds only one course, or remains
Genetic Algorithm (HGA) for University Examination empty.
Timetabling Problem (UETP). UETP is defined as the • At any lecture time a professor has in maximum only
assignment of a given number of exams and their candidates one course to teach.
to a number of available timeslots while satisfying a given • Theory and laboratory courses should be held in
set of constraints. The performance of the proposed HGA is
classrooms and laboratories respectively.
compared with other metaheuristics from literature using the
Carter’s benchmark dataset which comprises of real-world • Each classroom must not hold a course whose
timetabling problem from various universities. number of registered students is greater than the
classroom’s capacity.
Arvind S. Babu et al. [26] describe the use of a Hybrid
Genetic Algorithm by using efficient data structures to The soft constraints are the secondary ones and determine
automate the construction of a departmental class timetable. the timetable’s quality. Generally, these are the following:
Li Yancang et al. [27] analyzed in their work the trends, the
modifications and the applications of genetic algorithms. A. • Professor's preferences for teaching in specific days
J. Keane [28] describes several studies of convergence and and hours.
robustness problems found when applying genetic algorithms • Students΄ preferences.
(GAS) to the constrained, multi-peak optimization problems • The courses with smaller numbers of registered
often found in design. Stephanie Forrest et al. [29] published students should be held in the classrooms where the
an overview of the genetic algorithm’s functionality. M. capacity is smaller.
Srinivas et al. [30] published a review on the genetic • Courses with several hours per week should be held
algorithms and their applications. Soolmaz Massoodian et al. in different days.
[31] propose a genetic algorithm-based approach with two
main stages for solving the course timetabling problem B. Solution Approach
where a local search is applied to the algorithm at each stage.
The first stage eliminates the violations of hard constraints, A baseline form of the Genetic algorithm was first
and the second one attempts to minimize the violations of introduced by John H. Holland [14]. A genetic algorithm is a
soft constraints. Edmund Burke et al. [32] propose hybrid computational model of biological evolution [14]. Genetic
genetic algorithm to automatically schedule university algorithms proved to be especially useful for solving
exams. Di Gaspero et al. [13], present in their technical optimization problems. In genetic algorithms, binary strings
report instructions about the hard and soft constraints and are stored in a computer’s memory and over time are

Authorized licensed use limited to: Sri Sivasubramanya Nadar College of Engineering. Downloaded on September 28,2024 at 08:28:35 UTC from IEEE Xplore. Restrictions apply.
modified in the same way the populations of individuals
evolve under natural selection. The pseudocode of this
optimization process is shown in Algorithm 1 [30].
The pseudocode of the above optimization process is
shown in Algorithm 1.

Simple Genetic Algorithm()


{
initialize population;
evaluate population;
while termination criterion not reached
{
select solutions for next generation;
perform crossover;
perform mutation;
evaluate population;
}
}
Algorithm 1: Simple Genetic Algorithm structure

Initializing population means setting up appropriate


strings (called chromosomes) of specific structure and
number, with random values for the problem’s parameters.
The objective (or fitness) function provides the overall
criterion to evaluate each string in the whole optimization
Fig. 1. Example chromosome.
process. Selection is the procedure of selecting the
appropriate strings for the construction of the next In Table I, we give indicatively the indexes of the courses
population. Crossover is the procedure of producing a new of the fourteen curricula of the educational institution.
string from the genes of two randomly selected parent According to our real dataset we assume that the 1st
strings. Mutation takes place after crossover and it concerns curriculum (with the codename q000) consists of four
little random changes of genes in a few chromosomes. In our courses (with corresponding indexes 1, 2, 3, 4) and similarly
approach: i) Regarding the crossover procedure, from two the other curricula are defined.
parent chromosomes we produce a child one; ii) Regarding
the mutation procedure, in a small portion (5%) of the TABLE I. COURSES PER CURRICULUM
chromosomes of the current population we swap a pair of
random rows (of the same chromosome), and additionally we Curriculum ID Courses indexes
swap a pair of random columns. q000 1 2 3 4
To apply a Genetic Algorithm approach to the university q001 5 6 7 8
timetable scheduling problem, we first consider a population
q002 9 10 1 11
of initial chromosomes (solutions) where each one consists
of a two-dimensional matrix (course periods, classrooms). q003 12 14 15
The indexes of courses are presented as values of the cells q004 13 14 15
(genes). Let’s also considering a university where there are
six lecture periods per day that means 30 periods per week. q005 28 24 30
Let’s also consider six classrooms where the lessons are q006 16 18
conducted (CR1, CR2, CR3, CR4, CR5, CR6). The two-
dimensional matrix is illustrated in Fig 1. q007 19 20
q008
In the real dataset of University of Udine that we 23 18 30
examined for solving the timetabling problem, we consider q009 21 22 24 29
the following approach: In this particular dataset there are:
q010
30 courses, 6 classrooms, 5 days, 6 timeslots per day, 14 17 21 26
curricula, 24 professors, and 53 professor constraints due to q011 27 25 26
professor unavailability in particular timeslots.
q012 3
q013 20 24 29

As an example, the definition of the expression


TR(chromosome,1,5)=12, as demonstrated in Fig. 1, means
that the course of the index 12 will be conducted in the 1st
timeslot (on Monday 1) and in classroom CR5. If in a
classroom there isn’t a course held, a zero value is set in the

Authorized licensed use limited to: Sri Sivasubramanya Nadar College of Engineering. Downloaded on September 28,2024 at 08:28:35 UTC from IEEE Xplore. Restrictions apply.
corresponding cell. The challenging real data sets of 𝐹𝐹𝑐𝑜𝑢𝑟𝑠𝑒_𝑎𝑣𝑎𝑖𝑙𝑎𝑏𝑖𝑡𝑦 (𝑐ℎ𝑟) =
University of Udine in Italy that were used for proving the 300, 𝑤ℎ𝑒𝑛 𝑡ℎ𝑒 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛 𝑖𝑠 𝑣𝑖𝑜𝑙𝑎𝑡𝑒𝑑
good performance of this specific algorithm are provided in { (5)
0, 𝑤ℎ𝑒𝑛 𝑡ℎ𝑒 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛 𝑖𝑠 𝑛𝑜𝑡 𝑣𝑖𝑜𝑙𝑎𝑡𝑒𝑑
[13].
IV. HYBRID GENETIC ALGORITHM OPTIMIZATION The part of the fitness function FF_room_capacity
METHOD expresses the degree of satisfaction of having the courses
held in classrooms with a capacity equal or higher than the
In this work we apply the innovative method of updating
number of registered students and equals to zero when the
the solutions of a timetable (Local Search) implemented in
criterion is not violated. Each student above the capacity
our previous work [1] and adapt it to be integrated with a
counts as 1 point of penalty. This part is defined by the
Genetic Algorithm. More specifically, regarding the Local
formula (6):
Search procedure we check every cell of the current
chromosome and if a hard constrain isn’t met, we tackle it by 𝐹𝐹𝑟𝑜𝑜𝑚_𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 (𝑐ℎ𝑟) =
locally searching adequate places of cell swaps in order to ∑𝑡𝑜𝑡𝑎𝑙_𝑡𝑖𝑚𝑒𝑠𝑙𝑜𝑡𝑠 ∑𝑡𝑜𝑡𝑎𝑙_𝑐𝑙𝑎𝑠𝑠𝑟𝑜𝑜𝑚𝑠 (𝑟𝑒𝑔𝑖𝑠𝑡𝑒𝑟𝑒𝑑(𝑇𝑅[𝑝𝑡, 𝑖, 𝑗]) −
𝑖=1 𝑗=1
relocate the respective courses. In the optimization process,
every chromosome is evaluated according to the fitness 𝑐𝑙𝑎𝑠𝑠_𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦(𝑗)) (6)
function. Our algorithm has been adapted to tackle the
timetable problem of university of Udine, where the dataset The part of the fitness function FF_min_course_days
itself and all the respective hard and soft constrains were expresses the degree of satisfaction of the criterion that a
selected from “the second international timetabling course should be held in the timetable at least a specific
competition (ITC-2007) for curriculum-based course number of different days and equals to zero when the
timetabling” [13]. The fitness function of the algorithm is criterion is not violated. This section is calculated by the
defined by the formula (1): formula (7):
FFtotal (chr) = FFcourse_integrity (chr) + 𝐹𝐹𝑚𝑖𝑛 _𝑐𝑜𝑢𝑟𝑠𝑒_𝑑𝑎𝑦𝑠 (𝑐ℎ𝑟) =
FFcourse_conflicts (chr) + FFdouble_professor (chr) + ∑𝑡𝑜𝑡𝑎𝑙_𝑡𝑖𝑚𝑒𝑠𝑙𝑜𝑡𝑠 ∑𝑡𝑜𝑡𝑎𝑙_𝑐𝑙𝑎𝑠𝑠𝑟𝑜𝑜𝑚𝑠 ((𝑚𝑖𝑛 _𝑑𝑎𝑦𝑠_𝑐𝑜𝑢𝑟𝑠𝑒(𝑇𝑅[𝑐ℎ𝑟, 𝑖, 𝑗]) −
𝑖=1 𝑗=1
FFcourse_availabity (chr) + FFroom_capacity (chr) + 𝑡𝑜𝑡𝑎𝑙_𝑑𝑎𝑦𝑠(𝑇𝑅[𝑐ℎ𝑟, 𝑖, 𝑗])) ∗ 5 (7)
FFmin _course_days (chr) + FFroom_stability (chr) +
FFisolated_courses (chr) (1)
The part of the fitness function FF_room_stability
expresses the degree of satisfaction of having the lectures of
where the FF_course_integrity is a quantity penalty a course in a specific classroom during the week, and equals
introduced, so that the chromosomes which meet the to zero when the criterion is not violated. This section is
criterion that all lectures of all courses that must be calculated by the formula (8):
scheduled, can be evaluated favourably.
This part of fitness function is defined by the formula 𝐹𝐹𝑟𝑜𝑜𝑚_𝑠𝑡𝑎𝑏𝑖𝑙𝑖𝑡𝑦 (𝑐ℎ𝑟) =
(2): ∑𝑡𝑜𝑡𝑎𝑙_𝑡𝑖𝑚𝑒𝑠𝑙𝑜𝑡𝑠
𝑖=1 ∑𝑡𝑜𝑡𝑎𝑙_𝑐𝑙𝑎𝑠𝑠𝑟𝑜𝑜𝑚𝑠
𝑗=1 (𝑡𝑜𝑡𝑎𝑙_𝑐𝑜𝑢𝑟𝑠𝑒_𝑟𝑜𝑜𝑚𝑠(𝑇𝑅[𝑐ℎ𝑟, 𝑖, 𝑗] −
FFcourse_integrity (chr) = 1)) (8)
300, 𝑤ℎ𝑒𝑛 𝑡ℎ𝑒 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛 𝑖𝑠 𝑣𝑖𝑜𝑙𝑎𝑡𝑒𝑑
{ (2)
0, 𝑤ℎ𝑒𝑛 𝑡ℎ𝑒 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛 𝑖𝑠 𝑛𝑜𝑡 𝑣𝑖𝑜𝑙𝑎𝑡𝑒𝑑
The part of the fitness function FF_isolated_courses is
The part FF_course_conflicts of the fitness function is a related to the curriculum compactness and expresses the
quantity penalty introduced to exclude cases of conflicts degree of satisfaction of having the lectures belonging to a
between courses of the same curriculum in the same timeslot curriculum adjacent to each other (i.e., in consecutive
(and also at cases of curricula having common courses), and periods) and equals to zero when the criterion is not violated.
is defined by the formula (3): This section is calculated by the formula (9):
𝐹𝐹𝑖𝑠𝑜𝑙𝑎𝑡𝑒𝑑_𝑐𝑜𝑢𝑟𝑠𝑒𝑠 (𝑐ℎ𝑟) =
𝐹𝐹𝑐𝑜𝑢𝑟𝑠𝑒_𝑐𝑜𝑛𝑓𝑙𝑖𝑐𝑡𝑠 (𝑐ℎ𝑟) =
𝑡𝑜𝑡𝑎𝑙𝑡𝑖𝑚𝑒𝑠𝑙𝑜𝑡𝑠 𝑡𝑜𝑡𝑎𝑙𝑐𝑙𝑎𝑠𝑠𝑟𝑜𝑜𝑚𝑠 ((𝑡𝑜𝑡𝑎𝑙_𝑖𝑠𝑜𝑙𝑎𝑡𝑒𝑑_𝑐𝑜𝑢𝑟𝑠𝑒𝑠
300, 𝑤ℎ𝑒𝑛 𝑡ℎ𝑒 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛 𝑖𝑠 𝑣𝑖𝑜𝑙𝑎𝑡𝑒𝑑 ∑𝑖=1 ∑𝑗=1 (9)
{ (3) (𝑇𝑅[𝑐ℎ𝑟, 𝑖, 𝑗])) ∗ 2)
0, 𝑤ℎ𝑒𝑛 𝑡ℎ𝑒 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛 𝑖𝑠 𝑛𝑜𝑡 𝑣𝑖𝑜𝑙𝑎𝑡𝑒𝑑
The main steps of the Genetic Algorithm (without Local
The part FF_double_professor of the fitness function is a Search) are described in Algorithm 1. The pseudocode of our
quantity penalty introduced to exclude cases in which a hybrid Genetic Algorithm with Local Search is demonstrated
professor teaches different courses at the same timeslot, and in Algorithm 2.
is defined by the formula (4):
𝐹𝐹𝑑𝑜𝑢𝑏𝑙𝑒_𝑝𝑟𝑜𝑓𝑒𝑠𝑠𝑜𝑟 (𝑐ℎ𝑟) = For each chromosome
300, 𝑤ℎ𝑒𝑛 𝑡ℎ𝑒 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛 𝑖𝑠 𝑣𝑖𝑜𝑙𝑎𝑡𝑒𝑑 Initialize the chromosome
{ (4)
0, 𝑤ℎ𝑒𝑛 𝑡ℎ𝑒 𝑐𝑟𝑖𝑡𝑒𝑟𝑖𝑜𝑛 𝑖𝑠 𝑛𝑜𝑡 𝑣𝑖𝑜𝑙𝑎𝑡𝑒𝑑
Random initial placement of the curricula courses in
classrooms.
The part FF_course_availability of the fitness function is
a quantity penalty introduced to exclude cases of any Ensure that in every timeslot (period) only one
course's unavailability for specific days and periods, and is course of the same curriculum (or of curricula that
defined by the formula (5): have this common course) is conducted.

Authorized licensed use limited to: Sri Sivasubramanya Nadar College of Engineering. Downloaded on September 28,2024 at 08:28:35 UTC from IEEE Xplore. Restrictions apply.
End for well as the soft constrains, as possible. It needs to be noted
that in Fig. 2a and Fig. 2b respectively, not only the initial
Do and the final state of the timetable are presented, but
For each chromosome additionally the highlighted cells correspond to the courses
that interests us and the necessary updates in these rows in
Check the hard constrains: order to achieve timetable feasibility. For example, the
FF_course_integrity, based on (2) courses 18 and 30 are highlighted with pink and blue
respectively to point out that in each timeslot only one of
FF_course_conflicts, based on (3) them should exist because they belong in the same
FF_double_professor, based on (4) curriculum q008, as demonstrated in Table I. The fully
detailed analysis of this update is demonstrated as follows:
FF_course_availability, based on (5)
In Fig. 2a there is a chromosome before the Local Search.
And if the respective hard constraint isn’t It is feasible as there are no conflicts between courses (e.g.,
met, a penalty is imposed in the form of courses 18 and 30 should not coincide in the same timeslot).
increasing the corresponding amount of the In the next step we are going to replace the current value of
fitness function. course 18, in timeslot 2, room 1 with the value of course 3,
Calculate the soft constrains penalties: as is shown in Fig. 2b.

FF_room_capacity, based on (6) After the update of the cell (2,1) there is the updated
value of course 3. The algorithm detects that in cell (2,5)
FF_min_course_days, based on (7) there is another course 3 which conflicts with the same value
in (2,1) which is the first step of the update. So, our
FF_room_stability, based on (8)
algorithm relocates the conflicting value from the cell (2,5)
FF_isolated_courses, based on (9) to a randomly selected empty cell (10,1). Then the algorithm
tries to find randomly a cell with value 3, except the (2,1); it
Calculate the total value of the fitness function finds the position (26,2) where there is the value 3, it deletes
for this chromosome, based on (1). it and it places there the value 18 to secure the basic integrity
Find the chromosome with the lowest value, and of the timetable as shown in figure 2b. Then, we notice that
place it in the next generation as the “elite”. in the position (10,5) there is the course 2 which conflicts
with course 3 of the cell (10,1). So, our algorithm searches
Make crossover procedure locally to find a suitable empty cell to place there the course
From two parent chromosomes produce a 2 without conflicts. The relocation of course 2 of cell (10,5)
child one. Finally, after finding the position (30,4) it relocates there
safely the course 2, as demonstrated with green highlighted
Make mutation procedure colour in (30,4) in Fig. 2b. The deletion of course 2 from the
In a small portion of the chromosomes cell (10,5) as well as its relocation in the cell (30,4) are
(5%) of the current population swap a pair depicted in Fig. 2b with grey and green background
of random rows (of the same respectively, to highlight this transition.
chromosome). Additionally swap a pair of
random columns.
Local Search
Check every cell of the current
chromosome and if a hard constrain isn’t
met, tackle it by locally searching adequate
places of cell swaps in order to relocate the
respective courses.
End for
While the repetitions are not completed or until a
minimum margin of error.
Algorithm 2: Main steps of hybrid genetic optimization
algorithm with local search.

To demonstrate our originality, we have created a simple


example, as shown in the tables of this section (Fig. 2a, Fig.
2b), in order to present the original code that we developed.
The goal of this example is to replace in the cell (2,1),
meaning the class 18 which is held in the 2nd timeslot on
Monday in the first classroom (CR1), with the course 3. The
challenge of this course replacement is that by replacing the
course 18 with the course 3 in the cell (2,1), we have to find (a) (b)
a new cell to put the courses 3, meaning a new timeslot and
Fig. 2. Example of Local Search.
classroom, by assuring that all the hard constrains are met as

Authorized licensed use limited to: Sri Sivasubramanya Nadar College of Engineering. Downloaded on September 28,2024 at 08:28:35 UTC from IEEE Xplore. Restrictions apply.
Our algorithm in cases of not finding suitable empty 20, 50, 100, or 200 chromosomes and evaluated them by the
places available searches locally and performs mutual swaps fitness function. All hard constraints of the problem were
between courses so as to diminish the possibility of an satisfied as shown in Fig. 3. A lower value of the fitness
invalid timetable and to enhance the optimization process. function in our tests resulted in a better quality of the
All the modifications in the process of updating the particles solution. The theoretical lower bound of the fitness function
take into consideration the problem constraints like course is zero.
conflicts, professor conflicts, room capacities and professor
unavailabilities and by searching locally they tackle them The test illustrated in Fig 3 had the following
adequately in order not to be trapped in local optima. characteristics: i) Number of Chromosomes: 20, ii) Number
of Iterations: 50, iii) Total run time: 106 seconds, and iv)
V. EVALUATION Fitness Function value: 226.

A. Hybrid Genetic Algorithm with and without Local The indicative values of the fitness function throughout
Search the corresponding iterations are presented in Fig 3. To
compare the proposed algorithm HGA with Local Search, we
In order to thoroughly test our algorithm with different implemented a baseline form of the algorithm without the
numbers of chromosomes and iterations, we developed a implementation of local search, as outlined in section IV.
software based on our innovative method as shown in Fig. 3, The convergence of the two methods, with and without Local
and Fig. 4. It should be noted that in Fig.3 and Fig. 4 Search respectively, is illustrated in Fig. 5. We observe that
respectively, the background colour per course ID is unique, the absence of the Local Search part decreases considerably
so that we distinguish easily each course lectures during the the performance of the algorithm.
week. This application provides the ability to test the
algorithm upon the real date of university of Udine [13].
Additionally, the user has the ability of editing the original
data files and this enhancement provides flexibility in
handling several data files. Finally, we tackle the very strict
constraints of this real problem and we obtained feasible and
satisfactory solutions.

Fig. 5. Plot of the fitness function of both algorithms with and without
Local Search, versus iterations.

B. Comparison HGA vs. PSO


In this section we compare this work with our previous
approach [1], which was based in a hybrid Particle Swarm
Optimization (PSO) method with Local Search. The
comparison is conducted with a modified new application. In
Fig. 3 the hybrid HGA method (with Local Search) is
illustrated which has the following characteristics:
• Number of Chromosomes: 20
• Number of Iterations: 50
Fig. 3. Software for testing the HGA optimization with the Local Search
method. • Total run time: 106 seconds
• Fitness Function value: 226

In Fig. 6 the hybrid PSO method (with Local Search) is


illustrated which has the following characteristics:
• Number of Particles: 20
• Number of Iterations: 50
• Total run time: 209 seconds
• Fitness Function value: 191
We deduce that in small number of iterations (Fig. 3 and
Fig.6) the PSO outperforms by a little the HGA.

Fig. 4. Software for testing the HGA optimization without the Local
Search method.

In Fig. 3 it is illustrated that all the hard constrains have


been met. We performed several tests with a population of

Authorized licensed use limited to: Sri Sivasubramanya Nadar College of Engineering. Downloaded on September 28,2024 at 08:28:35 UTC from IEEE Xplore. Restrictions apply.
approach could also be applicable in cases of shift scheduling
problems in a hospital. For example, in this approach the
two-dimensional array of timeslots - consulting rooms could
be used for portraying the timetable of medical examinations
of patients by a doctor. This approach could also be
applicable in cases of scheduling surgeries in specific
operational rooms at specific timeslots in a hospital.
In our approach with local search, we succeeded in
updating the chromosomes without having to return in the
previous feasible solution in a very dense timetable with
many soft and hard constraints which were all taken into
consideration in the fitness function of this optimization
method. The fitness function consists of several parts which
were analytically demonstrated in section IV. We
Fig. 6. PSO with Local Search and low iterations.
investigated how much each of the fitness function’s soft
constrains part affects the final result of HGA and therefore
On the contrary, as it is illustrated in Fig 7, and Fig. 8
to analyze the evolution of the fitness function parameters as
where we set the number of iterations equal to 2000 for both
it is demonstrated in Fig. 9. In this figure the convergence for
methods (and with the same number of population) we
each part is presented for the method with local search. Our
conclude that at high iterations the HGA method outperforms
research exhibits that the portion of the room capacity
the hybrid PSO method (both with Local Search).
constraint is considerably bigger than the other parts (Fig. 9),
and it is the most challenging to be dealt with, and it is
successfully tackled with the local search method. It should
be noted that the soft constrains are the following: i) the
isolated courses, meaning having the lectures in consecutive
periods, ii) classroom stability, meaning having the courses’
lectures in a specific classroom during the week, iii) min
course days, meaning the courses to be held at least a
specific number of different days, and iv) classroom capacity
meaning having the courses held in classrooms with a
capacity equal or higher than the number of registered
students.

Fig. 7. HGA with Local Search and high iterations.

Fig. 9. Fitness Function parts which correspond to the soft constraints of


isolated courses , classroom stability, min course days and classroom
capacity.

VII. CONCLUSIONS
Fig. 8. PSO with Local Search and high iterations. In this work we introduced an original hybrid genetic
algorithm which tackles the problem of timetable scheduling
VI. DISCUSSION of a university. We adapted and combined our genetic
algorithm with our innovative Local Search approach, and
Our approach in this optimization method, apart from
we achieve satisfactory results. We finally noticed that all
scheduling lectures in an educational institution can also be
hard constraints of this complex problem are met by
useful for researchers and practitioners to solve similar
imposing quantity penalties on the fitness function and thus
problems like scheduling exams and other educational
the timetable’s feasibility and quality are assured.
activities. More specifically, these problems are considered
similar because in this approach each lecture which is We plan in the future to enrich the Hybrid Genetic
conducted in a specific timeslot and classroom is replaced by Algorithm by excluding all the intermediate solutions which
the course’s exam or a specific educational activity. This are not feasible, in the optimization process, by filtering them

Authorized licensed use limited to: Sri Sivasubramanya Nadar College of Engineering. Downloaded on September 28,2024 at 08:28:35 UTC from IEEE Xplore. Restrictions apply.
rather than by penalizing, as we did in this work. This future Advanced Research in Computer and Communication
work could constitute the base for a new comparison. Engineering, 4(2), 245-248.
[17] Weare, R., Burke, E., & Elliman, D. (1995). A hybrid genetic
ACKNOWLEDGMENT algorithm for highly constrained timetabling problems. Department of
Computer Science.
This work has been partly supported by the University of [18] Kohshori, M. S., & Abadeh, M. S. (2012). Hybrid genetic algorithms
Piraeus Research Center. for university course timetabling. International Journal of Computer
Science Issues (IJCSI), 9(2), 446.
REFERENCES [19] Akkan, C., & Gülcü, A. (2018). A bi-criteria hybrid Genetic
[1] Psarra, E., & Apostolou, D. (2019, July). Timetable scheduling using Algorithm with robustness objective for the course timetabling
a hybrid particle swarm optimization with local search approach. problem. Computers & Operations Research, 90, 22-32.
In 2019 10th International Conference on Information, Intelligence, [20] Wilke, P., Gröbner, M., & Oster, N. (2002). A hybrid genetic
Systems and Applications (IISA) (pp. 1-8). IEEE. algorithm for school timetabling. In AI 2002: Advances in Artificial
[2] Kumar, A., Singh, K., & Sharma, N. (2013). Automated Timetable Intelligence: 15th Australian Joint Conference on Artificial
Generator Using Particle Swarm Optimization. International Journal Intelligence Canberra, Australia, December 2–6, 2002 Proceedings
on Recent and Innovation Trends in Computing and 15 (pp. 455-464). Springer Berlin Heidelberg.
Communication, 1(9), 686-692. [21] Nabeel, R. (2010). Hybrid genetic algorithms with great deluge for
[3] Hossain, S. I., Akhand, M. A. H., Shuvo, M. I. R., Siddique, N., & course timetabling. International Journal of Computer Science and
Adeli, H. (2019). Optimization of university course scheduling Network Security, 10, 283-288.
problem using particle swarm optimization with selective [22] Karami, A. H., & Hasanzadeh, M. (2012, October). University course
search. Expert systems with applications, 127, 9-24. timetabling using a new hybrid genetic algorithm. In 2012 2nd
[4] Hertz, A. (1991). Tabu search for large scale timetabling International eConference on Computer and Knowledge Engineering
problems. European journal of operational research, 54(1), 39-47. (ICCKE) (pp. 144-149). IEEE.
[5] Bellio, R., Di Gaspero, L., & Schaerf, A. (2012). Design and [23] Yigit, T. (2007). Constraint-based school timetabling using hybrid
statistical analysis of a hybrid local search algorithm for course genetic algorithms. In AI* IA 2007: Artificial Intelligence and
timetabling. Journal of Scheduling, 15(1), 49-61. Human-Oriented Computing: 10th Congress of the Italian
Association for Artificial Intelligence, Rome, Italy, September 10-13,
[6] Jain, A., Jain, S., & Chande, P. K. (2010). Formulation of genetic
2007. Proceedings 10 (pp. 848-855). Springer Berlin Heidelberg.
algorithm to generate good quality course timetable. International
Journal of Innovation, Management and Technology, 1(3), 248. [24] Rezaeipanah, A., Matoori, S. S., & Ahmadi, G. (2021). A hybrid
algorithm for the university course timetabling problem using the
[7] Colorni, A., Dorigo, M., & Maniezzo, V. (1992). A genetic algorithm
improved parallel genetic algorithm and local search. Applied
to solve the timetable problem. Politecnico di Milano, Milan, Italy
Intelligence, 51, 467-492.
TR, 90-060.
[25] Ishak, S., Lee, L. S., & Ibragimov, G. (2016). Hybrid genetic
[8] Sigl, B., Golub, M., & Mornar, V. (2003, June). Solving timetable
algorithm for university examination timetabling problem. Malaysian
scheduling problem using genetic algorithms. In Proceedings of the
journal of mathematical sciences, 10(2), 145-178.
25th International Conference on Information Technology Interfaces,
2003. ITI 2003. (pp. 519-524). IEEE. [26] Babu, A. S., Chockalingam, R., & Kavitha, S. (2010). A hybrid
genetic algorithm approach to a departmental class timetabling
[9] Deris, S., Omatu, S., Ohta, H., & Saad, P. (1999). Incorporating
problem using efficient data structures. International Journal of
constraint propagation in genetic algorithm for university timetable
Computer Applications, 1(17), 99-103.
planning. Engineering applications of artificial intelligence, 12(3),
241-253. [27] Li, Y. C., Zhao, L. N., & Zhou, S. J. (2011). Review of genetic
algorithm. Advanced Materials Research, 179, 365-367.
[10] Ghaemi, S., Vakili, M. T., & Aghagolzadeh, A. (2007, February).
Using a genetic algorithm optimizer tool to solve University timetable [28] Keane, A. J. (1995). Genetic algorithm optimization of multi-peak
scheduling problem. In 2007 9th International Symposium on Signal problems: studies in convergence and robustness. Artificial
Processing and Its Applications (pp. 1-4). IEEE. Intelligence in Engineering, 9(2), 75-83.
[11] Abdullah, S., & Turabieh, H. (2008, November). Generating [29] Forrest, S. (1996). Genetic algorithms. ACM computing surveys
university course timetable using genetic algorithms and local search. (CSUR), 28(1), 77-80.
In 2008 Third International Conference on Convergence and Hybrid [30] Srinivas, M., & Patnaik, L. M. (1994). Genetic algorithms: A
Information Technology (Vol. 1, pp. 254-260). IEEE. survey. computer, 27(6), 17-26.
[12] Adrianto, D. (2014). Comparison using particle swarm optimization [31] Massoodian, S., & Esteki, A. (2008, August). A hybrid genetic
and genetic algorithm for timetable scheduling. Journal of Computer algorithm for curriculum based course timetabling. In Proceedings of
Science, 10(2), 341. the 7th International Conference on the Practice and Theory of
[13] Di Gaspero, L., McCollum, B., & Schaerf, A. (2007). The second Automated Timetabling (PATAT’08).
international timetabling competition (ITC-2007): Curriculum-based [32] Burke, E., Elliman, D., & Weare, R. (1995, April). The automated
course timetabling (track 3). Technical Report timetabling of university exams using a hybrid genetic algorithm.
QUB/IEEE/Tech/ITC2007/CurriculumCTT/v1. 0, Queen’s In The AISB Workshop on Evolutionary Computing.
University, Belfast, United Kingdom. [33] Kragelund, L. V. (1997). Solving a timetabling problem using hybrid
[14] Holland, J. H. (1984). Genetic algorithms and adaptation. Adaptive genetic algorithms. Software: Practice and Experience, 27(10), 1121-
control of ill-defined systems, 317-333. 1134.
[15] Sapru, V., Reddy, K., & Sivaselvan, B. (2010, December). Time table [34] Adamuthe, A. C., & Bichkar, R. (2011). Hybrid genetic algorithmic
scheduling using genetic algorithms employing guided mutation. approaches for personnel timetabling and scheduling problems in
In 2010 IEEE International Conference on Computational healthcare. In International Conference on Technology Systems and
Intelligence and Computing Research (pp. 1-4). IEEE. Management.
[16] Mittal, D., Doshi, H., Sunasra, M., & Nagpure, R. (2015). Automatic
timetable generation using genetic algorithm. International Journal of

Authorized licensed use limited to: Sri Sivasubramanya Nadar College of Engineering. Downloaded on September 28,2024 at 08:28:35 UTC from IEEE Xplore. Restrictions apply.

You might also like