An Effective Local Particle Swarm OptimizationBased Algorithm for Solving the School Timetabling Problem
Abstract
:1. Introduction
2. Some Previous Research on HSTP
3. The Greek HSTP
3.1. The Hard Constraints
 Classroom conflicts: in each class, only one lesson must be taught at a given teaching time. Additionally, in each class, at most, one teacher teaches during any given teaching time slot, except for cases of coteaching;
 Idle periods of classes: idle periods for a class, i.e., hours when a class has no lesson, must be scheduled at the end of the daily teaching hours.
 3.
 Teacher conflicts—parallel teaching: every teacher, in each time period, must teach one class at most;
 4.
 Teacher Availability: each teacher must be assigned to teaching hours during which she/he is available at each specific school. This constraint is typical in Greek high schools, since many teachers usually teach in more than one schools to reach their obligatory teaching hours;
 5.
 Teacher–class–course assignment: the number of hours and courses assigned to each teacher for instruction in each class is fixed and predetermined by the entry data.
 6.
 If two teachers must teach at the same time in the same class, then both must be assigned to this class during the coteaching hours;
 7.
 If two teachers are required to teach in two different classes at the same time, their respective teaching periods should coincide with each other. This happens, for example, when two different classes are divided to form a class of “beginners” and a class of “intermediates” for the lesson of “Foreign Language”. These classes should be taught at the same time by different teachers.
3.2. The Soft Constraints
 Course allocation—class dispersion: each teaching subject must be taught once in a class during a day at most;
 Distribution of teachers’ hours—teacher dispersion: each teacher must have a balanced distribution of her/his working hours (teachings) in the days she/he is available;
 Idle hours of teachers: each teacher must have a solid teaching schedule in each day, i.e., periods of inactivity between two consecutive teaching hours are not allowed. This is a typical constraint in Greek high schools, since teachers prefer to teach in successive hours with the minimum possible number of gaps.
