What you will build
You will build a REST application that optimizes a school timetable for students and teachers:
Your service will assign Lesson
instances to Timeslot
and Room
instances automatically
by using AI to adhere to hard and soft scheduling constraints, such as the following examples:
-
A room can have at most one lesson at the same time.
-
A teacher can teach at most one lesson at the same time.
-
A student can attend at most one lesson at the same time.
-
A teacher prefers to teach all lessons in the same room.
-
A teacher prefers to teach sequential lessons and dislikes gaps between lessons.
-
A student dislikes sequential lessons on the same subject.
Mathematically speaking, school timetabling is an NP-hard problem. This means it is difficult to scale. Simply brute force iterating through all possible combinations takes millions of years for a non-trivial dataset, even on a supercomputer. Luckily, AI constraint solvers such as Timefold Solver have advanced algorithms that deliver a near-optimal solution in a reasonable amount of time.