Heuristic Algorithm for Multi-Location Lecture Timetabling

This paper studies a real faculty timetabling problem with multi-location consideration. Faculty of Cognitive Sciences and Human Development, UNIMAS offers a master's program by coursework to postgraduate students. The construction of timetables for all the courses offered is a tedious process due to constraints such as team-teaching allocation, unavailability dates of lecturers, and multi-location considerations. Therefore, a manually designed timetable is not as practical as it is time consuming when operational constraints must be fulfilled. In this paper, a two-stage heuristic algorithm is proposed to solve this postgraduate coursework timetable problem. This is because the heuristic algorithm is easy to apply and able to generate a feasible solution in a short time. The proposed two-stage heuristic algorithm consists of Lecturer Grouping Stage and Group Allocation Stage. In Stage I, the lecturers are assigned into four lecturer groups with the condition of no identical lecturers in each of the groups. Then, in Stage II, these groups are allocated into a set of academic weeks throughout the semester. The timeslot for each course can be allocated, and the team-teaching slot for the lecturers can be assigned in this stage. The result from the two-stage heuristic algorithm shows remarkable improvement over the real timetables solution by analyzing the distribution of lecture sessions of the courses. Keywords— university timetabling problem; heuristic algorithm; multi-location; team teaching; coursework timetabling.


I. INTRODUCTION
Timetable scheduling is a vital planning task for both lecturers and students as a well-designed timetable can maximize resource utilization. Although a manually designed timetable may still achieve results using a trial and error method, the feasibility and computational speed are impractical when more considerable operational constraints are introduced to this problem. Hence, creating a timetable is a tedious and time-consuming process [1]. Besides, this problem is NP-hard, imposing an excellent challenge for the manual timetable in getting a feasible solution as well as satisfying all operational constraints [2]- [4].
The timetabling in school or university area are different due to data requirements and the type of constraints [5]. It can be categorized into school timetabling, university course timetabling, and examination timetabling [6]. The university course timetable deals with making a schedule of a lecturers' set for different cohorts of students. This paper studies a university course timetabling where the lecturers are assigned to multi-location.
Consequently, it is essential to have a heuristic algorithm to solve the timetable scheduling problem. The heuristic algorithm is used because of its simplicity and fast response in getting a feasible solution. The literature review shows that various heuristic algorithms have been proposed to solve the timetabling problem in real life such as the Timetabling Heuristic Approach (THA) in Tunisian University [2], Linear Solution in Islamic Azad University [15], Modified Hybrid Particle Swarm Optimization (MHPSO) in Khulna University [16], and Genetic Algorithm in Jakarta University and a Brazilian university [4], [17].
The central aspect of the heuristic is easy to apply in the university timetabling problem to generate a feasible solution quickly by fulfilling the operational constraints in the problem [18]. The heuristic algorithm can generate a feasible solution in a short computational time [19]. A

Kuala Lumpur
Sibu heuristic approach is used on the specific problem, which does not guarantee an optimal solution but usually makes a better timetable for practical use [20]. Therefore, it can be observed that the heuristic algorithm approach is widely applied in the real-life university timetabling problem.