3.3. The Evaluation (Fitness) Function
 Hard Constraint Weight—HCW: This weight is used by the algorithm to distinguish between feasible and nonfeasible timetables. This specific weight should be considerably higher than the value of the other weights, so that feasible but not efficient timetables should rarely have a higher total cost than the nonfeasible ones. However, this weight should not be too large, to avoid restricting the diversity provided by infeasible timetables during the algorithm’s evolution;
 Teachers’ empty periods weight—TEPW: this weight is related to the gaps in teachers’ schedules during a working day;
 Ideal dispersion weight for teachers—IDWT: this weight is used to compute the dispersion of teachers’ hours of teaching;
 Ideal dispersion weight for classes—IDWC: this weight regulates the ideal dispersion of teachings to classes.
 Hard constraints (see Section 3.1)
 Classroom conflicts: this type of hard constraint is always respected by the representation of the particle as a matrix (see Section 4.4.1);
 Idle periods of classes: for each class that has a gap that is not the last hour of the day, the following cost was added: $\mathrm{H}\mathrm{C}\mathrm{W}\ast {\left(2\ast \mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}\right)}^{\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}}$, contrary to the proposal of Tassopoulos and Beligiannis [8], who use the formula $\mathrm{H}\mathrm{C}\mathrm{W}\ast {\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}}^{\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}}$;
 Teacher conflicts—parallel teaching: for each teacher and for each period during which the teacher is assigned to more than one classes, i.e., K classes, the following cost was added: $\mathrm{H}\mathrm{C}\mathrm{W}\ast {\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}}^{\mathrm{k}}$;
 Teacher availability: for every period a teacher is assigned to teach when she/he is not available on the corresponding day, the following cost was added: $\mathrm{H}\mathrm{C}\mathrm{W}\ast {\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}}^{3}$;
 Teacher–class–course assignment: this constraint is never violated due to the initialization process which is performed in accordance with the input data;
 Coteachings: the following cost was added for each class involved in coteaching when the corresponding teacher was assigned to a period, while hers/his coteacher is not assigned to the same period: $\mathrm{H}\mathrm{C}\mathrm{W}\ast {\left(2\ast \mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}\right)}^{\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}}$, contrary to the proposal of Tassopoulos and Beligiannis [8], who use the formula $\mathrm{H}\mathrm{C}\mathrm{W}\ast {\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}}^{\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}}$.
 Soft constraints (see Section 3.2)
 Course allocation—class dispersion: for each class, the following cost was added: $IDWC\ast HOURS\ast {BASE}^{DAYS}$, where $HOURS$ is the number of hours a subject is taught and $DAYS$ is the number of days when this takes place. For example, if a teacher is assigned to a class for three periods during a day, while she/he teaches only one lesson—subject in this class, then this subject occupies two hourly slots. Therefore, $HOURS=2$.
 Distribution of teachers’ hours—teacher dispersion: in this case, an important distinction from the proposal of Tassopoulos and Beligiannis [8] is proposed, since the concept of variable ${\mathrm{a}\mathrm{b}\mathrm{s}\mathrm{o}\mathrm{l}\mathrm{u}\mathrm{t}\mathrm{e}}_{\mathrm{e}\mathrm{r}\mathrm{r}\mathrm{o}\mathrm{r}}$ is introduced. For each teacher, the following cost was added:$\mathrm{I}\mathrm{D}\mathrm{W}\mathrm{T}\ast {\mathrm{a}\mathrm{b}\mathrm{s}\mathrm{o}\mathrm{l}\mathrm{u}\mathrm{t}\mathrm{e}}_{\mathrm{e}\mathrm{r}\mathrm{r}\mathrm{o}\mathrm{r}}\ast {\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}}^{\mathrm{D}\mathrm{A}\mathrm{Y}\mathrm{S}}$, where ${\mathrm{a}\mathrm{b}\mathrm{s}\mathrm{o}\mathrm{l}\mathrm{u}\mathrm{t}\mathrm{e}}_{\mathrm{e}\mathrm{r}\mathrm{r}\mathrm{o}\mathrm{r}}$ is the sum of the absolute values of the differences between the actual hours taught by the teacher in a day and the number of hours she/he should teach according to the ideal distribution. Additionally, $\mathrm{D}\mathrm{A}\mathrm{Y}\mathrm{S}$ is the number of days in which the actual distribution is different from the ideal. For example, if the ideal allocation of hours for a teacher is the distribution “2, 2, 2, 2, 3” (with any permutation of these numbers considered as a valid ideal distribution), while the actual distribution of the teacher’s teaching hours is: “1, 0, 4, 4, 2”, then the value of ${\mathrm{a}\mathrm{b}\mathrm{s}\mathrm{o}\mathrm{l}\mathrm{u}\mathrm{t}\mathrm{e}}_{\mathrm{e}\mathrm{r}\mathrm{r}\mathrm{o}\mathrm{r}}$ equals:  1 − 3  +  0 − 2  +  4 − 2  +  4 − 2  = 8 and days = 4.
 Idle hours of teachers: for each teacher, the following cost was added: $\mathrm{T}\mathrm{E}\mathrm{P}\mathrm{W}\ast \mathrm{H}\mathrm{O}\mathrm{U}\mathrm{R}\mathrm{S}\ast {\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}}^{\mathrm{D}\mathrm{A}\mathrm{Y}\mathrm{S}}$, where $\mathrm{H}\mathrm{O}\mathrm{U}\mathrm{R}\mathrm{S}$ is the total number of gaps within the teacher’s schedule and $\mathrm{D}\mathrm{A}\mathrm{Y}\mathrm{S}$ is the total number of days where the gaps occur.
