Development of an Interactive Tool based on Combining Graph Heuristic with Local Search for Examination Timetable Problem

Every university faces a lot of challenges to solve the examination timetabling problem because the problem is NPhard and contains numerous institutional constraints. Although several attempts have been taken to address the issue, there are scarcities of interactive and automated tools in this domain that can schedule exams effectively by considering institutional resources, different constraints, and student enrolment in courses. This paper presents the development of a system as a graphical and interactive tool for examination timetabling problem. To develop the system, combining graph coloring heuristic and local search meta-heuristic algorithms are employed. The graph heuristic ordering is incorporated for constructing initial solution(s), whereas the local search meta-heuristic algorithms are used to produce quality exam timetables. Different constraints and objective functions from ITC2007 exam competition rules are adopted, as it is a complex real word exam timetabling problem. Finally, the system is tested on the ITC2007 exam benchmark dataset, and test results are presented. The main aspect of the system is to deliver an easy-to-handle tool that can generate quality timetables based on institutional demands and smoothly manage several key components. These components are collecting data associated with the enrolment of students in exams, defining hard and soft constraints, and allocating times and resources. Overall, this software can be used as a commercial scheduler in order to provide institutions with automated, accurate, and quick exam timetable. Keywords—Examination timetable; graph heuristic; local search meta-heuristic; ITC2007 exam dataset; interactive tool; NPhard problem


I. INTRODUCTION
Solving the examination timetable of an academic institution induces lots of complicacies due to the intractable nature of the problem. That is, managing different constraints and producing a quality exam timetable, which meets the demand of the institution, often computationally expensive and laborious task. The procedure is so complicated that human schedulers also struggle to produce even a simple feasible solution. Some viable approaches are operations research (OR) and artificial intelligence (AI) techniques that handle the problem often by mathematical programming as well as different heuristics, meta-heuristic, and hyper-heuristic algorithms [1]. Some of these procedures are constraint programming [2], integer programming [3], graph heuristics [4], great deluge algorithm [5], hill-climbing [6], tabu search [7], simulated annealing [8], genetic algorithm [9], particle swarm optimization [10], artificial bee colony algorithm [11] and memetic algorithm [12].
It is frequently observed that academic institutions rely on traditional manual approaches, which take considerable time on managing the vast amount of student registration data, conflicting exams, as well as the violation of constraints for producing a feasible timetable. Although numerous approaches have been proposed in the literature for creating quality timetables, the work on interactive software for timetabling problems is limited. In the examination timetabling survey, Qu et al. [13] emphasize reducing the gap between research and practice and highlight the importance of automatic interactive examination timetable tools for reducing the significant workload of timetabling staff. There are some software solutions proposed for university timetabling problems so that the user can easily interact with the timetable generations. Piechowiak and Kolski [14] developed interactive tools for supporting University of Valenciennes and Hainaut-cambresis (UVHC) university timetabling. The aim was to develop an open, generic tool that employs distributed architecture for cooperative scheduling and supports users to monitor modeling of time, resource, university activities, and constraints for producing a quick feasible solution. Thomas et al. [15] proposed a visual interface tool that aids users to quickly find a bottleneck situation and guide the scheduling system towards a feasible solution. Ayob et al. [16] proposed an intelligent examination timetabling software. The aim was to develop an intelligent commercial scheduler that can replace human decision-makers as well as produce high-quality solutions for University Kebangsaan Malaysia (UKM) examination timetabling problem. Chunbao and Nu [17] developed an efficient exam scheduling system (IIEESS v1.0) that avoids the traditional direct-clash-checking approach and schedules a large number of exam papers within a few minutes. Another recent software solution is solving the University of Toulouse examination timetabling problem using integer linear programming [18]. The authors claimed that the tool can produce quality solutions automatically and give some flexibility to choose input data and constraints.
Although the above tools are viable in producing quality exam timetabling, most of them emphasize solely on automation rather than interaction with users. Besides, interactive tools for generating student conflicts performed by open registration, simultaneous execution of different optimization processes, and handling more complex real-world problems like ITC2007 exam dataset are some issues that have been less highlighted. This paper has proposed an interactive tool for addressing the examination timetabling issue for universities. The system initially produces conflicting exams automatically from course enrollment data. Then it facilitates in managing various hard and soft constraints and allocating times and resources. Based on that configuration, the initial solution module, which uses a saturation degree graph heuristic (SD), produces a feasible solution. Users can monitor the solution quality with different configurations and even further improve the solution vector with employing an improvement module. This module contains three local search algorithms: Great Deluge Algorithm (GDA), Simulated Annealing (SA), and Late Acceptance Hill Climbing (LAHC). A user can select different algorithms, tune parameters, and inspect the progression of the solution. In addition, another facility is the execution of concurrent run with selected local search algorithms. The improvement phase finally produces a solution vector along with a quality metric within specific stopping criteria. The proposed system has been tested successfully using ITC2007 exam benchmark dataset, which covers the majority of the hard and soft constraints of many real exam timetables. The goal in this paper is to provide an effective interactive examination timetable software such that it can generate computationally inexpensive quality timetable solutions and reduce both context-dependencies and involvement of human expertise as much as possible.
The rest of this paper is organized as follows: Section II describes the examination timetabling problem formulation. Section III highlights the algorithms employed for building the system. The proposed system architecture and software component for addressing examination timetabling problems have been presented in Section IV. Section V presents simulation results and discussion. Finally, some conclusions are drawn in Section VI.

