College Timetable Backend in Python

Замовник: AI | Опубліковано: 07.10.2025

I need a clean, well-documented Python backend that builds complete weekly timetables for a college using Google OR-Tools as the solver. The engine must respect our core academic rules: each subject can include a two-hour lab, its companion tutorial, and a standard lecture slot; the timetable splits every class section into two equal halves, and labs are always handled by different instructors than the lecture/tutorial pair. Please make room in the model for additional hard or soft constraints so we can extend the rules later without rewriting the core. Scope of work • Design the data model for courses, teachers, rooms, periods and sections. • Encode all constraints in OR-Tools’ CP-SAT optimiser. • Produce a solver script that returns a machine-readable timetable (JSON is fine) and a simple human-readable table printed to stdout. • Comment the code thoroughly and include a short README explaining how to add new constraints or change parameters. Acceptance criteria 1. Running `python schedule.py` with a small sample dataset produces a clash-free timetable that honours the two-hour lab blocks, tutorial pairings and teacher allocations. 2. The codebase follows PEP-8 and isolates model-building, data input and solver invocation in separate modules. 3. All constraints are clearly tagged in the code so we can toggle them on or off for testing. No UI or database integration is required at this stage; I just need the optimisation core. If you have built similar academic scheduling systems before, let me know in your proposal along with a brief outline of how you would structure the model.