4. The Proposed Algorithm
4.1. The Particle Swarm Optimization Algorithm
4.2. The Original PSO for Continuous Search Space
4.3. The Local Version of PSO
4.4. A Proposed Local Version of PSO for Discrete Search Space
4.4.1. Particle’s Encoding for the HSTP
4.4.2. Providing the Particles with Flying Ability
4.5. Fundamental Functions
4.5.1. Swap_with_Probability Function
4.5.2. Insert_Column Function
4.5.3. WhileLoopStructure
4.5.4. BackTracking Schema
4.6. The Two Refining Schemas
4.7. The Pseudo Code of the Complete Proposed Algorithm

4.8. Algorithm Parameter Settings
5. Testing the Proposed Algorithm
5.1. The Benchmark Data Set
5.2. Performance of the Proposed Algorithm and Comparison to the Stateofthe Art Algorithms
6. General Remarks, Conclusions, and Further Research Directions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
 Pillay, N. A survey of school timetabling research. Ann. Oper. Res. 2014, 218, 261–293. [Google Scholar] [CrossRef]
 AlYakoob, S.M.; Sherali, H.D. Mathematical models and algorithms for a high school timetabling problem. Comput. Oper. Res. 2015, 61, 56–68. [Google Scholar] [CrossRef]
 Lewis, R. A survey of metaheuristicbased techniques for University Timetabling problems. OR Spectr. 2008, 30, 167–190. [Google Scholar] [CrossRef] [Green Version]
 Esmaeilbeigi, R.; MakHau, V.; Yearwood, J.; Nguyen, V. The multiphase course timetabling problem. Eur. J. Oper. Res. 2022, 300, 1098–1119. [Google Scholar] [CrossRef]
 Bettinelli, A.; Cacchiani, V.; Roberti, R.; Toth, P. An overview of curriculumbased course timetabling. Top 2015, 23, 313–349. [Google Scholar] [CrossRef]
 Willemen, R.J. School Timetable Construction: Algorithms and Complexity. Ph.D. Thesis, Technische Universiteit Eindhoven, Eindhoven, The Netherlands, 2002. [Google Scholar]
 Tan, J.S.; Goh, S.L.; Kendall, G.; Sabar, N.R. A survey of the stateoftheart of optimisation methodologies in school timetabling problems. Expert Syst. Appl. 2021, 165, 113943. [Google Scholar] [CrossRef]
 Tassopoulos, I.X.; Beligiannis, G. A hybrid particle swarm optimization based algorithm for high school timetabling problems. Appl. Soft Comput. 2012, 12, 3472–3489. [Google Scholar] [CrossRef]
 Tassopoulos, I.X.; Beligiannis, G.N. Solving effectively the school timetabling problem using particle swarm optimization. Expert Syst. Appl. 2012, 39, 6029–6040. [Google Scholar] [CrossRef]
 Tassopoulos, I.X.; Beligiannis, G.N. Using particle swarm optimization to solve effectively the school timetabling problem. Soft Comput. 2012, 16, 1229–1252. [Google Scholar] [CrossRef]
 Skoullis, V.I.; Tassopoulos, I.X.; Beligiannis, G.N. Solving the high school timetabling problem using a hybrid cat swarm optimization based algorithm. Appl. Soft Comput. 2017, 52, 277–289. [Google Scholar] [CrossRef]
 Tassopoulos, I.X.; Iliopoulou, C.A.; Beligiannis, G.N. Solving the Greek school timetabling problem by a mixed integer programming model. J. Oper. Res. Soc. 2019, 71, 117–132. [Google Scholar] [CrossRef]
 Schaerf, A. A Survey of Automated Timetabling. Artif. Intell. Rev. 1999, 13, 87–127. [Google Scholar] [CrossRef]
 Sørensen, M.; Stidsen, T.R. Comparing Solution Approaches for a Complete Model of High School Timetabling. DTU Management Engineering Report No. 5.2013; Technical University of Denmark, Department of Management Engineering: Lyngby, Denmark, 2013. [Google Scholar]
 Post, G.; Ahmadi, S.; Geertsema, F. Cyclic transfers in school timetabling. OR Spectr. 2012, 34, 133–154. [Google Scholar] [CrossRef] [Green Version]
 Santos, H.; Uchoa, E.; Ochi, L.S.; Maculan, N. Strong bounds with cut and column generation for classteacher timetabling. Ann. Oper. Res. 2012, 194, 399–412. [Google Scholar] [CrossRef] [Green Version]
 Sørensen, M.; Stidsen, T.R. High school timetabling: Modeling and solving a large number of cases in Denmark, PATAT 2012. In Proceedings of the 9th International Conference on the Practice and Theory of Automated Timetabling, Son, Norway, 28–31 August 2012; pp. 365–368. [Google Scholar]
 Dorneles, P.; de Araújo, O.C.; Buriol, L.S. A fixandoptimize heuristic for the high school timetabling problem. Comput. Oper. Res. 2014, 52, 29–38. [Google Scholar] [CrossRef]
 Kristiansen, S.; Sørensen, M.; Stidsen, T.J.R. Integer programming for the generalized high school timetabling problem. J. Sched. 2015, 18, 377–392. [Google Scholar] [CrossRef]
 Papoutsis, K.; Valouxis, C.; Housos, E. A column generation approach for the timetabling problem of Greek high schools. J. Oper. Res. Soc. 2003, 54, 230–238. [Google Scholar] [CrossRef]
 Valouxis, C.; Housos, E. Constraint programming approach for school timetabling. Comput. Oper. Res. 2003, 30, 1555–1572. [Google Scholar] [CrossRef]
 Birbas, T.; Daskalaki, S.; Housos, E. School timetabling for quality student and teacher schedules. J. Sched. 2009, 12, 177–197. [Google Scholar] [CrossRef]
 Demirović, E.; Stuckey, P.J. Constraint programming for high school timetabling: A schedulingbased model with hot starts. In Proceedings of the International Conference on the Integration of Constraint Programming, Artificial Intelligence, and Operations Research, Delft, The Netherlands, 26–29 June 2018; pp. 135–152. [Google Scholar] [CrossRef]
 Saviniec, L.; Constantino, A.A. Effective local search algorithms for high school timetabling problems. Appl. Soft Comput. 2017, 60, 363–373. [Google Scholar] [CrossRef]
 Saviniec, L.; Santos, M.O.; Costa, A.M. Parallel local search algorithms for high school timetabling problems. Eur. J. Oper. Res. 2018, 265, 81–98. [Google Scholar] [CrossRef]
 Fonseca, G.H.G.; Santos, H.G.; Toffolo, T.A.M.; Brito, S.S.; Souza, M.J.F. A SAILS approach for the high school timetabling problem. In Proceedings of the 9th International Conference on the Practice and Theory of Automated Timetabling, PATAT 2012, Son, Norway, 28–31 August 2012. [Google Scholar]
 Zhang, D.; Liu, Y.; M’hallah, R.; Leung, S.C. A simulated annealing with a new neighborhood structure based algorithm for high school timetabling problems. Eur. J. Oper. Res. 2010, 203, 550–558. [Google Scholar] [CrossRef]
 Katsaragakis, I.V.; Tassopoulos, I.X.; Beligiannis, G.N. A Comparative Study of Modern Heuristics on the School Timetabling Problem. Algorithms 2015, 8, 723–742. [Google Scholar] [CrossRef] [Green Version]
 Tan, J.S.; Goh, S.L.; Sura, S.; Kendall, G.; Sabar, N.R. Hybrid particle swarm optimization with particle elimination for the high school timetabling problem. Evol. Intell. 2020, 14, 1915–1930. [Google Scholar] [CrossRef]
 Teixeira, U.R.; Souza, M.J.F.; de Souza, S.R.; Coelho, V.N. An adaptive VNS and skewed GVNS approaches for school timetabling problems. In International Conference on Variable Neighborhood Search; Springer: Cham, Switzerland, 2018; pp. 101–113. [Google Scholar] [CrossRef]
 Saviniec, L.; Santos, M.O.; Costa, A.M.; dos Santos, L.M. Patternbased models and a cooperative parallel metaheuristic for high school timetabling problems. Eur. J. Oper. Res. 2020, 280, 1064–1081. [Google Scholar] [CrossRef]
 Odeniyi, O.A.; Omidiora, E.O.; Olabiyisi, S.O.; Oyeleye, C.A. A Mathematical Programming Model and Enhanced Simulated Annealing Algorithm for the School Timetabling Problem. Asian J. Res. Comput. Sci. 2020, 5, 21–38. [Google Scholar] [CrossRef]
 Ahmed, L.N.; Ozcan, E.; Kheiri, A. Solving high school timetabling problems worldwide using selection hyperheuristics. Expert Syst. Appl. 2015, 42, 5463–5471. [Google Scholar] [CrossRef] [Green Version]
 Pillay, N.; Özcan, E. Automated generation of constructive ordering heuristics for educational timetabling. Ann. Oper. Res. 2019, 275, 181–208. [Google Scholar] [CrossRef] [Green Version]
 Fonseca, G.H.G.; Santos, H.G.; Carrano, E.G. Late acceptance hillclimbing for high school timetabling. J. Sched. 2016, 19, 453–465. [Google Scholar] [CrossRef]
 Kingston, J.H. A Software Library for School Timetabling. 2012. Available online: http://sydney.edu.au/engineering/it/_jeff/khe/ (accessed on 1 March 2023).
 Domrös, J.; Homberger, J. An evolutionary algorithm for high school timetabling. In Proceedings of the Ninth International Conference on the Practice and Theory of Automated Timetabling, PATAT 2012, Son, Norway, 28–31 August 2012. [Google Scholar]
 Kheiri, A.; Ozcan, E.; Parkes, A.J. HySST: Hyperheuristic search strategies and timetabling. In Proceedings of the Ninth International Conference on the Practice and Theory of Automated Timetabling, PATAT 2012, Son, Norway, 28–31 August 2012. [Google Scholar]
 Eberhart, R.; Kennedy, J. A new optimizer using particle swarm theory. In Proceedings of the Sixth International Symposium on Micro Machine and Human Science, Nagoya, Japan, 4–6 October 1995. [Google Scholar] [CrossRef]
 Eberhart, R.; Kennedy, J. Discrete binary version of the particle swarm algorithm. In Proceedings of the IEEE International Conference on Systems, Man and Cybernetics 5, Banff, AB, Canada, 5–8 October 1997; pp. 4104–4108. [Google Scholar]
 Available online: http://clerc.maurice.free.fr/pso/ (accessed on 1 March 2023).
 Clerc, M. Beyond Standard Particle Swarm Optimization. Int. J. Swarm Intell. Res. 2010, 1, 46–61. [Google Scholar] [CrossRef] [Green Version]
 Available online: https://hal.science/hal00764996/document (accessed on 1 March 2023).
 Johnes, J. Operational Research in education. Eur. J. Oper. Res. 2015, 243, 683–696. [Google Scholar] [CrossRef] [Green Version]
 Kristiansen, S.; Stidsen, T.R. A Comprehensive Study of Educational Timetabling—A Survey. Management Engineering Report No. 8.2013; Technical University of Denmark, Department of Management Engineering: Lyngby, Denmark, 2013. [Google Scholar]
 Raghavjee, R.; Pillay, N. A Study of Genetic Algorithms to Solve the School Timetabling Problem. In Advances in Soft Computing and Its Applications: 12th Mexican International Conference on Artificial Intelligence, MICAI 2013, Mexico City, Mexico, 24–30 November 2013, Proceedings, Part II (Vol. Lecture Notes in Computer Science 8266); Castro, F., Gelbukh, A., Eds.; Springer–Verlag: Berlin/Heidelberg, Germany, 2013; pp. 64–80. [Google Scholar] [CrossRef]
 Available online: https://www.dropbox.com/home/Local%20PSO%20%2B%20School%20Timetabling%20Problem (accessed on 1 March 2023).
