Back to all projects
Utility Tool

Timetable Generator

An automated timetable generator that produces conflict-free schedules given faculty, room, and course constraints using constraint-satisfaction techniques.

Role Developer
Domain Scheduling / CSP
Status Open Source

Overview

An automated timetable generator that takes a description of faculty availability, rooms, courses, and class sizes and produces a full conflict-free schedule. Instead of the manual spreadsheet shuffle, the tool formulates the problem as a constraint-satisfaction problem and lets a solver find a valid assignment — or tell you cleanly when no assignment exists.

The Problem

Academic timetabling is painful: a single faculty clash invalidates the whole grid, and what looks like a small change (swap a room, add a course) cascades into hours of manual re-work. Humans also tend to produce locally-valid timetables that violate soft preferences — nobody wants their first class at 8 a.m. five days a week. A solver-based approach handles hard constraints by construction and can optimize soft preferences on top.

My Role & Contribution

  • Modeled the timetable as a CSP — variables, domains, and constraints
  • Implemented the solver integration and the input/output pipeline
  • Built the validation layer that catches malformed inputs and explains infeasibility

Approach

  • Variables represent (course, section) tuples; domains are (day, time-slot, room) triples
  • Hard constraints — no faculty clash, no room clash, no section clash, room capacity, faculty availability
  • Soft constraints — preferred time windows, spread across the week, minimizing idle gaps
  • python-constraint solver for the CSP core, with custom propagators for the heavier constraints
  • Pandas for ingesting input spreadsheets and emitting the final schedule as a grid

Tech Stack

Python Constraint Programming python-constraint Pandas

Results & Impact

  • Reduces schedule generation from hours of manual work to a single solver run
  • Produces a clear infeasibility explanation when constraints are over-tight, rather than failing silently
// TODO: add diagrams / screenshots
← Previous Amantranaa Caterers