Constraint Satisfaction Algorithms: Edition of Timetables in The License-Master-Doctorate System
Constraint Satisfaction Algorithms: Edition of Timetables in The License-Master-Doctorate System
Corresponding Author:
Maurice Comlan
Department of Business Computing, National School of Applied Economics and Management
University of Abomey-Calavi
03 BP 1079 Cotonou, Bénin
Email:[email protected]
1. INTRODUCTION
Constraint programming (CP) is a programming paradigm that appeared in the 1970s and 1980s and
allows solving large combinatorial problems such as planning and scheduling problems. In constraint program-
ming, the modeling part is separated using constraint satisfaction problems (CSP), and the resolution part relies
on the active use of the problem’s constraints to reduce the size of the search space (referred to as constraint
propagation) [1], [2]. There are several problems that can be solved using constraint programming, includ-
ing university timetable construction. Universities have always faced the challenge of providing schedules for
teachers and students. A naive solution would be to let each teacher choose the schedule that suits them without
considering other courses. While this may make it easier for the teacher, it creates many collisions in student
schedules [3]. The approach is to try to avoid these collisions while trying to satisfy everyone’s needs. Solving
this problem manually takes a lot of time, depending on the size of the university. To reduce this workload,
researchers have tried to make the method easier by automating it using various types of algorithms and tech-
niques. The problem is called the university course timetabling problem (UCTP) [4], [5]. UCTP is an NP-hard
combinatorial problem [6], [7], partly because there are many variables involved such as teachers and students
with constraints between them, and partly because each university has its own variables and constraints. The
UCTP involves assigning course events, students, and teachers to a time slot and classroom while violating the
2. RELATED WORKS
2.1. Fitness function
The quality of a solution in this context is determined by a fitness function, which plays a crucial role
in evaluating the effectiveness of the algorithms employed. This fitness function calculates the number of stress
breaks while assigning weighted values to different types of stresses. The resulting value serves as a metric for
assessing the overall quality of the solutions generated by these algorithms. A solution is considered workable
if it adheres to all the hard constraints without violating any of them. The algorithms aim to maximize the
fitness function, where a perfect solution achieves a fitness score of 1. A fitness score lower than 1 indicates
that the solution violates one or more constraints, highlighting areas where improvements are needed. To
illustrate these constraints using the example of UCTP, some of the constraints include: i) lessons can only
be scheduled in available (i.e., unoccupied) rooms; ii) each teacher can instruct only one course at any given
time; iii) the classrooms assigned must be spacious enough to accommodate the group of students assigned to
the class; and iv) students cannot be expected to attend two different classes simultaneously. In the context of
this problem, a ”clash” refers to a hard constraint violation, signifying situations where constraints have been
decisively breached. This emphasizes the importance of finding solutions that not only optimize the fitness
function but also adhere to these critical constraints, ensuring a feasible and effective schedule for university
courses.
1
f itness = P (1)
1+ clash
Constraint satisfaction algorithms: edition of timetables in the license-master-doctorate ... (Maurice Comlan)
220 ❒ ISSN: 2722-3221
instantiate all the variables, and it is therefore necessary to split the problem into several parts (for example
by instantiating a variable at each of its possible values) and restarting the filtering on one of these parts and
this, recursively until obtaining the instantiation of all variables. When the filtering detects that the partial
instantiation violates a constraint, we use generally then a rollback mechanism in order to question the last
choice carried out. This series of problem breakdowns can be represented as a tree. The goal of the search is
to browse this tree (building it as you go) until you find a solution to the problem while the filtering consists in
“pruning” this tree by removing all the parts only leading to contradictions [1].
T = T 0 ∗ e−∗k (2)
Constraint satisfaction algorithms: edition of timetables in the license-master-doctorate ... (Maurice Comlan)
222 ❒ ISSN: 2722-3221
students, courses and time intervals according to the size of the problem. In this study, we used data from the
Department of Computer and Telecommunications Engineering in addition to the two preparatory years of the
Polytechnic School of Abomey-Calavi.
4. RESULTS
In order to achieve our objectives, the methodology followed includes several key steps, including
results and the various discussions and interpretations that result from them are presented in this chapter. In
detail, this chapter will present the results of the parameter test for the GA, HCGA, and SAGA and the com-
parison between the three algorithms. As described in the method, each parameter setting was executed nine
times with a fitness value of 1 and a one hour maximum. The Table 4 shows the average execution time of the
different algorithms on each size of problem. The Table 5 shows the average number of generations it took for
each algorithm to get a solution while depending on the size of the problem shows us the average number of
generations it took for each algorithm before getting a solution all depending on the size of the problem.
The Figure 2 shows the elapsed time based on the size of the problem. The Figure 3 shows the decrease
in the number of collisions as a function of the number of generations. The Figure 4 shows the evolution of the
average fitness of the population as a function of the number of generations. The stagnant behavior of the GA
in the later stages of execution was expected given the findings of Thierens [11]. In testing, all algorithms were
able to find a solution within one hour regardless of the size of the problem, but the execution time will vary
depending on the size of the problem. The execution time is exponential which explains the time taken by the
different algorithms. We can see that SAGA gives better execution time compared to HCGA and GA based on
the Table 4. The slowness of the algorithms can be explained by the fact that the GA uses a population and does
a lot of work between each generation. Based on the Figure 2 we deduce that the SAGA converges faster than
the two algorithms. We also note that the simple GA falls enormously in an optimum room. This is explained
by the parts of the curve which are almost a line.
Table 4. Average execution time of algorithms in Table 5. Average number of generations depending on
seconds depending on the size of the problem the size of the problem
Size GA SAGA HCGA Size GA SAGA HCGA
Small 11 11 6 Small 5 5 3
Medium 131 168 175 Medium 15 20 21
Large 2209 1713 2642 Large 125 97 149
Figure 2. Elapsed time depending on the size of the problem (large size)
Constraint satisfaction algorithms: edition of timetables in the license-master-doctorate ... (Maurice Comlan)
224 ❒ ISSN: 2722-3221
5. CONCLUSION
CP is a programming paradigm that allows to solve large combinatorial problems such as that plan-
ning and scheduling issues. In this parper, we focused on the study of genetic algorithms. Specifically, we have
studied the algorithm classical genetics then two hybrid algorithms that are HCGA and GASA. A hybrid GA
is the merger of a metaheuristic or local search with a normal GA. In our study, we opted for high-level hy-
bridization, which involves running each algorithm sequentially. We have applied these algorithms to propose
a system of the development of timetables in a university environment. We first modeled and standardized the
problem for the different algorithms in order to have the same bases for compare them. Based on our results,
the three algorithms manage to find a result at problem within the timeframe we set for our testing. We have the
SAGA in particular which has the best results (execution time and total number of generations) for the broad
problem. So we can say that genetic algorithms are powerful algorithms able to intervene in the resolution of
most satisfaction problems. Based on our results, we can say that the study carried out can be further improved
in the sense that we can try to integrate the management of flexible constraints in order to have a objective
function which takes into account both hard and soft constraints. In addition, the time performance can be
improved by using an alternate way of encoding chromosomes or using backtracking in the algorithm.
REFERENCES
[1] C. Bessiere, “Constraint propagation,” in Handbook of Constraint Programming, Elsevier, 2006, pp. 29–83, doi: 10.1016/S1574-
6526(06)80007-6.
[2] F. Rossi, P. van Beek, and T. Walsh, “Chapter 4 constraint programming,” in Handbook of Knowledge Representation, Elsevier,
2008, pp. 181–211, doi: 10.1016/S1574-6526(07)03004-0.
[3] K. Schimmelpfeng and S. Helber, “Application of a real-world university-course timetabling model solved by integer programming,”
OR Spectrum, vol. 29, no. 4, pp. 783–803, Jul. 2007, doi: 10.1007/s00291-006-0074-z.
[4] M. C. Chen, S. N. Sze, S. L. Goh, N. R. Sabar, and G. Kendall, “A survey of university course timetabling problem: perspectives,
trends and opportunities,” IEEE Access, vol. 9, pp. 106515–106529, 2021, doi: 10.1109/ACCESS.2021.3100613.
[5] N. L. A. Aziz and N. A. H. Aizam, “A brief review on the features of university course timetabling problem,” in AIP Conference
Proceedings, 2018, vol. 2016, p. 020001, doi: 10.1063/1.5055403.
[6] A. A. Lazarev and F. Werner, “A graphical realization of the dynamic programming method for solving NP-hard combinatorial prob-
lems,” Computers & Mathematics with Applications, vol. 58, no. 4, pp. 619–631, Aug. 2009, doi: 10.1016/j.camwa.2009.06.008.
[7] W. Chinnasri, S. Krootjohn, and N. Sureerattanan, “Performance comparison of genetic algorithm’s crossover operators on univer-
sity course timetabling problem,” in Proceedings - 2012 8th International Conference on Computing Technology and Information
Management, ICCM 2012, 2012, vol. 2, pp. 781–786.
[8] H. Babaei, J. Karimpour, and A. Hadidi, “A survey of approaches for university course timetabling problem,” Computers & Indus-
trial Engineering, vol. 86, pp. 43–59, Aug. 2015, doi: 10.1016/j.cie.2014.11.010.
[9] P. Ramdé, P. Lapointe, and M. Dembélé, “The appropriation of policy changes in higher education by students in Sub-Saharan
Africa: the case ofthe bachelor-master-doctorate Reform in Burkina Faso,” Comparative and International Education, vol. 48, no.
2, pp. 1–19, Jun. 2020, doi: 10.5206/cie-eci.v48i2.10789.
[10] E. K. Burke and G. Kendall, Eds., Search methodologies. Boston, MA: Springer US, 2014, doi: 10.1007/978-1-4614-6940-7.
[11] D. Thierens, “Scalability problems of simple genetic algorithms” Evolutionary computation vol. 7, no. 4, pp. 331–352, Jun. 1999,
doi: 10.1162/evco.1999.7.4.331.
[12] P. Kostuch, “The university course timetabling problem with a three-phase approach,” in Practice and Theory of Automated
Timetabling V. PATAT 2004, Berlin: Springer, 2005, pp. 109–125, doi: 10.1007/11593577 7.
[13] P. Laborie, “Algorithms for propagating resource constraints in AI planning and scheduling: existing approaches and new results,”
Artificial Intelligence, vol. 143, no. 2, pp. 151–188, Feb. 2003, doi: 10.1016/S0004-3702(02)00362-4.
[14] D. Pisinger and M. Sigurd, “Using decomposition techniques and constraint programming for solving the two-dimensional bin-
packing problem,” INFORMS Journal on Computing, vol. 19, no. 1, pp. 36–51, Feb. 2007, doi: 10.1287/ijoc.1060.0181.
[15] M. Kumar, M. Husain, N. Upreti, and D. Gupta, “Genetic algorithm: review and application,” SSRN Electronic Journal, 2010, doi:
10.2139/ssrn.3529843.
[16] L. Davis, Handbook of genetic algorithms. New York: Van Nostrand Reinhold, 1991.
[17] E. K. Burke, D. G. Elliman, and R. F. Weare, “The automation of the timetabling process in higher education,” Journal of Educa-
tional Technology Systems, vol. 23, no. 4, pp. 353–362, Jun. 1995, doi: 10.2190/NGYR-EXLB-RK79-K6NU.
[18] G. Anandalingam, “Simulated annealing,” in Encyclopedia of Operations Research and Management Science, New York, NY:
Springer US, 2001, pp. 748–751, doi: 10.1007/1-4020-0611-X 956.
[19] S. Abdullah, H. Turabieh, B. McCollum, and P. McMullan, “A hybrid metaheuristic approach to the university course timetabling
problem,” Journal of Heuristics, vol. 18, no. 1, pp. 1–23, Feb. 2012, doi: 10.1007/s10732-010-9154-y.
[20] D. Abramson, “Constructing school timetables using simulated annealing: sequential and parallel algorithms,” Management Science,
vol. 37, no. 1, pp. 98–113, 1991.
[21] E.-G. Talbi and T. Muntean, “Hill-climbing, simulated annealing and genetic algorithms: a comparative study and application to
the mapping problem,” in [1993] Proceedings of the Twenty-sixth Hawaii International Conference on System Sciences, vol. ii, pp.
565–573, doi: 10.1109/HICSS.1993.284069.
[22] A. L. Bolaji, A. T. Khader, M. A. Al-Betar, and M. A. Awadallah, “University course timetabling using hybridized artifi-
cial bee colony with hill climbing optimizer,” Journal of Computational Science, vol. 5, no. 5, pp. 809–818, Sep. 2014, doi:
10.1016/j.jocs.2014.04.002.
[23] Y. Elhaddad and O. Sallabi, “A new hybrid genetic and simulated annealing algorithm to solve the traveling salesman problem,” in
Proceedings of the World Congress on Engineering 2010, 2010, pp. 11–14.
[24] A. A. Mahiba and C. A. D. Durai, “Genetic algorithm with search bank strategies for university course timetabling problem,”
Procedia Engineering, vol. 38, pp. 253–263, 2012, doi: 10.1016/j.proeng.2012.06.033.
[25] K. Wiilams and M. Ajinaja, “Automatic timetable generation using genetic algorithm,” Computer Engineering and Intelligent Sys-
tems, vol. 10, no. 4, pp. 23–26, 2019.
BIOGRAPHIE OF AUTHORS
Maurice Comlan received his Ph.D. degree from University of Nantes (France) in 2016.
He has also master degree in 2012 from Polytechnic School of Abomey-Calavi in University of
Abomey-Calavi (Bénin). He is currently a computer science researcher. His main researcher interest
focus on real time system, formal method, optimization algorithms, and artificial intelligence. He can
be contacted at [email protected].
Corentin Allohoumbo received his master degree in 2021 from Polytechnic School of
Abomey-Calavi in University of Abomey-Calavi (Bénin). He is currently a computer science re-
searcher. He works as a backend software engineer at Djamo, which is a Financial Software company
with an estimated 110 employees. He can be contacted at [email protected].
Constraint satisfaction algorithms: edition of timetables in the license-master-doctorate ... (Maurice Comlan)