Skip to content

Automatic Timetable Generation System for Faculty of Automatic Control and Computer Science - Polytechnic University of Bucharest

License

Notifications You must be signed in to change notification settings

PatrickDiallo23/Automatic-Timetable-Generation-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic-Timetable-Generation-System

This project is designed to streamline and optimize the process of creating academic schedules, ensuring that resources such as time slots, faculty members, and rooms are utilized to their fullest potential. By automating the complex task of timetable generation, this system aims to reduce scheduling conflicts, enhance faculty and student satisfaction, and improve overall academic operations. More details can be found in the published article Optimizing the Scheduling of Teaching Activities in a Faculty.

Table of Contents

  1. Project Overview
  2. Architecture
  3. Prerequisites
  4. Installation
  5. Running the Application
  6. Project Structure
  7. API Documentation
  8. Testing
  9. Troubleshooting
  10. Contributing
  11. License
  12. Notice

Project Overview

In educational institutions, the process of scheduling can be a daunting challenge, often leading to resource wastage, conflicts, and dissatisfaction among faculty and students. This project introduces a robust solution by implementing an Automated Timetable Generation System that leverages evolutionary algorithms and multi-objective optimization techniques. The system is designed to:

  • Maximize Resource Usage: Efficiently allocate available resources including classrooms, teachers, and time slots.
  • Minimize Conflicts: Prevent issues such as overlapping classes, double-booked faculty, and student timetable clashes.
  • Improve Satisfaction: Generate schedules that consider the preferences and availability of both faculty members and students, leading to a more harmonious academic environment.

Architecture

  • Frontend: Angular

    • Component-based architecture
    • Reactive Forms and Services for state management
    • Angular CLI for project scaffolding and build management
  • Backend: Spring Boot

    • RESTful APIs for communication with the frontend
    • JPA/Hibernate for database interactions
    • Spring Security for authentication and authorization
  • Database: PostgresSQL

    • Store data related to university/faculty (teachers, students, etc.)

Prerequisites

Before setting up the project locally, ensure you have the following installed:

  • Node.js (version 16.x or later)
  • Angular CLI (version 16.x)
  • Java (JDK 21 or later)
  • Maven (version 3.2.5 or later)
  • PostgreSQL

Installation

1. Clone the Repository

git clone https://github.com/PatrickDiallo23/Automatic-Timetable-Generation-System.git
cd Automatic-Timetable-Generation-System

2.Set Up the Backend (Spring Boot)

  1. Navigate to the backend directory:
cd timetable-app-backend
  1. Configure the database connection in src/main/resources/application.properties and provide the secrete key for JWT Token:
spring.datasource.url=jdbc:postgresql://localhost:5432/your_database
spring.datasource.username=your_username
spring.datasource.password=your_password

spring.jpa.hibernate.ddl-auto=update

timetableApp.secretKey=<YOUR_GENERATED_SECRET_KEY>

Note: Make sure that you created some users with "ADMIN" or "USER" role before using the application.

  1. Build the backend:
mvn clean install

3. Set Up the Frontend (Angular)

  1. Navigate to the frontend directory:
cd timetable-app
  1. Install the required dependencies:
npm install

Running the Application

1.Run the Backend

Navigate to the backend directory and start the Spring Boot application:

mvn spring-boot:run

The backend server will start on http://localhost:8200.

2. Run the Frontend

Navigate to the frontend directory and start the Angular application:

ng serve

The frontend application will start on http://localhost:4200.

Project Structure

Backend (Spring Boot)

  • src/main/java: Contains the Java source code (controllers, services, repositories, models, etc.).
  • src/main/resources: Configuration files (application.properties, static resources, etc.).
  • pom.xml: Maven configuration file.

Frontend (Angular)

  • src/app: Contains the Angular components, services, and modules.
  • angular.json: Angular CLI configuration file.
  • package.json: Node.js dependencies and scripts.

API Documentation

Please refer to API Documentation file for details.

Testing

Backend

To run tests for the Spring Boot application:

mvn test

Frontend

To run unit tests for the Angular application:

ng test

To run end-to-end tests:

ng e2e

Troubleshooting

  • Ensure that your database is running and accessible with the correct credentials.
  • Ensure that you added the secreteKey using HS256 Algorithm.
  • Check that the backend server is running on http://localhost:8200.
  • Make sure Angular is running on http://localhost:4200.
  • To add Constraints in the Timetable Application copy the constraint's name (for example: "roomConflict"). You can find the defined constraints in TimetableConstraintConfiguration.java class.
  • For some entities, the update method doesn't work properly because it will create a new entity instead of updating. It will be solved in a future version.
  • You can configure Timefold Solver .xml file (timetableSolverConfig.xml) and application.properties in any way you want. Please refer to this documentation.

Contributing

Contributions are welcome! Please follow the standard GitHub workflow:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes.
  4. Submit a pull request.

License

Copyright 2024 Francis-Patrick Diallo

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Notice

Distributions of this software ("bundles") contain code from other libraries. For a list of software included in a bundle, refer to package.json, pom.xml and the list of dependencies.

This project includes software/code developed at Timefold (https://timefold.ai/).

This project is licensed under the Apache License 2.0. However, the author request that this software not be used for commercial purposes. This request is not legally binding and does not alter the terms of the Apache License 2.0.

About

Automatic Timetable Generation System for Faculty of Automatic Control and Computer Science - Polytechnic University of Bucharest

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published