SZABIST · Final Year Project · AI

AI-Powered Timetable Generator

Built at SZABIST as a final-year project, this university timetable app uses a CSP solver to assign courses, faculty, rooms, and time slots while preventing scheduling conflicts. It includes admin and faculty workflows, preference-aware scheduling, and PDF/Excel exports.

RoleTeam Lead, Backend Developer, AI/CSP Developer, and System Architect. I led requirements and system planning, implemented backend and authentication components, designed the CSP scheduling and conflict-detection logic, and integrated timetable generation.
TypeSZABIST · Final Year Project · AI
TechnologiesNext.js, React, Tailwind CSS, Node.js, Express.js, PostgreSQL, Prisma ORM, Constraint Satisfaction Problem (CSP), PDF and Excel export, GitHub, Vercel

Problem

University timetables must coordinate courses, faculty, rooms, student enrollments, and time slots. Manual planning makes it difficult to track all constraints together, increasing the risk of double-booked faculty or rooms, student clashes, unsuitable room capacity, and missed faculty availability.

Objective

Automate university timetable creation, reduce the manual scheduling workload, and produce usable schedules that honor resource limits and prevent faculty, room, and student clashes.

CSP model

Each course is assigned a faculty member, day, time slot, and room. The solver rejects assignments that violate hard rules, then scores complete schedules against faculty preferences and workload goals.

VariablesCourse assignmentsA candidate assignment records the course, faculty, day, time slot, and room.
DomainsEligible faculty, time slots, and roomsRoom options are filtered by course type and enrollment capacity; faculty and time options must be available.
Hard constraintsNo room, faculty, or student overlapsThe solver also enforces faculty unavailability and compatible room type/capacity.
Soft goalsFaculty preferences and balanced workloadThese affect schedule quality scoring and never override hard validity rules.

Timetable generation workflow

  1. 01 · PrepareLoad academic dataCourses, faculty, rooms, slots, and enrollments
  2. 02 · PrioritizeOrder constrained coursesLabs and high-enrollment courses first when enabled
  3. 03 · SearchTry candidate assignmentsBacktracking rejects hard-constraint violations
  4. 04 · ScoreKeep the best scheduleScore complete solutions using soft preferences
  5. 05 · ReturnSave or explain failureReturn a timetable or diagnostics for infeasible inputs

The report documents a backtracking search with bounded attempts, best-solution tracking, and early stopping for a high-scoring complete schedule.

Solution & approach

We modeled scheduling as a CSP. Each course is assigned a feasible faculty, room, day, and time slot. Hard checks reject overlapping room or faculty assignments, student enrollment clashes (including cross-semester overlaps), unavailable faculty times, and unsuitable room or course matches. A backtracking search tries candidate schedules, prioritizes more constrained courses such as labs and high-enrollment courses, and retains the best-scoring complete solution. Faculty preferences and workload considerations contribute to schedule quality as soft constraints. Administrators manage data and generate schedules; administrators and faculty can view and export timetables.

Technology stack

Next.js · React · Tailwind CSS · Node.js · Express.js · PostgreSQL · Prisma ORM · Constraint Satisfaction Problem (CSP) · PDF and Excel export · GitHub · Vercel

Key features

Team contributions

Adnan AliTeam lead; requirements and architecture; backend and authentication; CSP scheduling, conflict detection, and system integration
Waqar AhmedFrontend and UI/UX; dashboard and faculty module; PDF/Excel reports and frontend integration
Ahmed MustafaDatabase design and SQL implementation; testing, quality assurance, and project documentation

Screenshots and demonstration

Project screenshots pendingNo authentic screenshots or demo recording have been supplied. Add verified images in the admin asset library.

Challenges and decisions

The central challenge was satisfying interacting constraints without allowing a locally valid assignment to create a room, faculty, or student clash elsewhere in the schedule. The solver checks conflicts during assignment, including student overlaps across semesters, and treats faculty unavailability as a hard rule. Another challenge was finding good schedules efficiently as course data changes. The implementation orders constrained courses earlier, explores alternative orderings with bounded backtracking attempts, tracks the best complete schedule, and records diagnostics when it cannot find a solution. Faculty preferences are scored as soft goals so they can improve schedule quality without overriding hard validity rules.

Results and limitations

The delivered system combines academic data management, CSP-based timetable generation, role-specific timetable access, and schedule exports. The thesis documents functional test cases for the core workflows; its PDF export test records successful exports for both administrator and faculty views and a clear error when no timetable has been generated. The report does not provide benchmark timings or quantified improvements over manual scheduling, so none are claimed here.

Lessons learned

This project showed me that a useful scheduling solver depends as much on careful constraint modeling and diagnostics as on the search algorithm itself. Hard validity rules need clear checks at assignment time, while preferences work better as scored soft constraints. Prioritizing the most constrained courses and explaining why a schedule could not be completed also makes the generator more practical to operate.

← All projects