Skip to content

🚎 Bus Seat Allocator and Queue Management (CSP & A*)

Notifications You must be signed in to change notification settings

aaronespasa/bus-seat-allocator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚎 Bus Seat Allocator and Queue Management (CSP & A*)

This project aims to tackle two important challenges related to the seating and boarding of students on a bus. -> The first part of the project involves finding a valid seating arrangement for different types of students on the bus. -> The second part of the project focuses on sorting the students in a queue to board the bus while considering the specific needs of each student type.

The students on the bus belong to various courses and have designated seats. In addition, there are different types of students:

  • Some students are siblings who want to sit together.
  • Others are conflictive students who need to sit alone.
  • There are students with reduced mobility who require specific seating arrangements.
  • There can be students combining multiple of these types.

The project aims to create a seating plan that considers all these factors and satisfies the requirements of each student type.

In the first part of the project, the problem is modeled as a Constraint Satisfaction Problem (CSP). This approach allows the project to identify a valid seating arrangement for different types of students on the bus. The seating arrangement must consider the specific needs of each student type while ensuring that there are no conflicts or overlaps in the seating plan. By utilizing the Constraint Satisfaction Problem approach, the project can find the optimal seating arrangement for all students on the bus.

The second part of the project involves sorting the students in a queue to board the bus. This part of the project takes into account the different needs of each student type while ensuring that the boarding process is as efficient as possible. For instance, students with reduced mobility may require additional time to board the bus, which can slow down the person behind them in the queue. Similarly, conflictive students may cause delays for other students behind them. The project utilizes the A* algorithm to sort the students in the queue efficiently while minimizing the impact of each student type on the boarding process.

Overall, this project aims to create a comprehensive solution for the seating and boarding of students on a bus. By considering the needs of different student types and utilizing advanced algorithms, the project aims to optimize the seating and boarding process, ensuring a safe and comfortable journey for all students.

Getting Started 🛠

🗂 Clone the repository (the command below uses HTTPS):

$ git clone https://github.com/aaronespasa/practica2-100451339-100451273.git

🌲 Create a virtual environment and activate it (make sure you're using Python 3.8):

$ python -m venv ./venv
  • To activate it in a machine using unix (MacOS or Linux):
$ source ./venv/bin/activate
  • To activate it in a machine using Windows:
$ .\venv\Scripts\activate

📄 Install the required libraries (python-constraint):

$ pip install -r requirements.txt

🎉 Now, you are ready to go!

Project Structure

image

Made by Alejandra Galán & Aarón Espasandín

About

🚎 Bus Seat Allocator and Queue Management (CSP & A*)

Resources

Stars

Watchers

Forks