II. PROBLEM DESCRIPTION AND FORMULATIONS
An examination timetabling is a scheduling problem where a set of examinations is allocated into a limited number of time slots and rooms subject to a set of constraints. Generally, two different types of constraints encompassing hard constraints, and soft constraints must be addressed. Satisfying all hard constraints leads to a feasible solution, whereas the minimization of soft constants results in a quality solution. Frequently these soft constraints are associated with objective functions. All hard and soft constraints vary from one institution to another based on institutional requirements and resources.
Examination timetable problems can be categorized as capacitated and un-capacitated problems. In an un-capacitated branch, room capacity is not considered. In a capacitated variant, however, room capacity is considered as a hard constraint. For instance, Toronto dataset is a un-capacitated problem, whereas the Second International Timetabling Competition (ITC2007) exam dataset is a capacitated problem [13].
In this section, ITC2007 exam dataset is described here because it is the most recent real-world examination timetabling problem, which has lots of hard and soft constraints. Besides, the proposed system has been developed with ITC2007 exam timetabling problem in mind. ITC2007 exam dataset consists of eight problem instances. The comprehensive characteristics such as number of students, number of exams, number of slots, number of rooms, period hard constraints, room hard constraints, and conflict density are presented in Table I. All hard and soft constraints involved with the examination timetabling problem reported in ITC2007 exam dataset are given below:

Hard Constraints
• H1. Any student cannot sit more than one exam at the same time.
• H2. The exam capacity should not exceed room capacity.
• H3. The exam length should not violate the period length.
• H4. Three ordering of exams must be respected.
-Precedences: exam i will be scheduled before exam j.
-Exclusions: exam i and exam j must not be scheduled at the same period.
-Coincidences: exam i and exam j must be scheduled at the same period.
• H5. Room exclusiveness must be maintained. For example, an exam i must take place only in room number 206.

Soft Constraints
• S1. Two exams in a row(C 2R s ): Avoid the number of occasions where a student sits consecutive exams on the same day.
• S2. Two exams in a day (C 2D s ): Avoid the number of occasions where a student sits two exams in a day. Note that when exams are one after another, this is counted as Two Exams in a Row for avoiding duplication.
• S3. Spreading of exams ( C P S s ): Exams should be spread as evenly as possible over time periods. • S6. Room penalty:(C R ) Avoid the number of occasions where certain rooms with an associated penalty are used for scheduling.
• S7. Period penalty (C P ): Avoid the number of occasions where certain periods with an associated penalty are used for scheduling.
The objective function is formularized as in Eq. 1. It attempts to minimize the violation of soft constraints (penalty) as much as possible for producing good quality solutions without violating the hard constraints.
In this equation, W (with different subscriptions) stands for the related weight for each of the soft constraints, and S indicates a set of students. Table II shows weights of ITC2007 exam dataset. Note that associated weights are not included in C P and C R in the equation as these associated weights are already added in the definition. Explaining all constraints, instances, mathematical models of the ITC2007 exam tracks are so wordy that details explanation will be found in [19] and the website at http://www.cs.qub.ac.uk/itc2007.