Parameter  Meaning  Value 

$\mathrm{S}\mathrm{w}\mathrm{a}\mathrm{r}\mathrm{m}\_\mathrm{S}\mathrm{i}\mathrm{z}\mathrm{e}$  Number of particles  15 
$\mathrm{M}\mathrm{a}\mathrm{x}\_\mathrm{I}\mathrm{t}\mathrm{e}\mathrm{r}$  Number of iteration (generations)  5100 
$\mathrm{r}$  Acceptance probability of a swap with a hard conflict  50% 
backtracking_tolerance generations  Allowed number of generations without particle’s fitness improvement  150 
2^{nd}_Refining_schemas_generations  Allowed number of generations without global best’s fitness improvement in the second refining schema  500 
$\mathrm{n}\mathrm{e}\mathrm{i}\mathrm{g}\mathrm{h}\mathrm{b}\mathrm{o}\mathrm{r}\mathrm{s}$  Size of particle’s neighborhood  3 
$\mathrm{e}\mathrm{x}\mathrm{i}\mathrm{t}\_\mathrm{l}\mathrm{o}\mathrm{o}\mathrm{p}\_\mathrm{t}\mathrm{i}\mathrm{m}\mathrm{e}\mathrm{s}$  Number of cycles in the whileloop structure when an exit chance is given  10 
exit_loop_prob  Probability of exiting the whileloop in main algorithm  1.086% 
${\mathrm{M}\mathrm{a}\mathrm{x}}_{1}$  Maximum swap number in the first refining schema  750,000 
${\mathrm{M}\mathrm{a}\mathrm{x}}_{2}$  Maximum swap number in the second refining schema  800,000 
Parameter  Meaning  Value 