II. MATERIALS AND METHOD
Faculty of Cognitive Sciences and Human Development (FCSHD) offers a Master of Science in Human Resource Development (MSc HRD) program by coursework to cater to the need of working adults to upgrade themselves. This master program is conducted at multi-location, other than UNIMAS main campus. The program takes a total of two years or four semesters of study on the coursework program plan. Currently, the timetable is planned manually before the start of the new semester. The timetable goes through multiple revisions and adjustments to satisfy all the operational constraints and avoids the timetable clash. All lectures are conducted during the weekend, namely Saturday and Sunday. Each day will have two teaching slots: morning session, which is from 9.00 a.m. to 12.00 p.m. and afternoon session, which is from 2.00 p.m. to 5.00 p.m. as illustrated in Table 1. The exam week will be allocated in week 15. Besides that, no classes are allowed during the public holiday too.
The same group of manpower conducts all of the courses of MSc HRD in this multi-location. Limited manpower resources and more courses to conduct in multi-location cause difficulty in generating a feasible timetable solution. The current timetabling practice allows an individual or team to teach when conducting a course. This is because the lecturers may conduct the lecture sessions in other locations, and a secondary lecturer is needed to assist the principal lecturer in continuing that lecture session. Besides, a secondary lecturer can help in conducting the lecture sessions when the main lecturer is not available in some weeks.
Besides that, lecturers might not be available for some dates due to official duty or personal reasons. Hence, the current timetabling practices require a longer time and more effort to generate a feasible timetable, and at the same time, avoid the unavailability dates of lecturers. From the case study described above, the operational constraints can be categorized into a set of hard constraints (HC) and soft constraints (SC), which are listed as follows: HC 1 A lecturer can only conduct a course at one time. HC 2 A lecturer can only conduct in a location at one time. HC 3 A student can only attend one course at one time. HC 4 A student can only be involved in one cohort at one time. HC 5 Total teaching hours for a course must be fulfilled, i.e., 42 hours. HC 6 Fulfil the unavailability dates of lecturers. HC 7 Fulfil the teaching slot type based on the location, i.e., one course per week (off-UNIMAS campus) or two courses per week (UNIMAS campus). SC 1 Even distribution of timetable. SC2 Even distribution of lecture duty.
In this multi-location timetabling problem, the following notation and parameters are used in mathematical modeling. For the UNIMAS campus, a lecturer is required to conduct only a one-day class (two lecture sessions or six hours of lectures) for a course on either Saturday or Sunday. For off-UNIMAS campuses, a lecturer is required to conduct twoday classes on both Saturday and Sunday. The main reason for the two consecutive day classes is due to the traveling budget for off-campus lectures. Consequently, a lecturer can only teach one course at one time, and one location at a time. Table 1 shows the teaching slot type and lecture session based on multi-location for the coursework program plan. The current coursework plan for multi-location is shown in Figure 1. ‫:ܥ‬ a set of courses = ሼܿ ଵ ǡ ܿ ଶ ǡ ǥ ǡ ܿ ሽ ‫:ܮ‬ a set of lecturers = ሼ݈ ଵ ǡ ݈ ଶ ǡ ǥ ǡ ݈ ሽ ܵ: a set of cohorts of students corresponding to locations = ൛‫ݏ‬ ଵଵ ǡ ‫ݏ‬ ଵଶ ǡ ǥ ǡ ‫ݏ‬ ൟ Unimas ܶ: a set of teaching slot types = ሼ‫ݐ‬ ଵ ǡ ‫ݐ‬ ଶ ǡ ǥ ǡ ‫ݐ‬ ሽ ܸ: a set of locations = ൛‫ݒ‬ ଵ ǡ ‫ݒ‬ ଶ ǡ ǥ ǡ ‫ݒ‬ ൟ ‫ܧ‬ : set of lecturers of courses ܿ ݈ ݈ Set ‫ܥ‬ is a set of courses to be conducted by a set of lecturers ‫ܮ‬ in a set of locations ܸ. Set ܵ is a set of cohorts of students who take a similar curriculum of courses in each area. Each course ܿ ݈ ݈ has a set of individual or teamteaching lecturers to conduct the lecture sessions which is defined as ‫ܧ‬ . There is an assisting lecturer ݈ to team-teach for course ܿ , else ܿ ݈ if no team-teaching for the course.
In this section, a two-stage heuristic algorithm is proposed to generate a feasible timetable in FCSHD. The advantage of a heuristic algorithm is its simplicity to cope with abundant constraints and fast response in getting a feasible solution. This section provides problems solving of the multi-location timetabling problem as described in the case study section, a two-stage heuristic algorithm is proposed. The stages in the heuristic algorithm are listed as follows, and a diagram for the process is illustrated in Figure 2: • Stage I: The lecturer grouping stage clusters all the lecturers into the different groups with a simple rule that each group contains a unique set of teaching lecturers. This is to prevent the timetable from having a conflict during the group allocation stage. • Stage II: The group allocation stage allocates each lecturer group into a set of academic weeks that is generated at a previous step. At this point, each lecturer in a group is determined by their unavailability dates and then assigned to the particular weeks. This stage ensures that all allocated weeks for each group would not have clashing problems when conducting the lecture sessions in multi-location. Before the two-stage heuristic algorithm is applied, the dataset must be pre-processed first to avoid a clash of lecturer resources. A lecturer is only able to conduct a limited number of courses per semester, as shown in Table 2. The pre-processing data stage is used to set a restriction on the data set and later processed by the heuristic algorithm.
In this paper, a cohort is defined as a group of students who share a similar curriculum or courses together. In this case study, the courses are conducted for three semesters for a group of students. Hence, the lecturers will have to conduct the lectures for three different cohorts in three teaching locations. Fourteen academic weeks of a semester are used as a basis to allocate and assign the lecturers to different teaching locations. At the same time, they must fulfill the 42 total teaching hours for a course. For the Saturday and Sunday courses, 12 hours is needed for a lecture. The maximum number of courses that can be conducted in one location is four courses, which is derived from equation (1). Based on equation (2), a course that leads a 12-hour lecture per week needs approximately four weeks to fulfill the total teaching hours. As in our case, the total teaching hours that are required by a course is 42. Hence, a total of four groups is used in this two-stage heuristic algorithm to split the lecturers, where a group will be allocated in any four weeks of a semester to conduct the lectures. In this stage, a set of lecturer groups is defined as ‫ܩ‬ ൌ ൛‫ͳܩ‬ǡ ‫ʹܩ‬ǡ ǥ ‫ܩ‬ ȁீȁ ൟ and ȁ‫ܩ‬ȁ ൌ ݃ represents the number of lecturer groups. Each lecturer, ݈ is then weighted and ranked before clustered into the lecturer groups, ݃ . The lecturer grouping algorithm assigns the higher-ranked lecturer into the lecturer groups. Lecturers are allocated based on their teaching slot types of courses that they are required to conduct throughout the semester.
From equation (1), a total of four groups is used to organize the lecturers, and there should be no identical lecturers in each of the groups. Each group represents the courses to be conducted at multi-location in a week. This result will then be processed by the second stage of the heuristic algorithm. These lecturers are clustered to the same group if the conditions defined in the following are met: • There is no identical lecturer in each group.
• Teaching slot type of the course Besides that, for lecture sessions that are conducted on either Saturday or Sunday, each group is allowed to be assigned two courses for the same cohort but on the condition of no identical lecturer in the same group. Hence, each course that is conducted in one day can be assigned to two of the groups. To illustrate the said situation, Algorithm 1 explains the lecturer's grouping stage in the first stage of the proposed heuristic algorithm. Figure 3 shows the example of group assignment based on the teaching slot type of the courses.

