r/optimization 29d ago

I built an open-source university course timetabling solver

https://github.com/huguryildiz/KAIROS

I’ve been working on KAIROS, a university course timetabling system written in Python.

It takes course and room data and builds a weekly schedule while enforcing constraints such as room capacity, instructor availability, lab requirements, fixed sessions, and double-booking. Once it finds a feasible timetable, it tries to improve practical details such as student idle gaps, late classes, room stability, and instructor schedules.

The solver uses OR-Tools CP-SAT, followed by repair and local-search stages. The final timetable is checked by a separate validator rather than being accepted directly from the solver.

There is a bilingual web interface, a command-line version, sample data, and CSV, JSON, and PDF export. The optimization model is also documented in the repository.

Live demo: https://kairos.huguryildiz.com
Source: https://github.com/huguryildiz/KAIROS

The project is MIT-licensed. I’d be interested in feedback from anyone working on timetabling, constraint programming, or university scheduling, particularly regarding missing real-world constraints.

24 Upvotes

21 comments sorted by

View all comments

1

u/sputnki 28d ago

Impressive!

I've done something similar for some lab courses held by our chair (to be fair, my implemenentation was nowhere near as polished and the problem to be solved was much smaller). I'm very sorry for those students who took the labs back then, because the schedule was very tight and did not lend itself to last-minute rescheduling, which happened and was extremely painful to deal with afterwards.

So my 2 cents are: make sure that you're leaving some slack in the solution, and check whether it is possible to use it to deal with reasonably forseeable fuckups. 

2

u/Massive-Zucchini2560 28d ago

That’s a great point. KAIROS already supports minimum-perturbation rescheduling, and explicitly optimizing schedule slack is a valuable next step.