$\mathrm{H}\mathrm{C}\mathrm{W}$  Hard constraints’ weight  10 
$\mathrm{B}\mathrm{A}\mathrm{S}\mathrm{E}$  Exponential base  1.3 
$\mathrm{I}\mathrm{D}\mathrm{W}\mathrm{C}$  Class dispersion weight  0.95 
$\mathrm{I}\mathrm{D}\mathrm{W}\mathrm{T}$  Teacher dispersion weight  0.6 
$\mathrm{T}\mathrm{E}\mathrm{P}\mathrm{W}$  Teacher gaps weight  0.06 
File No.  Number of Teachers  Number of Classes  Number of Teaching Hours  Number of Teachers Involved to CoTeachings  Number of CoTeachings Hours  Number of Teachers with Unavailability  Number of Unavailability Hours 

1  34  11  385  9  36  12  224 
2  35  11  385  17  67  11  133 
3  19  6  210  0  0  8  133 
4  19  7  245  6  31  6  98 
5  18  6  184  0  0  10  161 
7  35  13  455  17  70  6  91 
8  11  5  150  0  0  0  0 
9  15  6  202  0  0  7  98 
10  17  7  210  0  0  0  0 
11  21  9  306  0  0  0  0 
Instance  Global PSO [8]  Local Version of PSO (Proposed Algorithm)  