C. Stage II. Group Allocation Stage
The group allocation stage is ready to allocate the group of lecturers into a set of academic weeks throughout the semester. In this stage, the timeslot for each course can be allocated, and the team-teaching slot for the lecturers can be assigned. This stage starts from weighting each of the groups with unavailability dates of the lecturers in a set of academic weeks, respectively. Next, a matching matrix is used to identify the availableness of the groups with ݊ number of academic weeks, ‫݇݁݁ݓ‬ in this group allocation stage. This stage generates a ‫݇݁݁ݓ‬ ൈ ݃ matrix with elements of 0 and 1. Element 0 represents that the group is available and able to conduct a lecture session without conflict of unavailability dates of the lecturers. On the other hand, element 1 represents that the group is unavailable on that particular week and should not be assigned into that week. Figure 4 shows the example of the matrix performed when comparing the unavailability dates of the lecturers with the list of lecturer groups.   Each group is then weighted in a total number of unavailability dates of the lecturers and rearranged in weight size descending order. Within a set of academic weeks throughout the semester, the groups are assigned into the weeks by round-robin order. By this step, the group allocation stage is ready to generate the timeslot allocation with the matrix from the unavailability dates of the lecturers. It starts with the group with the most unavailability dates of the lecturers. Then, the algorithm goes through the roundrobin order with the matrix to allocate the groups.
The criteria to assign the timeslot to a lecturer group are listed as follow: • The group allocation is in a round-robin order.
• The available timeslot can be assigned to anyone of the lecturer groups. • The unavailable timeslot should not be assigned to the lecturer groups, which have unavailability dates on it. • The available timeslot can only be assigned to one of the lecturer groups. • Due to the round-robin order, the lecturer group with less timeslot allocation needs to be considered first before assigning another lecturer group. Algorithm 2 explains the steps in the group allocation stage on a set of academic weeks for a semester. After the group allocation stage, the stage proceeds with team teaching slot assignment process for all the courses and the lecturers. From this process, one day or two consecutive days of lecture sessions are assigned for each course based on their teaching slot types. Hence, a feasible timetable is generated at the end of the two-stage heuristic algorithm.

