Incorporating Great Deluge with Kempe Chain Neighbourhood Structure for the Enrolment-Based Course Timetabling Problem Salwani Abdullah 1, Khalid Shaker 1, Barry McCollum 2, and Paul McMullan 2 1 Data Mining and Optimization Research Group (DMO), Center for Artificial Intelligence Technology, Universiti Kebangsaan Malaysia, 43600 Bangi, Selangor, Malaysia {salwani,khalid}@ftsm.ukm.my 2 Department of Computer Science, Queen s University Belfast, Belfast BT7 1NN United Kingdom {b.mccollum,p.mcmullan}@qub.ac.uk Abstract. In general, course timetabling refers to assignment processes that assign events (courses) to a given rooms and timeslots subject to a list of hard and soft constraints. It is a challenging task for the educational institutions. In this study we employed a great deluge algorithmwithkempechainneighbourhood structure as an improvement algorithm. The Round Robin (RR) algorithm is used to control the selection of neighbourhood structures within the great deluge algorithm. The performance of our approach is tested over eleven benchmark datasets (representing one large, five medium and five small problems). Experimental results show that our approach is able to generate competitive results when compared with previous available approaches. Possible extensions upon this simple approach are also discussed. Keywords: Great Deluge, Kempe Chain, Round Robin, Course Timetabling. 1 Introduction Course timetabling problems have long attracted the attention of the Operational Research and Artificial Intelligence communities. In addition, variations of the problem have been the subject of two competitions via the website at http://www.metaheuristics.org. A wide variety of approaches for constructing course timetables have been described and discussed in the literature. Graph colouring heuristics became the earliest approaches in solving timetabling problems. Later, metaheuristic methods have shown a success in solving this problem. These methods can be categorized into population-based and local search-based methods [12]. Population-based methods applied to course timetabling problem such as Genetic algorithm [9]; Ant algorithm [11]; and Harmony Search [5]. The local search-based methods employed on the same problem are dual simulated annealing [1]; variable neighbourhood search [2]; graph-based hyper heuristic J. Yu et al. (Eds.): RSKT 2010, LNAI 6401, pp. 70 77, 2010. c Springer-Verlag Berlin Heidelberg 2010
Incorporating Great Deluge with Kempe Chain Neighbourhood Structure 71 [6]; and non-linear great deluge [8]; extended great deluge [10].The hybridization method with an aim to take the best idea from one approach and to incorporate it with another good (or better) idea from another (or more) approach(es) have also shown some success. For example hybridization iterated local search with mutation operator [3]; electromagnetic-like mechanism with great deluge [14]. 2 Problem Description The Enrolment-based Course Timetabling Problem considered in this work was initially defined by the Metaheuristics Network 1. This problem was discussed and an assignment of lecture events to timeslots and rooms according to a variety of hard and soft constraints. The problem description that is employed in this paper is adapted from the description presented in [11]. This problem includes four hard constraints and three soft constraints as follows: Hard constraint: Event conflict i.e. no student can be assigned to more than one course at thesametime(codedash 1 ); Room features i.e. the room should satisfy the features required by the event (coded as H 2 ); Room capacity i.e. the number of students attending the event should be less than or equal to the capacity of the room (coded as H 3 ); Room occupancy i.e. no more than one event is allowed at a timeslot in each room (coded as H 4 ). Soft constraints: Event in the last timeslot i.e. a student shall not have to sit a course that is scheduled in the last timeslot of the day (coded as S 1 ); Two consecutive events i.e. a student shall not have more than 2 consecutive events (coded as S 2 ); One event a day i.e. a student shall not have to sit a single course on a day (coded as S 3 ). Hard constraints act an inviolable requirement. A timetable which meets the hard constraints is cognized as a feasible solution. The problem has: A set of N courses, e = {e 1,...,e N }; 45 timeslots; A set of R rooms; A set of F room features; A set of M students. The main objective is to minimise the violation of the soft constraints in a feasible solution that later represents the quality of the obtained solution. A solution consists of an ordered list of length N where the position corresponds to the events i.e. position i corresponds to event e i for i = 1,..., N. Thevalues for each position are a number between 0 to 44 corresponding to the timeslot index and 0 to R 1 corresponding to the room index. For example a timeslot vector is given as (0,17,30,,10) and a room vector is given as (4,3,0,,3) means that event e 1 is scheduled in timeslot 0 at room 4. Event e 2 is scheduled in timeslot 17 at room 3 and finally event e N is scheduled in timeslot 10 at room 3. 1 http://www.metaheuristics.net
72 S. Abdullah et al. 3 The Proposed Algorithm The algorithm consists of two phases i.e. constructive heuristic to obtain a feasible initial solution; and an improvement algorithm with an aim to optimise the violation of the soft constraints while maintaining the feasibility of the solutions that works with a set of neighbourhood structures. 3.1 Neighbourhood Structures Neighbourhood structure is one of the key factors for a local search algorithm to get good performance. In this work, we employed three different types of neighbourhood structures. Their explanations are outlined as follows: Nbs 1 : Move a random selected event to a feasible timeslot that can generate the lowest penalty cost; Nbs 2 : Swap two events at random; Nbs 3 :Kempechain neighbourhood - select one event and timeslot at random, then apply the kempe chain from [13]. Kempe chain neighbourhood involves swapping a subset of the courses in two distinct timeslots. The main reason of using kempe chain neighbourhood is to avoid the stagnation state occurs when there is no improvement on the quality of the best feasible solution obtained so far during the improvement process, as the kempe chain (when it occurs) will do shaking to the solution, thus appear a new empty timeslots. This may contributes in finding better solutions later. More details on kempe chain neighbourhood structures can be found in Burke et al. [7]andThompsonet al. [13]. 3.2 Phase 1: Constructive Heuristic The initial solution is produced using a constructive heuristic called least saturation degree which starts from an empty timetable [10]. This feasible solution is obtained by adding or removing appropriate events (courses) from the schedule based on room availability (we attempt to schedule those courses with the least room availabilities earlier on in the process), without taking into account any of the soft constraints, until the hard constraints are met. If a feasible solution is found, the algorithm stops. Otherwise, the neighbourhood moves (Nbs 1 and/or Nbs 2,) are applied to attempt to move from an infeasible to feasible solution. Nbs 1 is applied for a certain number of iterations. If a feasible solution is met, then the algorithm stops. Otherwise the algorithm continues by applying a Nbs 2 neighbourhood structure for a certain number of iterations. In this work, across all instances tested, the schedules are made feasible before starting the improvement algorithm. 3.3 Phase 2: Improvement Algorithm Using a Great Deluge with Kempe Chain Neighbourhood Structure The pseudo code for the improvement approach which is implemented in this paper is given in Fig. 1.
Incorporating Great Deluge with Kempe Chain Neighbourhood Structure 73 Initialization Phase Sol GD =Sol; Sol best =Sol; f(sol GD) =f(sol); f(sol best )= f(sol); Set number of iteration, NumOfIteGD; Set not improving length GD; Set expected final solution, Sol opt; Set initial level: level = f(sol GD); Set ΔB=((f(Sol GD) -Sol opt)/(numofitegd); Set not improving counter = 0; Set iterations counter, Iter = 0; Improvement Phase Iter = 0; do while (Iter)< (NumOfIteGD) Define a neighbourhood of Sol GD based on RR algorithm to generate TempSol GD; Sol hill = TempSol GD; Sol besthill = TempSol GD; Set time limit; do while (not time limit) Define a neighbourhood Nbs 2 on Sol hill to obtain TempSol hill ; if (f(tempsol hill ) < f(sol besthill )) Sol hill = TempSol hill ; Sol besthill = TempSol hill ; end if end do; if (Sol besthill <Sol best Sol best = Sol besthill ; Sol GD = Sol besthill ; not improving counter = 0; level = level - ΔB; else if (f(sol besthill ) level) Sol GD = Sol besthill ; not improving counter = 0; level = level - ΔB; else not improving counter++; if (not improving counter==not improving length GD) level= level + random(1, 3); end if Iter ++; end do; Fig. 1. The pseudo code of the great deluge with kempe chain neighbourhood structure The algorithm starts with a feasible initial solution (Sol) which is generated by a constructive heuristic in Phase 1. In the approach presented in this paper, a set of the neighbourhood structures is applied as in section 3.1. This application
74 S. Abdullah et al. of neighbourhood structures is controlled using the Round Robin Scheduling algorithm (RR), described in section 3.4. The hard constraints are never violated during the timetabling process. The hard constraints are never violated during the course of the timetabling process. At the initialization phase, the algorithm sets initial values for all parameters used, such as the current solution (Sol GD ) and best solution (Sol best )areset to be Sol, the number of iteration (NumOfIteGD) which is set to be 200,000 (as in [1] and [14]), expected final solution (f (Sol opt )), not improving counter (not improving length GD) which is set to be 20 (based on prelimenary experiments), the level in the great deluge (level), etc. At the improvement phase, a neighbourhood structure which is defined using a round-robin algorithm is employed on Sol GD to generate a candidate solution, TempSol GD.Set(Sol hill TempSol GD )and(sol besthill TempSol GD ). The hill climbing algorithm with Nbs 2 neighbourhood structure is then applied on Sol hill for a certain time (set to be 6 seconds based on preliminary experiments) with an aim to further increase the quality of the solution obtained, called TempSol hill. This neighbourhood structure is chosen because we believe that the operation of Nbs 2 does not take longer time. The f (TempSol hill )iscomparedto the f (Sol hill ). If it is better, then the current and best solutions within the hill climbing algorithm operations are updated (Sol hill TempSol hill ; Sol besthill TempSol hill ). The best solution obtained from the hill climbing (Sol besthill ) later will be compared with the best solution in hand (Sol best ). If a better solution is found, the current solution (Sol GD ) and the best solution (Sol best ) will be updated (Sol GD Sol hill, Sol best Sol hill ) and the level will be decreased (level level - ΔB ).Otherwise f (Sol besthill ) will be compared against the level. If the quality of Sol besthill is better than the level, the current solution, Sol GD will be updated as Sol besthill. Otherwise, not improving counter (not improving counter ) will be increased by 1. If not improving counter is equal to a constant not improving length GD, thelevel will be increased with a certain number (based on a random generated number between 1 and 3 in this experiment) in order to allow some flexibilities in accepting a worse solution. 3.4 Round-Robin Algorithm (RR) The RR algorithm is employed to control the selection of the neighbourhood structures, which are ordered in sequence. In this work the neighbourhood structures are ordered as Nbs 1, Nbs 2 and Nbs 3 (see subsection 3.1). A time slice or quantum is assigned for each neighbourhood structure in equal portions, in a circular order. The neighbourhood structure is dispatched in a FIFO manner at a given quantum denoted as qtime (which is set to 5 seconds). Note that in this paper, all parameters used are based on a number of preliminary experiments. The pseudo code for the RR algorithm is presented in Fig. 2.
Incorporating Great Deluge with Kempe Chain Neighbourhood Structure 75 Set quantum time, qtime; Set a sequence of neighbourhood structures in a queue which is ordered as Nbs i where i 1,,K and K = 3; Set initial value to counter qtime; do while (qtime not met ) Select a neighbourhood structure Nbs i in the queue where i 1,,K where K = 3; A: Apply Nbs i on current solution,sol GD to generate new solution TempSol GD; if there is an improvement on the quality of the solution repeat label A else insert Nbs i into the queue; counter qtime = q time; end do Fig. 2. The pseudo code for RR algorithm 4 Simulation Results The algorithm was implemented on a Pentium 4 Intel 2.33 GHz PC Machine using Matlab on a Windows XP Operating System. For each benchmark dataset the algorithm was run for 200,000 evaluations with 10 test-runs to obtain an average value. We have evaluated our results on the instances taken from Socha et al. [17] and which are available at http://iridia.ulb.ac.be/ msampels/tt.data/. Those were proposed by the Metaheuristics Network that need to schedule 100-400 courses into a timetable with 45 timeslots corresponding to 5 days of 9 hours each, whilst satisfying room features and room capacity constraints. They are divided into three categories: small, medium and large. We deal with 11 instances: 5 small, 5 medium and 1 large. Table 1 shows the comparison of the approach in this paper with other available approaches in the literature on the data instances. This includes iterative Table 1. Comparison of our results with other approaches in the literature Dataset Our method M1 M2 M3 M4 M5 M6 M7 M8 M9 Small1 0 0 6 0 0 0 3 0 0 0 Small2 0 0 7 0 0 0 4 0 0 0 Small3 0 0 3 0 0 0 6 0 0 0 Small4 0 0 3 0 0 0 6 0 0 0 Small5 0 0 4 0 0 0 0 0 0 0 Medium1 98 242 372 317 221 80 140 96 93 124 Medium2 113 161 419 313 147 105 130 96 98 117 Medium3 123 265 359 357 246 139 189 135 149 190 Medium4 100 181 348 247 165 88 112 79 103 132 Medium5 135 151 171 292 130 88 141 87 98 73 Large 610-1068 - 529 730 876 683 680 424
76 S. Abdullah et al. Fig. 3. (a) and (b) Box plots of the penalty costs for small, medium and large datasets improvement algorithm by M1-Abdullah et al. [3]; M2-graph hyper heuristic by Burke et al. [6]; M3-variable neighbourhood search with tabu by Abdullah et al. [2]; M4-hybrid evolutionary approach by Abdullah et al. [4]; M5-extended great deluge by McMullan [10]; M6-non linear great deluge by Landa-Silva and Obit [8]; M7-electromagnetic-like mechanism with great deluge by Turabieh et al. [14]; M8-dual simulated annealing by Abdullah et al. [1]; and M9- harmony search by Al-Betar et al. [5]. Note that the best results are presented in bold. Our algorithm is capable to find feasible timetables for all eleven cases and obtain competitive results. Fig. 3 (a) and (b) show the box plots of the cost when solving small, medium and large instances, respectively. The results for the medium datasets are less dispersed compared to large and small. Wecanseethatthemedian is closer to the best in small1, small3 and all medium datasets; however this is not the case for small2, small4, small5 and large datasets. We believe that the size and the landscape of the search space is different from one problem to others even though there are form the same groups of datasets, due to the fact that the dispersion of solution points are significantly different from one to another. Thus, we believe that by combining several neighbourhood structures helps to compensate against the ineffectiveness of using each type of neighbourhood structure in isolation. 5 Conclusion and Future Work The overall goal of this paper is to investigate a great deluge algorithm with kempe chain neighbourhood structure in the course timetabling problem. A round-robin algorithm is used to control the selection of the neighbourhood structures from the list. Preliminary comparisons indicate that our approach is able to produce both feasible and good quality timetables and competitive with other approaches in the literature applied to the same domain here. Our future work will try to intelligently select a subset of neighbourhood structures from a much larger pool of neighbourhoods and applied to curriculum-based course timetabling problems.
Incorporating Great Deluge with Kempe Chain Neighbourhood Structure 77 References 1. Abdullah, S., Shaker, K., McCollum, B., McMullan, P.: Dual sequence simulated annealing with round-robin approach for university course timetabling. In: Cowling, P., Merz, P. (eds.) EvoCOP 2010. LNCS, vol. 6022, pp. 1 10. Springer, Heidelberg (2010) 2. Abdullah, S., Burke, E.K., McCollum, B.: An investigation of variable neighbourhood search for university course timetabling. In: The 2nd Multidisciplinary International Conference on Scheduling: Theory and Applications (MISTA), pp. 413 427 (2005) 3. Abdullah, S., Burke, E.K., McCollum, B.: Using a randomised iterative improvement algorithm with composite neighbourhood structures for university course timetabling. In: Metaheuristics: Progress in complex systems optimization (Operations Research / Computer Science Interfaces Series), ch. 8. Springer, Heidelberg (2007a) ISBN:978-0-387-71919-1 4. Abdullah, S., Burke, E.K., McCollum, B.: A hybrid evolutionary approach to the university course timetabling problem. In: IEEE Congres on Evolutionary Computation, pp. 1764 1768 (2007b) ISBN: 1-4244-1340-0 5. Al-Betar, M., Khader, A., Yi Liao, I.: A Harmony Search with Multi-pitch Adjusting Rate for the University Course Timetabling. In: Geem, Z.W. (ed.) Recent Advances in Harmony Search Algorithm. SCI, vol. 270, pp. 147 161. Springer, Heidelberg (2010) 6. Burke, E.K., Meisels, A., Petrovic, S., Qu, R.: A graph-based hyper-heuristic for timetabling problems. European Journal of Operational Research 176, 177 192 (2007) 7. Burke, E., Eckersley, A., McCollum, B., Petrovic, S., Qu, R.: Hybrid variable neighbourhood approaches to university exam timetabling. Technical Report NOTTCS- TR-2006-2, University of Nottingham, School of CSiT (2006) 8. Landa-Silva, D., Obit, J.H.: Great deluge with non-linear decay rate for solving course timetabling problem. In: The fourth International IEEE conference on Intelligent Systems, Varna, Bulgaria (2008) 9. Lewis, R., Paechter, B.: New crossover operators for timetabling with evolutionary algorithms. In: Lotfi (ed.) Proceedings of the 5th International Conference on Recent Advances in Soft Computing, UK, December 16-18, pp. 189 194 (2004) 10. McMullan, P.: An extended implementation of the great deluge algorithm for course timetabling. In: Shi, Y., van Albada, G.D., Dongarra, J., Sloot, P.M.A. (eds.) ICCS 2007, Part I. LNCS, vol. 4487, pp. 538 545. Springer, Heidelberg (2007) 11. Socha, K., Knowles, J., Samples, M.: A max-min ant system for the university course timetabling problem. In: Dorigo, M., Di Caro, G.A., Sampels, M. (eds.) ANTS 2002. LNCS, vol. 2463, pp. 1 13. Springer, Heidelberg (2002) 12. Qu, R., Burke, E.K., McCollum, B., Merlot, L.T.G., Lee, S.Y.: A Survey of Search Methodologies and Automated System Development for Examination Timetabling. Journal of Scheduling 12(1), 55 89 (2009) 13. Thompson, J., Dowsland, K.: A robust simulated annealing based examination timetabling system. Computers & Operations Research 25, 637 648 (1998) 14. Turabieh, H., Abdullah, S., McCollum, B.: Electromagnetism-like Mechanism with Force Decay Rate Great Deluge for the Course Timetabling Problem. In: Wen, P., Li, Y., Polkowski, L., Yao, Y., Tsumoto, S., Wang, G. (eds.) RSKT 2009. LNCS, vol. 5589, pp. 497 504. Springer, Heidelberg (2009)