A. Graph Heuristics
A simple Examination timetabling can be represented as a graph coloring problem. It is an undirected graph comprising a set of n vertices and a set of edges E, with vertices indicating exams while exams with common students indicate an edge. For example, If Exam 1 and Exam 2 have a common student, there will be an edge E. There are a predefined limited number of colors that signify time slots. The exams have to be assigned into time slots (i.e., coloring the graph) in such a way that no exams with a common student have the same timeslots (i.e., color). Graph heuristics are based on ordering strategies where examination with most difficulty is chosen for scheduling first so that finally, a feasible solution can be obtained. Various graph heuristic techniques measure examination difficulty. These are the largest degree (LD), largest weighted degree (LWD), Largest enrolment degree (LE), and saturation degree (SD) [20], [21]. The heuristics are described as follows: • Largest degree (LD): This technique orders the exams based on the largest number of conflicting examinations.
• Largest weighted degree (LWD): This heuristic is similar to the largest degree except the exams are ordered based on the number of students in conflict.
• Largest enrolment (LE): The exams are ordered based on the number of registered students in the exams.
• Saturation degree (SD): The exams are ordered based on the number of remaining timeslots available; exams with the least number of available timeslots in the timetable are given priority to be scheduled first. SD is a dynamic heuristic where the ordering of exams is updated as the exams being scheduled.

B. Local Search Approaches
Graph heuristics can generate an initial solution that is not optimum enough to consider a quality timetable. Hence local search meta-heuristics are frequently used to reduce the soft constraint violations as much as possible to get a quality solution from the initial solution. In this paper, three meta-heuristics are presented as they have been used for the proposed systems.
1) Late acceptance hill-climbing: Burke and Bykov [22] proposed late acceptance hill-climbing(LAHC) for escaping local optima produced by a greedy hill-climbing approach. In greedy hill-climbing, the candidate solution is compared with the immediate current one, but LAHC uses a delay comparison mechanism where the candidate solution is compared with the solution of several iterations earlier. The algorithm starts with an initial feasible solution, and a new candidate solution is checked for acceptance in each iteration. A list of a specific length is used for memorizing the previous values of the current cost function used for acceptance criteria. Each time the candidate solution is compared with the last value of the list, and if better, it is accepted. When the acceptance procedure activates, the new cost is added at the beginning of the list, and the last element is deleted. The procedure is performed base on v = ImodL formula, where L is the length of the frame, I is the i th iteration, and v is the position.
2) Simulated annealing: Simulated annealing (SA) is a local search meta-heuristic technique based on a physical annealing process that probabilistically accepts some worst solutions to escape from the local optimum [23]. SA starts with a randomly generated initial solution, and in each iteration, it tries to improve the solution quality. If the neighboring solution is better than or equal to the current solution, it is replaced with the current one. Otherwise, acceptance of neighboring solution is decided on a probability function is a neighboring solution, f (s) is the current solution, and T is a parameter known as temperature. Initially, the algorithm starts with a high T and periodically decreases the value using a cooling schedule until the temperature is zero or any terminal condition.
3) Great deluge algorithm: Great deluge (GDA) algorithm was proposed by Dueck [24]. The inspiration of this algorithm originated from the behavior in which a hill climber seeks a higher place to avoid the rising water level during the deluge. Like SA, this algorithm devises a mechanism to avoid local optima by accepting the worst solutions. SA uses a probabilistic function for accepting the worst solutions, whereas GDA uses a more deterministic approach for that purpose. It is also found that GDA depends less on parameter tuning compared to SA. The only parameter in the GDA algorithm is the decay rate, which is used for controlling the boundary or acceptance level. In the minimization problem, the initial boundary level (water level) usually starts with an initial solution. During the search, a new candidate solution is accepted if it is better than or equal to the current solution. However, the solution worse than the current one will be accepted if the quality of the candidate solution is less than or equal to a predefined boundary level B. The boundary level then is lowered by subtracting a parameter called decay rate (∆B). This parameter is vital because the speed of the search depends on the decay rate.