Score  Exec. Time (mins)  Score  Exec. Time (mins)  
1  best  11  32 min 39 s  7  37 min 17 s 
worst  21  39 min 15 s  20  40 min 42 s  
Ave.  16  36 min 36 s  12.97  38 min 2 s  
STD  2.5  3 min 24 s  2.35  2 min  
CV  15.6%  9.3%  18.1%  5.25%  
2  best  18  46 min 57 s  13  44 min 3 s 
worst  28  48 min 30 s  21  48 min 11 s  
Ave.  22.1  47 min 48 s  17.3  45 min 10 s  
STD  2.5  48 s  1.65  1 min 5 s  
CV  11.3%  1.7%  9.5%  2.2%  
3  best  5  3 min 30 s  4  1 min 20 s 
worst  9  4 min 17 s  10  1 min 50 s  
Ave.  7.4  3 min 54 s  8.3  1 min 40 s  
STD  0.8  24 s  1.7  15 s  
CV  10.8%  10.3%  20.5%  15%  
4  best  5  13 min 4 s  3  6 min 45 s 
worst  13  13 min 26 s  10  10 min 15 s  
Ave.  8.8  13 min 12 s  7.25  9 min 10 s  
STD  2.2  18 s  1.6  47 s  
CV  25%  2.3%  22%  7.5%  
5  best  0  2 min 50 s  0  1 min 10 s 
worst  0  3 min 10 s  3  1 min 40 s  
Ave.  0  3 min  0.88  1 min 20 s  
STD  0  6 s  0.99  12 s  
CV  0%  3,3%    15%  
7  best  23  57 min 36 s  6  67 min 19 s 
worst  49  58 min 22 s  26  68 min 30 s  
Ave.  35.8  57 min 54 s  18.6  67 min 45 s  
STD  6.8  24 s  4  15 s  
CV  19%  0.7%  21.5%  0.37%  
8  best  11  1 min 47 s  11  40 s 
worst  11  1 min 48 s  12  50 s  
Ave.  11  1 min 48 s  11.2  46 s  
STD  0  0 s  0.39  3 s  
CV  0%  0%  3.5%  6.5%  
9  best  2  4 min 21 s  2  1 min 53 s 
worst  3  4 min 28 s  4  2 min 10 s  
Ave.  2.1  4 min 24 s  2.5  2 min 1 s  
STD  0.3  6 s  0.74  10 s  
CV  14.3%  2.3%    8.3%  
10  best  10  3 min 42 s  10  1 min 29 s 
worst  12  3 min 42 s  13  1 min 40 s  
Ave.  10.3  3 min 42 s  11.4  1 min 34 s  
STD  0.6  0 s  0.97  7 s  
CV  5,8%  0%  8.5%  7.4%  
11  best  19  7 min 7 s  19  2 min 57 s 
worst  21  7 min 50 s  23  3 min 15 s  
Ave.  20.3  7 min 24 s  20.5  3 min 5 s  
STD  0.6  24 s  1.63  13 s  
CV  3%  5.4%  7.9%  7.2% 
Instance  CSO [11]  Local Version of PSO (Proposed Algorithm)  

