Automatic Timetable Generation Using Genetic Algorithm

: The generation of timetables has always been so tedious right from time and apart from being tedious, the timetable created has always been filled with series of errors and mistakes. So many techniques have been put forward to solving this problem. In this paper, genetic Algorithm was used in other to find a solution to the timetable problem. The system administrator logs into the system and then the administrator input the courses with their codes and the unit. At that point, the admin will keep adding until the number of courses needed has been inputted. The admin can remove a course that has been inputted in the case of error. After inputting the courses, it moves to the next page where all the lecture halls or rooms that will be used will be inputted. After inputting these, the system then generates the timetable system. This technique (genetic algorithm) used helps in reducing to minimum errors and mistakes in encountered in developing an automatic timetable.


Introduction
The class timetabling problem is a scheduling algorithm with great interest and implications in the fields of operational research and artificial intelligence. The problem was first studied by Gotlieb, who formulated a classteacher timetabling problem by considering that each lecture contained one group of students and one teacher, such that the combination of teacher and students can be chosen freely. The class timetabling problem is a typical scheduling problem that appears to be a tedious job in every academic institute once or twice a year (Datta et al., 2005).
Timetabling is known to be a non-polynomial complete problem i.e. there is no known efficient way to locate a solution. Also, the most striking characteristic of NP-complete problems is that, no best solution to them is known. Hence in order to find the solution to a timetabling problem, a heuristic approach is chosen. This heuristic approach, therein, leads to a set of good solutions.
In a general educational timetabling problem, a set of events (such as courses and exams) are assigned into a certain number of timeslots (time periods) subject to a set of constraint, which often makes the problem very difficult to solve in real-world circumstances (Burke et al., 2007 pg 177-192). Timetabling is the task of creating a timetable while satisfying some constraint.
The aim of this paper is to present the generation of course schedules while demonstrating the possibility of building schedules automatically through the use of computers in such a way that there are optimal and complete with little or no redundancy through the development of a viable lecture timetabling software. The main objective is to be able to optimize the algorithm used in recent timetabling systems in order to generate the best timetables with fewer or no clashes. The second objective is to expand the scope of timetable automation systems by making it generic thereby bringing about uniformity in the creation of timetable as it applies to different universities or educational institutions. The software possess an attractive graphical interface which will help interaction between the user and the computer and also improve productivity.

RELATED WORKS
Srinivasan, Tian and Jian (2002) worked on an automated time table generation using multiple context reasoning for university modules. The paper presented an evolutionary algorithm (EA) based approach to solving a heavily constrained university timetabling problem. The approach uses a problem-specific chromosome representation. Heuristics and context-based reasoning were also used for obtaining feasible timetables in a reasonable computing time. An intelligent adaptive mutation scheme was employed for speeding up the convergence. The comprehensive course timetabling system presented in the paper was been validated, tested and also discussed using real world data from a large university.
Tahir et al (2004) worked on dynamic Timetable Generation Conforming Constraints. In the paper, the authors proposed an approach that solves the timetabling problem. The approach takes into account many constraints including allocation of room, teacher, course, time slot etc. the algorithm builds the timetable in an incremental manner, dynamically adjusting resources in order of complexity. The algorithm proposed is dynamic in nature. It deals with managing certain constraints as input, then using heuristic approach to scanning all the constraints on priority basis. The sequence of checking of constraints is also dynamic in nature. Though this sequence of constraints can also be altered manually. The proposed algorithm is based on heuristic algorithm. The algorithm takes values as input and manages the constraints and resource scheduling one by one. Barkha Narang, Ambika Gupta and Rashmi Bansal (2012) worked on use of active rules and genetic algorithm to genetic automatic timetable. In this paper, the authors proposed an optimized technique to automate timetabling generation system. The proposed technique filters out the best of active rules and uses Genetic algorithm to generate an optimized solution that accommodates various complex constraints such as that for faculties, classrooms, labs etc. The proposed paper takes four parameters as input: person -name of lecturers, subjects -name of courses in the class, room -name of classes and capacity of each and time interval -starting time and the duration.
The genetic algorithm selects the action to be executed. When an event occurs, the system has several actions that it can choose to perform. For each possible event, there is another ordered set of possible actions that can be performed when that event occurs that needs to be maintained. The genetic algorithm always selects the first action initially, but a genetic algorithm running in parallel may dynamically change the order of the actions. The paper explained how the authors have used a set of active rules to express the knowledge of intelligence and how a genetic algorithm can be used to dynamically prioritize rules. The advantages of this approach are: distributed solution, load balancing, and fault situations. They help in optimizing the timetable generation solution.

METHODOLOGY
The tools used for the design and methodology include Algorithm and Flow chart. From the flow chart below, the steps carried out by the system administrator are as follow: The system administrator logs into the system. The administrator then input the courses with their codes and the unit. At this point, the admin will keep adding until the number of courses needed has been inputted. The admin can remove a course that has been inputted in the case of error. After inputting the courses, it moves to the next page where all the lecture halls or rooms that will be used will be inputted. After inputting these, the system then generates the timetable system.

Constraints used in generating the genetic algorithm
 Only one lecture is attached to one lecture room.  Every class must be scheduled exactly once.  Classes of students must not have two bookings simultaneously.  A space should be left after the first three periods for break or recess.

Implementation of design
The following are the hardware requirement of the system that the design can be implemented upon.
 Hard disk space of not less than 500 megabyte  Pentium II intel processor.  RAM of not less than 125 megabyte The design can be implemented on any operating system starting from windows vista. XAMPP server should be installed. Internet browser such as Google Chrome, Internet Explorer, Microsoft Edge, Opera Mini, UC Browser and so on. The following tools were used in the course of developing the system.

Program modules and interfaces
 Login section: This is the section whereby the administrator logs in in other to be able to have access to inputting the details needed for the timetable generation. This details include the course title, course code, course unit, lecture hall and so on. Fig 1: the login interface of the system  Course Input Section: This is the point where the administrator inputs the courses to be generated in the timetable. In this section, the course title is being typed, then the course code and the unit. After inputting all of these, the add button is being clicked. The add button helps to accumulate all the courses to be inputted. Genetic Algorithm is one of the most effective ways of generating timetables although it does not give a 100% optimal timetable. Its degree of optimality depends on the constraints used and also the fitness function of the parameters. Using Genetic Algorithm is a little slower due to the steps it has to undergo. Generating random numbers, mutating and crossing over parameters before the final result is gotten. Notwithstanding, it still remains the best way to solve timetable issues.

RECOMMENDATION
I recommend that in order for Genetic Algorithm to be implemented, the constraints to be used should be chosen carefully in order to get an optimal solution. Although there are research publications concerning genetic algorithm on the internet, the implementation is difficult. Due to its complexity, Genetic Algorithm should be taught as a course for Computer Science students. This will enable students have better understanding of Genetic Algorithm.