Professional Documents
Culture Documents
A Greedy and Genetic Fusion Algorithm For Solving Course Timetabling Problem
A Greedy and Genetic Fusion Algorithm For Solving Course Timetabling Problem
Abstract— In 1976, S. Even and Cooper proved that Course different time periods in the case of reasonable allocation of
Timetabling Problem (CTP) is a nondeterministic polynomial resources [2].
time-complete problem which is hard to be solved. Though many
intelligent methods have been applied to solve the Course The object of the CTP study can be treated as a five-tuple
Timetabling Problem in recent years, there is still a lot of room for [3,4]:
improvement. This paper proposed a Greedy and Genetic Fusion =< , , , , >
Algorithm (GGFA) to solve Course Timetabling Problem
efficiently, which can obtain the local optimal solution by using
TABLE I. RESOURCES OF CTP
Greedy Algorithm and provide a high-quality initial population
for Genetic Algorithm. Simulation results prove that Greedy and Symbols Description
Genetic Fusion Algorithm proposed in this paper has the stronger
optimal ability and faster convergence speed than standard Class Collection { , , ,…, }
Genetic Algorithm, which could solve the CTP effectively and Teacher Collection { , , ,…, }
achieved good results.
Classroom Collection { , , , … , }
Keywords— Course Time-tabling Problem; Genetic Algorithm;
Time-slot Collection { , , , … , }
Greedy Algorithm; Fusion Algorithm
Subject Collection { , , ,…, }
I. INTRODUCTION
With the increasing number of students and courses, manual
course scheduling has become a difficult problem. Scheduling The goal of solving this problem is to find the reasonable
course reasonably and efficiently in the limited resources of match for resources. The result must meet some certain
teachers and time becomes a complex system engineering. constraints [5-7] and meet the requirements of experience.
The Course Timetabling Problem, which belongs to the Hard constraints include but not limited to:
scheduling problem, is a typical Combinatorial Optimization
• The same student only attends one lesson arranged in
Problem. Many scholars have conducted extensive research on
the same time.
this problem. The pioneer can be traced to 1962. Professor
Gotlieb.C.C made a formal description of the Course Scheduling • The same teacher only takes one course arranged in the
Problem. S. Even et al. proved that the course timetabling same time.
problem is an NP-complete problem in the paper of “On the
Complexity of Time Table and Multi Commodity Flow • The same classroom only has one course arranged in the
Problem” in 1976 [1]. same time.
In section 2 we present the formulation of the Course In addition, there are some conditions which improve the
Timetabling Problem and in section 3 the Greedy and Genetic optimal allocation of resources called feasible conditions,
Fusion Algorithm (GGFA) optimizer tool is discussed in detail. which is called soft constraints [8]. These may include but not
Section 4 presents the results of several experiments conducted, limited to:
followed by the conclusion in section 5. • Core courses should be arranged in the morning as
II. PROBLEM DEFINITION possible.
A. Mathematic Model of Course Timetabling Problem • The number of courses per day should be as balanced as
possible.
Course Timetabling Problem is to optimize the combination
of teachers, students, and courses according to specific rules at • Arranging some teachers should meet the requirements
of the special time.
*Corresponding author
Symbols Description
YES Meet Termination
Method of individual coding Condition?
Evaluation fuction NO
0
Initial Population Genetic Operation
Φ Selection operator
Generate Offspring
Γ Crossover operator
Ψ Mutation operator
Repair Function
Termination conditon ( Iterations, etc..)
345
Fig. 1. Flow chart of GGFA =∑ ( 1 + 2 + 3) (1)
D. Coding
Evaluation function evaluates the fitness of the individuals
GA optimization process does not deal with the parameters through three aspects:
in the genetic space, but convert them into chromosomes or • 1: Fitness of Gene.
individuals that are composed of a certain structure.
Chromosome coding is very important because encoding 1=∑ × ( ) (2)
structures, that is the first problem that needs to be solved when
applying Genetic Algorithm, will have a direct impact on the represents the weight of each course. ( )
effectiveness of algorithm [8]. calculates the score of each course in a arranged
Focusing on Course Timetabling Problem, the encoding timetable.
method proposed included as follow:
1) Binary encoding: The hamming cliff is one of the • 2: Evenness of Time.
disadvantages of binary coding, which is that there is a large
hamming distance between the binary codes of some 2= ×∑ ( − ) +1 (3)
adjacent integers, making the crossover and mutation of
genetic algorithm difficult to cross.
2) Matrix encoding: Matrix coding is not suitable for represents the number of total courses in some day
representing Course tuple. and represents the average number of the courses in a
Therefore, we put forward a new encoding method, Tuple week.
Structure Encoding in this paper. This method regards a teaching
• 3: Evenness of Courses.
plan as a tuple. The coding scheme is shown in figure 2.
3=∑ ×∑ ( − ) +1 (4)
Gene 1 Subject Teacher Class Day of Week Section of Day
346
in figure 4. The probability of crossover operation is probabilities of each operation. These simulate the process of
usually 0.4~0.99. biological evolution.
• Mutation Operation: The Mutation Operation is Begin
mutating a gene on the chromosome selected by
Roulette Wheel Section into a different solution in the
genetic space. The probability of mutation operation is RWS
usually 0.0001~0.001.
select genetic
• Reserve Operation: The Reserve Operation is to add the operation
selected chromosome directly to the next generation
population without any changing. The probability of
reserve operation is usually 0.001~0.1. Mutation Crossover Reserve
Zong [15] used an adaptive crossover and mutation Operation Operation Operation
operation to speed up the algorithm efficiency and achieved a
good result.
RWS Select
First Parent
Mutate and No
TechingPlan Day of Week Section of Day
Create
RWS Select
TechingPlan Day of Week Section of Day
Second
TechingPlan Day of Week Section of Day Parent
...
Crossover
Add to Add to
TechingPlan Day of Week Section of Day and Add to
Offspring Offspring
Offspring
Repair Operation
TechingPlan Day of Week Section of Day
(Check all hard constraints
TechingPlan Day of Week Section of Day and solve them)
TechingPlan Day of Week Section of Day
... Meet Termination
Condition?
TechingPlan Day of Week Section of Day
Yes
End
TechingPlan Day of Week Section of Day
Fig. 4. Flow Chart of Genetic Operation
TechingPlan Day of Week Section of Day
TechingPlan Day of Week Section of Day I. Repair Function
After crossover and mutation operations, the chromosome,
TechingPlan Day of Week Section of Day
which represents a course timetable, may become infeasible
TechingPlan Day of Week Section of Day and unsatisfied the hard constraints [10]. There are three ways
to deal with infeasible solutions:
...
• Remove infeasible timetables.
TechingPlan Day of Week Section of Day • Apply a high penalty in the fitness function, so that they
are unlikely to survive.
Fig. 3. Crossover Operation • Repair infeasible timetable.
First, we choose an individual (chromosome) in the current J. Termination Condition
population using Roulette Wheel Selection according to its There are two termination conditions of Genetic Algorithm:
fitness. Then, we select an operation randomly based on the one is the population fitness is stable for several generations,
347
the other is setting the maximum of iterations. Generally, it is Parameters Value
500~5000. Size of Population 20
Maximum Generation 1000
IV. EXPERIMENT
Crossover Probability 0.9
Based on Greedy and Genetic Fusion Algorithm, by taking
Visual Studio 2016, using C# as developing language, we Mutation Probability 0.09
implemented GGFA model for Course Timetabling Problem. Reserve Probability 0.01
650
Fitness
600
550
500
450
400
350
300
250
EPOCH
200
24
46
68
90
2
112
134
156
178
200
222
244
266
288
310
332
354
376
398
420
442
464
486
508
530
552
574
596
618
640
662
684
706
728
750
772
794
816
838
860
882
904
926
948
970
992
SGA GGFA
348
[5] Saeid Agahian, Huseyin Pehlivan, Rahim Dehkharghani, “Adaptation and
Use of Artificial Bee Colony Algorithm to Solve Curriculum-based
V. CONCLUSION Course Time-Tabling Problem”, 2014 5th International Conference on
Intelligent Systems, Modelling and Simulation, pp. 77-82.
The traditional timetabling method is inefficient, and the [6] Sawaphat Jaengchuea, “Dome Lohpetch A hybrid genetic algorithm with
course conflict rate is high, which affects the teaching local search and tabu search approaches for solving the post enrolment
efficiency. Using the intelligent method for Course Timetabling based course timetabling problem: Outperforming guided search genetic
Problem has been widely researched and discussed all over the algorithm”, 2015 7th International Conference on Information
Technology and Electrical Engineering (ICITEE), pp. 29-34.
world. However, there is still no method that can solve CTP in
[7] Hamdy M. Mousa, Ashraf B. El-Sisi, “Design and implementation of
different schools commonly. course timetabling system based on genetic algorithm”, 2013 8th
This paper introduces a Greedy and Genetic Fusion International Conference on Computer Engineering & Systems (ICCES),
pp. 167-171.
Algorithm to solve the Course Timetabling Problem and has
[8] Yong OuYang, Yi Chen, “Design of automated Course Scheduling
achieved good results. Due to the lack of experience, our system based on hybrid genetic algorithm”, 2011 6th International
insufficient consideration of conflict detection in the algorithm Conference on Computer Science & Education (ICCSE), pp. 256-259.
needs to be further studied and improved in the future. It is [9] Salwani Abdullah, Hamza Turabieh, “Generating University Course
certain that combining different algorithms and providing a Timetable Using Genetic Algorithm and Local Search”, 2008 Third
good initial value for heuristic algorithm can obtain a better International Conference on Convergence and Hybrid Information
effect. Technology, vlo.1, pp. 254-2.
[10] C. Blum and A. Roli, “Metaheuristics in combinatorial optimisation:
REFERENCES Overview and conceptual comparison,” ACM Computing Surveys, vol.
35 (3), pp. 268–308, 2003.
[1] S. Even, A. Itai, A. shamir, “On the complexity of time table and multi-
commodity flow problems”, 16th Annual Symposium on Foundations of [11] Dezhen Zhang et al., “A novel greedy heuristic algorithm for university
Computer Science (SFCS 1975), pp. 184-193. course timetabling problem”, Proceeding of the 11th World Congress on
Intelligent Control and Automation, year: 2014, pp.5303-5308.
[2] Shengxiang Yang; Sadaf Naseem Jat, “Genetic Algorithms With Guided
and Local Search Strategies for University Course Timetabling”, IEEE [12] Murat Kalender, et al., “A greedy gradient-simulated annealing hyper-
Transactions on Systems, Man, and Cybernetics, Part C (Applications and heuristic for a curriculum-based course timetabling problem”, 2012 12th
Reviews), Volume: 41, Issue: 1, pp. 93-106, 2011. UK Workshop on Computational Intelligence (UKCI).
[3] Zhu Guanyu, “Genetic Algorithm for Solving Curriculum Schedule [13] D. Goldberg, “Genetic Algorithms in Search, Optimization, and Machine
Problem of Senior High School”, Computer Engineering and Learning”, New York: Addison-Wesley, 1989.
Applications, vol. 27, year:2004, pp.215-218. [14] Ade Jamal, “Multiple Scattered Local Search for Course Scheduling
[4] O. Mahdi, R. N. Ainon, and R. Zainuddin, “Using a genetic algorithm Problem”, 2017 International Conference on Soft Computing, Intelligent
optimizer tool to generate good quality timetable,” in Proc. of the 10th System and Information Technology (ICSIIT), pp. 114-119.
IEEE International Conference, vol. 3, pp. 1300–1303, 2003. [15] ZONG Wei, “Research and Realization of University Timetable System
Algorithm”, Computer Simulation, 12nd ed., vol. 28, pp. 390-392, 2011.
349