This is a Java-based project to generate a timetable for a school based on specified constraints. Algorithm used involves greedy pre-processing (assigning a class to the least busy teacher) followed by a randomised generator to output the timetable that satisfies all constraints. Average runtime is 8 seconds for a school with 2036 students, 40 classes, 200 teachers and 45 classrooms. The project also allows for merging and splitting of classes as needed. It reads its initial data of teachers, classes and subjects from an Excel file.
Documentation can be found here. A detailed user manual, documentation and certification can be found here.
- Number of periods in a day = 8
- Number of working days = 5
- Maximum number of consecutive periods for a teacher (prevents tiring) = 3
- Maximum number of periods for a teacher per day = 5
- Maths cannot be taught in the last period of a day
- Download the Excel files
TestingFile.xlsm
andOutFile.xlsm
(ensure that macros are enabled, and that the files are stored in the same folder) - Edit the
Subject
andTeacherList
fields as needed. - Input pre-allocated classes if needed, in the Worksheets labelled "6A-12D"
- Save all your changes in
TestingFile
. - Run
TimeTable.java
. The final timetable will be stored inOutFile.xlsm
.