A. Planning Module
Planning module deals with all the input data required for generating the solution. Here following steps are performed.

1) Constraints manager:
Constraints manager handles all the hard and soft constraints associated with exam timetabling. Constraints can be modified according to user choice. Besides, another important function handled by this module is to compute the penalty cost of an exam solution. Here the objective function is employed for generating the penalty value of a given solution. This objective function can be predefined or it might be varied from one problem to another.
2) Exam conflict matrix: After all the necessary data are loaded into the system and constraints are defined, analysis of exam confliction is performed using a data structure named conflict matrix. The examination conflict matrix is a square matrix of dimension equal to the examination number. Each entry of the matrix indicates the number of students conflicting between the two examinations. Entry value of zero indicates no conflict between two exams, whereas a positive number means the existence of at least one conflict. This matrix facilitates managing different hard and soft constraints associated with timetabling and tracking the number of student enrolments in any pair of examinations.

B. Scheduling Module
This module is the central part of the overall system, aiming to generate a complete exam timetabling. Previous module passes necessary inputs so that scheduling module can produce appropriate exam timetabling based on user requirements. The scheduling of exams involves two steps. The first step is an initial feasible solution generation using an SD graph heuristic algorithm. In the second step, the quality of the solution is improved using local search algorithms. These include LAHC, SA, and GDA algorithms. Although not guaranteeing optimal solutions, they usually able to produce near-optimal solutions. Users can choose either of the steps for generating timetables and select desire algorithms with the appropriate parameters before execution. Note that improvement step does not execute independently, and it requires the solution vector of the first step. For example, improvement with the GDA algorithm phase is activated to produce a timetable when parameters such as decay rate and the number of iterations are properly defined, and initial feasible solutions produced by the graph heuristic algorithm are provided.

C. Reporting Module
Reporting module determines whether scheduling module is successfully generating the timetable or not according to the configuration assigned by users. Users can monitor the progress of the scheduling process, current penalty cost, execution time, and warning messages (if any) when scheduling module starts executing a timetable procedure. Once scheduling module produces a timetable, reporting module represents the final solution in a tabular form for the comprehension of everyone. Besides, subsidiary information such as total penalty costs (i.e., solution quality), execution times are also presented. At the end of the scheduling process, the document generator can be evoked to store final exam solutions (as an excel spreadsheet or pdf file format) in a disk for further uses.

D. User Interface
There is a graphical user interface that works at the top level. Users (e.g., students, teachers, human scheduler) can www.ijacsa.thesai.org interact with all the modules using this interface. For example, visualizing the data, controlling the settings, and flow of the process can be done efficiently using this interface. Note that the whole system is developed using Java SE 1.7, and its swing library is deployed for GUI implementation.

1) Description of the system interface:
The interface is designed in a straightforward way so that a user can operate the system with minimal effort and get better user experience. In addition to the graphical user interface, a command-line interface is provided for advanced users. As it is hard to illustrate all the options of the user interface, some selected screenshot of the GUI of automated exam timetabling is presented in Fig. 2, Fig. 3, and Fig. 4. The system window contains different key components, including a menu bar, toolbar, and tab panels. The menu bar at the top is used to load the dataset. Below the menu bar is a toolbar which provides important options such as construction and improvement phase of timetable. Different tab panels are associated with each tool, with each tab being used for performing different actions. For instance, the Data file tab of the construction tool contains data sets used for scheduling. Here users can customize a dataset, impose different constraints by six command buttons, and update other relevant information (see Fig. 2). A sample execution of an exam timetable process is shown in Fig. 3. There are two different types of components on the GUI that are used to monitor the status of the execution process. The text area shows the successful allocation of exams into the time slot and rooms (quality of the solution), and the progress bar indicates the percentage of progression of an exam timetable. The left side of the window contains some input fields (drop-down combo boxes, text boxes, etc.), which are used to select a search algorithm, tune parameters, and set stopping criterion. For example, for a sample execution with a GDA algorithm, users have to set the decay rate and the number of iterations. One may change the configuration and even run multiple executions simultaneously, as every execution of the scheduling process is an independent thread. Fig. 4 shows the presentation of the final examination timetable results in the data grid. Some performance measures, such as penalty cost (i.e., quality of timetabling) and the execution time are also displayed on the left side of data grid, and users can save and retrieve exam schedules for further uses.

