Skip to content

Add timetable optimisation feature #4026

@thejus03

Description

@thejus03

TimetableAI

TimetableAI allows users to automatically generate optimised timetables based on their module selection, preferred semester, and free-day preferences.

Key Features

  • Maximising Free Days: The algorithm prioritises creating schedules that align with users' preferences for free days
  • Minimising Travel Time: It considers the physical distances between classrooms to reduce travel time between classes
  • Lunch Time: Prioritises to give at least 1 hour for lunch between 12-2pm
  • Clash-Free scheduling: Ensures all classes are conflict-free.

High level integration

  • We use the NUSMods API to preprocess venues data to clump different rooms in the same building together to get the average x and y coordinate of the building.
  • From the user-selected modules, we use the NUSMods API to get all the slots for each module the user selected. We then remove all non-lecture slots that are on the free days the user selected. Then merge slots between the same modules based on those that are at the same timing, day and building location.
  • Now that we have all the slots, we construct a graph where we make edges between slots that clash.
  • Then we use backtracking to create all possible timetables that do not clash, using the graph to prune immediately when there is a clash.
  • Now that we have all the possible timetables, we score the timetables based on a scoring system that we elaborate on below. The top 5 ranking timetables are returned to the frontend.

Scoring system

This system is an award-punish scoring system:

  • Awards for having at least an hour of time for lunch
  • Punish timetables with lessons outside of the user-selected favourable timings
  • Punish long distances travelled between lesson locations.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions