# Optimizing the Scheduling of Teaching Activities in a Faculty
## 3 Model of the Automatic Timetable Generation System  
### System Architecture  
A web-based platform is proposed for the development of an Automatic Timetable Generation system for a faculty. The frontend of the system is constructed using the Angular framework, while the backend is developed using Java with Spring Boot. The aforementioned architectural approach guarantees a design that is both scalable and modular, effectively segregating the presentation layer from the business logic and data processing layers, as shown in Figure 1. The proposed system is designed to adopt a client-server architecture, wherein the Angular-based frontend can establish communication with the Java-based backend via APIs.  
The frontend of the system uses Angular [24], a framework for building single-page applications. It employs a component-based architecture [25], allowing for reusable and modular code. Key Angular features include data binding [26], dependency injection [26], routing [25], reactive programming [25], and robust testing support [26]. The frontend manages modules such as user authentication and timetable display, interacting with backend application programming interfaces (APIs) to retrieve data and update the application's status, guaranteeing a user interface that is dynamic and responsive.  
Figure 1: Application architecture.  
The backend is built with Java [27] and the Spring Boot framework [28]. It features auto-configuration [29], embedded servers [29], microservices support [30], RESTful APIs [31], and Spring Security [32] for robust security measures and testing support [33]. The backend architecture follows a layered design [34], including a presentation layer for managing API endpoints, a service layer for business logic, and a data access layer using Spring Data JPA [35] for database interactions where developers can use it to execute CRUD activities and intricate queries with minimum boilerplate code [36].  
The Timefold Solver [22] serves as the central component of the timetable generation method, utilizing its advanced capabilities to efficiently distribute resources and time slots. Timefold is the subsequent development of OptaPlanner [21]. It is a type of mathematical optimization that is used in the fields of Operations Research and Artificial Intelligence. Timefold Solver is an artificial intelligence planning solver implemented in the Java programming language.  
Timefold enhances the efficiency of planning problems, such as the vehicle routing problem (VRP) [37], maintenance scheduling [38], job shop scheduling [39], and school timetabling [1]. It develops logistics strategies that significantly minimize expenses, enhance the quality of service, and reduce the environmental impact, frequently by up to 25%, for intricate, practical scheduling activities. It allows for the inclusion of constraints written in code. The Timefold Solver utilizes Plain Old Java Objects (POJOOs) to implement the input and output data, which consist of the planning challenge and the optimal solution. The Timefold Solver provides three types of optimization algorithms for generating high-quality solutions, namely, Construction Heuristics [40], Exhaustive Search [41], and Metaheuristics [42].  
It handles hard constraints, medium constraints, and soft constraints [43]. The optimization process (or Local Search Phase [44]) uses algorithms like Hill Climbing [45], Tabu Search [46], and Simulated Annealing [47] for further refinement of scheduling solutions.