Genetic Algorithm-Based University Course Timetabling: A Practical Optimization Framework with Graphical Interface
Abstract
This article investigates the university course timetabling problem, a challenging combinatorial optimization problem encountered by educational institutions when allocating courses to available time slots and classrooms while satisfying numerous institutional requirements. A mathematical formulation is proposed distinguishing between hard constraints (strictly enforced) and soft constraints (penalised to improve timetable quality). Owing to the NP-hard nature of the problem, exact optimization techniques become computationally prohibitive for large-scale instances. Consequently, a genetic algorithm is developed with constraint-aware operators and a repair mechanism to efficiently explore the search space and generate high-quality feasible timetables. The proposed approach is evaluated on two realistic datasets involving 15 and 69 courses, using 10 independent runs to ensure statistical robustness. Results show that the algorithm achieves (100%) hard constraint satisfaction, an average room occupancy of (78%), with only minimal soft constraint violations (1 capacity overbooking and 2 room-type mismatches out of 15 courses), and generates feasible timetables in 45 seconds—compared to 4 hours of manual effort. A graphical user interface equipped with performance indicators is introduced to facilitate result interpretation and support administrative decision-making. These findings demonstrate that genetic algorithms provide an effective practical solution for university timetabling, with potential for deployment in medium-sized institutions.