III. RESULTS AND DISCUSSION
In this section, computational analysis on timetable solutions generated by the simulator is carried out. The analysis includes a comparison between the timetable solutions produced by the two-stage heuristic algorithm and current timetabling practices. The simulator is coded with PHP web-based programming language and MYSQL database. The specification of the computer is a processor with i5-3210m CPU @ 2.50GHz and 6GB RAM in 64-bit Windows 7.
Two real semester datasets were collected from FCSHD for validation. The real timetables compared with the timetable generated by the simulator. The size of the problem for dataset 2017/2018-1 is relatively smaller as compared to others. Starting from 2017/2018-1, the MSc HRD courses are offered to off-UNIMAS campuses such as Kuala Lumpur and Sibu. Therefore, a new cohort would begin their study at these new off-UNIMAS campuses. Hence, the number of courses and lecturers to conduct the lecture sessions are increased in the following semester 2017/2018-2.
Due to the traveling budget consideration, course lectures at off-UNIMAS campuses are conducted for two consecutive days per weekend or continuous 14 hours over a weekend. These datasets have all lecturers that are available throughout the semesters. Table 3 shows the general information of each dataset. All constraints defined in this paper are fulfilled, and no clash solution is generated from the simulator. Table 4 and Table 5 show the comparison of the maximum week break between the real solution and two-stage heuristic for dataset 2017/2018-1 and 2017/2018-2. The ideal maximum week break between lecture sessions in UNIMAS is one to two weeks; meanwhile, in off-UNIMAS campuses, the breaks are three to four weeks. This is to ensure the maximum teaching effectiveness of the courses in all teaching locations.  The two-stage heuristic algorithm allocates a better ratio of ideal distribution on lecture sessions in dataset 2017/2018-1 and dataset 2017/2018-2. By comparing the different percentages in both solutions, it can be observed that the two-stage heuristic algorithm offers a better distribution allocation on lecture sessions. Hence, there is an increment of 28.5% in the dataset 2017/2018-1, as shown in Table 4. Some courses in UNIMAS have three maximum week break is due to the addition of mid-semester week between the lecture sessions.
In Table 5, the comparison between the real solution and two-stage heuristic algorithm shows that the method of distribution is very close to the real solution. However, the solution from the two-stage heuristic algorithm achieves a higher number of courses in smaller "max week" in dataset 2017/2018-2. The timetable solution generated by the simulator shows that the lower the maximum week break, the better the quality of the timetable. From the result for dataset 2017/2018-2, the ideal gap has increased to 9% for on-UNIMAS campus and 44.4% for off-UNIMAS campuses. Figure 5 and Figure 6 show the comparison of the average week break between the real solution and two-stage heuristic for dataset 2017/2018-1 and 2017/2018-2. From the analysis of the average week break, the two-stage heuristic algorithms are subject to distribute the lecture duty for both datasets evenly. From the analysis on the distribution of lecture duty, the courses at UNIMAS campus and off-UNIMAS campuses should have a consistent average week break among each other. In Figure 5, the timetable solution that is generated by two-stage has a higher consistency of 2.33 average week break for the courses at UNIMAS campus than current practices. Meanwhile, the two-stage produces a consistent of the 3.5-week break for all the courses in off-UNIMAS campuses. In Figure 6, a comparison between the real solution and two-stage shows that the average week break is very close to a real solution, which both solutions have a consistent range of average week break between 1 to 1.33. Besides, a constant of a 3-week break for all the courses in off-UNIMAS campuses. It can be observed that the two-stage heuristic algorithm able to offer a better distribution of lecture duty with a consistent average week break for the courses. The current practices may take up to two weeks to produce a quality timetable solution. Meanwhile, the computational time taken by the proposed two-stage heuristic algorithm is less than a minute to generate a timetable solution. Depending on the problem size and the number of unavailability dates of lecturers for the requirement of timeslot allocation, the computational time varies for the timetabling problems from different semesters. Generally, the lecturer grouping stage takes a longer time than the timeslot allocation stage. It is time-consuming when the lecturer grouping stage loops through several possible groups and uses priority rules to allocate the "busy" lecturers in groups first.
IV. CONCLUSION In this paper, a two-stage heuristic algorithm with the lecturer grouping stage and group allocation stage is proposed for multi-location lecture timetabling problems in FCSHD, UNIMAS. This paper concludes that the heuristic algorithm can minimize the clashes of lecturers when conducting the courses at different teaching locations. Besides that, the analyzed results display an even distribution in week break for all the courses, and it is also time-efficient to generate a feasible timetable. Besides, this algorithm can fulfill all operational constraints compared to current practice. This paper has proven that this heuristic algorithm in lecturer timetabling can help, indeed that eliminate tedious processes from current practice and takes a shorter time to generate a feasible and quality timetable solution.