V. RESULTS AND DISCUSSION
Whether the timetabling system is viable in solving examination timetabling correctly, it has been tested with eight instances of ITC2007 exam dataset. In the experiment, graph heuristic SD is used for producing the initial solution, and three local search meta-heuristics are used individually for optimizing the initial solutions in the improvement phase. Three variations of the neighbourhood structures have been employed within an improvement algorithm. Their explanation is outlined as follows: • N 1: An examination is selected randomly and moves it to a random time slot.
• N 2: Two examinations are selected randomly and swapping is occurred between their time slots. The termination criteria for the improvement phase are fixed at 10000 iterations. Besides, 30 individual run is also performed for each instance. The following parameters are set for the local searches that are shown in Table III. Note that other setting of parameters could have been selected, but these parameter values have been selected according to the values used in the scientific literature. From the experimental results in Table IV, it can be deduced that the proposed system can solve the ITC2007 exam benchmark dataset effectively. For all of the instances of the dataset, the best and the average values are highlighted after 30 individual runs. Graph heuristic SD produces feasible solutions for all of the instances, and local search approaches further improve the quality of the solutions. Among these three local search algorithms, 5 out of 8 cases (e.g., Exam 1, Exam 3, Exam 5, Exam 6, and Exam 7) LAHC performed the best results followed by GDA with instances Exam 2 and Exam 8, and SA with Exam 4. It is apparent that graph heuristic does not produce quality results because it considers only hard constraints. On the other hand, local search optimization algorithms produce better results compared to graph heuristics because the local search can improve the solution by reducing the soft constraint violations. Note that this paper does not aim to find the performance of the algorithms that suite the best. Instead, it shows the capabilities of graph heuristic and some local search algorithms for solving the exam timetable interactively. It is up to users to decide what will be the most useful algorithm in their particular circumstances. The advantages of the proposed interactive system are highlighted below: • As the system has been developed using Java, it can run on a computer running both Windows and Linux (i.e., platform independence). Moreover, the incorporation of multi-thread assists the user to execute and analyze more than one exam instance simultaneously.
• This interactive tool is able to construct a complete timetable within a short time compared to the human scheduler, which usually takes long preparation in advance. It is also notable that maintaining hard constraints strictly and minimization of soft constraint violations for a large number of exams are challenging for the human scheduler. In contrast, an automated scheduler can perform the tasks firmly and effectively.
• This tool is useful as it can efficiently utilize institutional resources (i.e., room and timeslot utilization) as well as fulfill the major requirements requested by the • Flexibility in changing of input settings (e.g., constraints, exams, resources), support of interactive parameters tuning, and selection of different execution methods (either initial feasible solution with graph heuristic or initial solution followed by a nearoptimum solution using local searches) are some salient features of the system, which makes it a robust interactive tool. Users can observe the effects of the different configurations on the output quality of the timetable.
• Although the system includes predefined eight instances of ITC2007 dataset, a provision has been kept for the users to modify or add new user-defined exam instances.

VI. CONCLUSIONS
This paper aims to generate an easy to use interactive examination timetabling software whereby graph heuristics and different local search algorithms are employed as solution methods. SD graph heuristic generates an initial feasible solution, whereas local search algorithms such as SA, GDA, and LAHC work as an optimizer for producing near-optimum solutions for the exam dataset. This proposed system is developed using Java and tested successfully on real-world dataset named ITC2007 exam dataset. The software is flexible and robust that outweighs the manual approaches. Users can automatically produce dataset from student registrations, select preferred hard and soft constraints, employ different improvement algorithms with desirable parameters and eventually produce a quality timetable within a reasonable time frame. The system could be scaled up by including different population-based search algorithms, which could provide more efficiency in the improvement phase. The usability of the software can also be enhanced to attain a satisfactory user experience.