Timetabling is a complex constraint satisfaction problem (CSP) that involves scheduling events while satisfying multiple constraints. This NP-hard optimization problem is prevalent in various sectors including education, healthcare, transportation, and workforce management.
In academic settings, the challenge lies in assigning courses to specific:
- Time slots
- Rooms
- Instructors
...while ensuring that constraints like availability, capacity, and fairness are met.
A valid timetable must respect multiple factors:
- Resource constraints: Availability of instructors, classrooms, and equipment
- Time constraints: No scheduling conflicts among courses and instructors
- Student needs: Avoiding overlapping courses and balancing workloads
- Institutional policies: Adhering to predefined academic structures, breaks, and weekend restrictions
Modern challenges such as hybrid learning models have introduced additional complexity to this already intricate problem.
Goodwing Timetabler generates optimal or near-optimal course schedules for educational institutions. Starting from your university's specific parameters, the algorithm produces comprehensive timetables ensuring:
- All groups can attend sufficient courses to complete their subjects
- Teachers are assigned consistently (same teacher for all sessions of a subject for a group)
- Resources are allocated efficiently
- Institutional constraints are respected
To set up your instance of the problem, navigate to Inputs/University.xlsx
and modify the Excel sheets:
- University: Basic settings like institution name, semester start date, duration
- Timeslots: Define available time periods for courses
- Rooms: Specify classrooms and their types
- Promotions: Define study levels/years and their groups
- Subjects: List all courses with hours required and color codes
- Teachers: Enter faculty information and which subjects they can teach
- TeacherAvailability: Optional sheet to specify when teachers are available
- Ensure that the number of hours required to complete a subject is a multiple of a timeslot duration
- The starting day should be a Monday
- For best results, make sure you have enough teachers, rooms, and timeslots to satisfy all requirements
- Download the latest installer from the releases page
- Follow the installation steps
- Double-click
GoodwingTimetabler.exe
to launch the application - Choose option 1 to start the AI solver
- Enter a maximum time limit for the solver (in seconds)
- Wait for the solution to be generated
- Access your results in the
Outputs/excel/schedule.xlsx
file
If you prefer to run from source or want to modify the code:
- Ensure Python is installed on your system
- Clone or download the repository
- Open a terminal in the repository folder
- Run:
python .\GoodwingTimetabler
- Choose option 1 to start the AI solver
- Enter a maximum time limit
- Review the Schedule Intelligence report in the console when finished
- Check
Outputs/excel/schedule.xlsx
for the complete timetable
If you need to create a new instance from scratch:
- Launch the application
- Choose option 2 to generate input files
- Edit the generated Excel files in the
Inputs
folder - Run the solver as described above
After running the solver, two key files are generated:
-
schedule.xlsx: Contains separate sheets for:
- Each group's schedule
- Each teacher's schedule
- Each room's allocation
- Statistics sheet with usage metrics
-
visual_timetable.xlsx: A more user-friendly visual representation with:
- Color-coded weekly schedules
- Interactive navigation between sheets
- Clear display of time slots and days
The console displays a Schedule Intelligence report highlighting:
-
Conflict Analysis:
- Room overlaps (soft constraint)
- Teacher overlaps (soft constraint)
-
Resource Utilization:
- Most used rooms
- Teachers with heaviest workloads
- Busiest time slots
-
Distribution Analysis:
- How courses are spread across the schedule
- Balance of subjects across weeks
Feature | Implemented | Note |
---|---|---|
Constraints | ||
Personalized University | Yes | |
Promotions and groups handling | Yes | |
Personalized Timeslots and Timespan | Yes | |
Unique schedule per week | Yes | |
Overlaps handling | Yes | Soft constraint* |
Lunch breaks | Yes | |
Slot restriction (weekends) | Yes | |
Course balancing | Yes | |
Teacher availability | Yes | |
Online/Presential courses | Yes | |
Consistent teacher per subject-group | Yes | NEW! |
Solving Methods | ||
CSP Solver | Yes | Using OR-Tools |
ML-powered CSP | Not yet |
**Soft Constraint: The overlaps for teachers and rooms are treated as soft constraints to always yield a solution. It's then up to the user to identify where the overlaps occur by examining the Schedule Intelligence report in the terminal, and make manual adjustments if necessary.
- For large instances, ensure your computer has sufficient CPU and RAM
- The solver's performance depends on the complexity of your constraints
- You can adjust the maximum solving time based on your needs
- Use the benchmark test (
pytest -s
) to evaluate performance on your system
File | Description |
---|---|
Problem Definition | Detailed problem specification |
Mathematical Constraints | Formal definition of constraints |
Changelog | Version history |
If no solution is found:
- Increase the maximum solving time
- Add more resources (teachers, rooms, timeslots)
- Verify that your teacher availability does not make a solution impossible