Score  Exec. Time (min)  Score  Exec. Time (min)  
1  best  11  25 min 16 s  7  37 min 17 s 
worst  23  30 min 11 s  20  40 min 42 s  
Ave.  16.4  28 min 24 s  12.97  38 min 2 s  
STD  2.5  1 min 11 s  2.35  2 min  
CV  15%  4.16%  18.1%  5.25%  
2  best  18  32 min 30 s  13  44 min 3 s 
worst  30  37 min 37 s  21  48 min 11 s  
Ave.  22.83  35 min 12 s  17.3  45 min 10 s  
STD  2.7  1 min 6 s  1.65  1 min 5 s  
CV  12%  3.1%  9.5%  2.2%  
3  best  5  2 min 51 s  4  1 min 20 s 
worst  10  4 min 27 s  10  1 min 50 s  
Ave.  7.5  3 min 42 s  8.3  1 min 40 s  
STD  0.96  24 s  1.7  15 s  
CV  12.8%  10.8%  20.5%  15%  
4  best  5  7 min 35 s  3  6 min 45 s 
worst  14  9 min 42 s  10  10 min 15 s  
Ave.  9.67  8 min 42 s  7.25  9 min 10 s  
STD  1.87  35 s  1.6  47 s  
CV  19.3%  6.7%  22%  7.5%  
5  best  0  1 min 57 s  0  1 min 10 s 
worst  1  2 min 50 s  3  1 min 40 s  
Ave.  0.13  2 min 13 s  0.88  1 min 20 s  
STD  0.34  13 s  0.99  12 s  
CV    9.5%    15%  
7  best  24  42 min 13 s  6  67 min 19 s 
worst  47  49 min 20 s  26  68 min 30 s  
Ave.  34.7  45 min 42 s  18.6  67 min 45 s  
STD  5.98  2 min 18 s  4  15 s  
CV  17%  5%  21.5%  0.37%  
8  best  11  1 min 9 s  11  40 s 
worst  12  1 min 25 s  12  50 s  
Ave.  11.03  1 min 18 s  11.2  46 s  
STD  0.18  4 s  0.39  3 s  
CV  1.6%  5.4%  3.5%  6.5%  
9  best  2  2 min 51 s  2  1 min 53 s 
worst  2  3 min 24 s  4  2 min 10 s  
Ave.  2  3 min 6 s  2.5  2 min 1 s  
STD  0  7 s  0.74  10 s  
CV  0%  3.9%    8.3%  
10  best  10  2 min 20 s  10  1 min 29 s 
worst  12  2 min 51 s  13  1 min 40 s  
Ave.  10.6  2 min 30 s  11.4  1 min 34 s  
STD  0.55  10 s  0.97  7 s  
CV  5.2%  6.8%  8.5%  7.4%  
11  best  18  4 min 52 s  19  2 min 57 s 
worst  20  7 min 11 s  23  3 min 15 s  
Ave.  18.67  5 min 38 s  20.5  3 min 5 s  
STD  0.6  39 s  1.63  13 s  
CV  3.2%  11.6%  7.9%  7.2% 
Instance  Gurobi  CPLEX  LocalBased PSO  Optimality Proven? 

1  8  8  7  No 
2  16  14  13  No 
3  5 *  5 *  5 *  Yes 
4  5  6  3  No 
5  0 *  0 *  0 *  Yes 
7  12  11  6  No 
8  11 *  11 *  11 *  Yes 
9  2  2  2  No 
10  10 *  10 *  10 *  Yes 
11  17 *  18  19  Yes 
Instance  Gurobi  CPLEX  LocalBased PSO 

1  1 min 31 s *  1 min 40 s *  37 min 17 s 
2  1 min 33 s *  1 min 28 s *  44 min 3 s 
3  2 s  2 s  1 min 20 s 
4  52 s *  7 s *  6 min 45 s 
5  <1 s  <1 s  1 min 10 s 
7  6 min 33 s *  4 min 11 s *  67 min 19 s 
8  6 s  8 s  40 s 
9  3 s *  5 s *  1 min 53 s 
10  2 s  5 s  1 min 29 s 
11  6 min 44 s *  3 min 20 s *  2 min 57 s 
Instance  Main Algorithm Score  1st Refining Phase Score  2nd Refining Phase Score  Total Refining Improvement (%) 

1  44  7  7  84.1 
2  41  14  13  68.3 
3  12  5  5  58.3 
4  39  5  3  92.3 
5  6  0  0  100 
7  59  25  6  89.9 
8  18  11  11  38.9 
9  25  2  2  92 
10  19  10  10  47.4 
11  32  19  19  40.6 
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. 
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tassopoulos, I.X.; Iliopoulou, C.A.; Katsaragakis, I.V.; Beligiannis, G.N. An Effective Local Particle Swarm OptimizationBased Algorithm for Solving the School Timetabling Problem. Algorithms 2023, 16, 291. https://doi.org/10.3390/a16060291
Tassopoulos IX, Iliopoulou CA, Katsaragakis IV, Beligiannis GN. An Effective Local Particle Swarm OptimizationBased Algorithm for Solving the School Timetabling Problem. Algorithms. 2023; 16(6):291. https://doi.org/10.3390/a16060291
Chicago/Turabian StyleTassopoulos, Ioannis X., Christina A. Iliopoulou, Iosif V. Katsaragakis, and Grigorios N. Beligiannis. 2023. "An Effective Local Particle Swarm OptimizationBased Algorithm for Solving the School Timetabling Problem" Algorithms 16, no. 6: 291. https://doi.org/10.3390/a16060291