# Optimizing the Scheduling of Teaching Activities in a Faculty
## 7 Results  
The university timetable generation application was executed using two different Apple laptops, the MacBook Pro M1 (2021) and the MacBook Air M1 (2020), each with specific hardware and software configurations to evaluate the algorithm's performance and effectiveness. The MacBook Pro M1 (2021) utilized for this study is equipped with a 10-core CPU, a 16-core GPU, 3.2 GHz, 16 GB unified memory, and a 1 TB SSD. The operating system used was macOS Monterey. The frontend was developed using Angular 16 and TypeScript 4.9.4, while the backend was implemented with Java 21, Spring Boot 3.2.3, and PostgreSQL 14.10 for the database. The solver employed was Timefold Solver 1.9.0, though the current version at the time of writing was 1.10.0. Similarly, the MacBook Air M1 (2020) used in the experiments featured an 8-core CPU, a 7-core GPU, 3.2 GHz, 8 GB of unified memory, and a 512 GB SSD, running on macOS Monterey. The software stack for the frontend and backend was identical to that of the MacBook Pro, using Angular 16, TypeScript 4.9.4, Java 21, Spring Boot 3.2.3, and PostgreSQL 14.10 with Timefold Solver 1.9.0. The timetable generation algorithm was tested twice on the MacBook Pro M1, each with different durations to assess performance and effectiveness. In the first run, which lasted approximately 8 h, the best score obtained was \(-262\) init/0 hard/\(-2113\) medium/7647 soft (Figure 8). This result indicates that there were no violations of hard constraints, 2113 violations of medium constraints, and a score of 7647 for soft constraints, with 262 rooms or timeslots unassigned to any lesson. The algorithm ran for 28,800,043 milliseconds, achieving a score calculation speed of 8401 scores per second, utilizing 4 threads for processing. In the second run, extending to 12 h, the Construction Heuristic phase successfully initialized the best feasible solution after 8 h and 37 min with a score of 0 hard/ \(-\)2187 medium/7889 soft. For the remaining hours, the Local Search phases made incremental improvements, culminating in a final score of 0 hard/\(-\)2183 medium/8121 soft (Figure 9). As with the first run, there were no violations of hard constraints, and all the rooms and timeslots were assigned to lessons, but the number of medium constraint violations decreased to 2183. The score for soft constraints improved to 8121. The algorithm ran for 43,200,005 milliseconds, with an overall score calculation speed of 6342 scores per second, and averaged 1991 scores per second during the local search phases. This run also used 4 threads for processing. The timetable generation algorithm was also tested on a MacBook Air M1 (2020) to evaluate performance differences due to hardware variations with 4 threads for processing. Figure 8: Results of the first run of the algorithm. Figure 9: Results of the second run of the algorithm. After running the algorithm for 5 h, the best score obtained was \(-3122\) init/0 hard/ \(-462\) medium/3417 soft. Extending the runtime to 8 h resulted in a score of \(-1938\) init/ 0 hard/ \(-798\) medium/5531 soft. Further extending the runtime to 11 h improved the initial unassigned count to \(-1102\) init, with improvements in the soft constraint score but a lower medium score (\(-1102\) init/0 hard/ \(-1246\) medium/6571 soft) compared to the 8 h run. In each case, the score calculation speed was lower in comparison to the MacBook Pro M1. Additionally, an alternative configuration was tested on the MacBook Air M1, where timeslots were assigned to courses first, followed by room assignments during the construction heuristic phase. After 8 h, this configuration produced a score of \(-10\) hard/ \(-5602\) medium/3361 soft. This configuration led to 10 hard constraint violations, 5602 medium constraint violations, and a soft constraint score of 3361. Despite using 4 threads, the algorithm required considerable time to generate the timetable on the MacBook Pro M1 (Table 6).