Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/albavilanova/safe-seats-selection
Manual and optimal automatic seats selection in a plane to guarantee social distancing measures during the COVID-19 pandemic.
https://github.com/albavilanova/safe-seats-selection
automation covid-19 planes safety
Last synced: 24 days ago
JSON representation
Manual and optimal automatic seats selection in a plane to guarantee social distancing measures during the COVID-19 pandemic.
- Host: GitHub
- URL: https://github.com/albavilanova/safe-seats-selection
- Owner: albavilanova
- Created: 2021-02-23T21:43:10.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-21T11:08:56.000Z (about 3 years ago)
- Last Synced: 2024-10-30T07:08:47.032Z (2 months ago)
- Topics: automation, covid-19, planes, safety
- Language: Python
- Homepage:
- Size: 2.38 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Seats selection algorithm to ensure safety measures
![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/solar.png)
Contents
Contents
![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/solar.png)
1. Introduction
Due to the current COVID-19 pandemic, we have been forced to secure a distance between the passengers in different means of transport in order to avoid the transmission of the disease. Currently, companies have been reducing the capacity without optimizing the space and have been placing passengers unnecessarily close to each other. Considering this problem, our project aims to propose an optimal automatic seats selection during the booking process that guarantees social distancing measures by:
* Providing an efficient solution to allocate seats considering safety measures.
* Creating an algorithm that is able to automatically select the furthest seat / seats from all occupied seats.
* Suggesting and trying to keep, while possible, one empty seat in two directions.![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/solar.png)
2. Structure
Figure 1. Code structure
![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/solar.png)
3. Database
The data of the passengers and their seat preferences are going to be input through the Python code and then stored in a table within a SQL database. In this first table, we will find information about the passengers, such as their full name, ID and booking reference.
All passengers will choose their selection preference, which can be manual or automatic. The passengers who want to manually select the seats will be able to choose those that are available, at at least one seat away from others vertical and horizontally. On the other hand, the passengers that do not select their seats will have them assigned automatically at the furthest distance possible from the occupied ones.
Table 1. Passenger details.
| Passenger | ID | Booking reference | Selection preference | Seat |
| :---------------------:|:-------------:| :----------------:|:--------------------:|:----:|
| Matheus Nascimento | g20200024 | 000001 | Manual | A1 |
| Alba Vilanova Cortezon | m20201124 | 000002 | Manual | E10 |
| Fábio Silva | r2016669 | 000003 | Automatic | NaN |
| ... | ... | ... | ... | ... |In the same database, we will also create another table that defines the plane design and its seat map, which will be expressed as a matrix, where X corresponds to the column letters (from A to F) and Y to the row numbers.
The letters "CO" for the attribute "Column" correspond to the corridor and therefore the seat organization is similar to the one that is found in the planes used for domestic flights, which have 6 seats per row and 1 corridor in the middle. The attribute "Seat" is a primary key of this table and a foreign key of the previous one. The attribute "Occupied" indicates if the seats are available or not. Initially, all seats are not booked (Occupied == False).
Table 2. Seats details.
| X | Y | Column | Row | Seat | Occupied |
| :---:| :---:| :-----:| :---:| :----:| :--------:|
| 1 | 1 | A | 1 | A1 | False |
| 2 | 1 | B | 1 | B1 | False |
| 3 | 1 | C | 1 | C1 | False |
| 4 | 1 | CO | 1 | CO1 | False |
| 5 | 1 | D | 1 | D1 | False |
| 6 | 1 | E | 1 | E1 | False |
| 7 | 1 | F | 1 | F1 | False |
| ... | ... | ... | ... | ... | ... |There are four conditions that have to be met:
* Passengers can only have one seat assigned to them.
* A seat can be occupied by one passenger or not occupied at all.
* A seat corresponds to one and only one plane.
* A plane must have at least one seat.![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/solar.png)
4. Workflow
The following constraints and rules were implemented:
1. Until the capacity does not reach the limit (50%), every seat must be allocated at at least one seat away from each other. As noticed in an article in the magazine Time (2020), American airlines was leaving 50% of middle seats in economy unassigned until May 31, 2020, but said that it would use those seats if necessary.
2. If passengers make a booking for multiple people, the first constraint will not be applied and they will be able to sit together.
3. The corridor can be used as a separator for two seats, fulfilling the first constraint. The positions corresponding to the corridor in the matrix cannot be selected and only exist for the previous reason and a better visualization.
All the details about the workflow can be found in this presentation. As an example, Figure 2 shows how the plane (Airbus A320 - 214 (4R-ABM/N/O)) would look like while being filled with passengers.
Figure 2. Resulting visualization.
![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/solar.png)
5. Authors
Matheus Nascimento
Bachelor's degree in Geology at Federal University of Rio de Janeiro
Master's degree in Geospatial Technologies at NOVA University of Lisbon, WWU Münster and UJIFábio Silva
Bachelor's degree in Information Systems at NOVA University of Lisbon
Master's degree in Geospatial Technologies at NOVA University of Lisbon, WWU Münster and UJIAlba Vilanova Cortezón
Bachelor's degree in Mechanical Engineering at University of Lleida and Inha University
Master's degree in Geospatial Technologies at NOVA University of Lisbon, WWU Münster and UJI