An optimization tool for scheduling tutorial sessions based on tutor availability and preferences, maximizing overall utility while ensuring fairness across all tutors.
- Utility Maximization: Assigns tutors to time slots by maximizing a weighted preference score (wish slots > alternative slots), with a fairness term that lifts the minimum utility across all tutors.
- Connectivity Bonus: Rewards consecutive slot assignments for tutors who prefer uninterrupted blocks.
- Constraint Satisfaction: Enforces hard constraints — no double-booking, fixed lecture/exercise slots remain free, and blocked slots are strictly excluded.
- Conflict Detection: Automatically flags input data inconsistencies (overlapping wish/block slots) before solving.
- Language: Python 3.14.3
- Solver: Gurobi (via
gurobipy) — requires a valid Gurobi license (free academic license available) - Libraries: Matplotlib (visualization)
Each tutor is assigned exactly 2 time slots from a discretized weekly schedule (2-hour blocks, Mon–Fri, 8–18). The optimizer solves a Mixed-Integer Linear Program:
where
- Clone repository:
git clone https://github.com/GaiusJ/Tutorial-Planning.git - Install dependencies:
pip install -r requirements.txt - Activate Gurobi license:
grbgetkey <your-key> - Run optimizer:
python TutorialPlanning.py
Edit the persons list in TutorialPlanning.py to define tutors and their availability:
person("Name",
wish_slot=[slot("monday", 10, 12)], # preferred slots (weight 1)
alternative_wish_slot=[slot("tuesday", 14, 16)], # fallback slots (weight 0.5)
block_slots=[slot("friday", 8, 18)], # unavailable slots
connected=True) # prefer consecutive blocksThis is an academic side project.
- Personal & Educational Use: Feel free to explore, learn from, and use this tool for private purposes.
- Commercial Use: Prohibited. Contact me directly for written permission.
