This is the repository for my social-distancing seat allocation project for creating optimal seating plans in lecture halls and theatres whilst maintaining social distancing.
The project contains code for a GUI (demonstrated above) that takes a PDF of an architectural plan, converts it to image format and displays it to the window. The user can then zoom and pan across the image, marking the location of all seat locations within the hall before running an integrated seat allocation algorithm which aims to maximise the number of seats allocated, subject to the constraint that the allocated seats must be seperated by 2m+. The UI then returns and visualises this seating arrangement, before entering 'post-allocation' mode, in which the user can manually add, remove or adjust the positions of allocated seats in the hall.
There are currently two allocation algorithms available: additionAllocator
and eliminationAllocator
, although feel free to pull this repo and write your own!
To run the software, simply download a zip of the master
branch and run seatAllocationGUI.py
. We're yet to properly test cross-platform compatibility or implement automatic package installation, so apologies in advance for any errors! Please refer to the list of currently known issues for troubleshooting.
-
The UI does not currently support dark mode on newer versions of macOS - this will likely be fixed in the future by requiring a newer version of PyQt5 (v5.12.2) which can handle dark mode.
-
The software uses package
pdf2image
found here, which can be a little tricky to get running. Thepdf2image
package usespoppler
- a PDF rendering library - which is installed differently depending on your OS, please see here for detailed instructions. If you are comfortable with the anaconda distribution, I would recommend usingconda
to install both libraries by running the following from Anaconda Prompt:
conda install -c conda-forge pdf2image
conda install -c conda-forge poppler
- Further errors with using
poppler
on Windows: if you've installed @oschwartz10612 version on your system, you'll need to add thebin/
folder to PATH. If you need help doing this, I'd recommend this helpful tutorial, or just google 'adding to PATH environment variable' :)
I began this project during a work-experience placement with the University of Birmingham in the summer of 2021. The original intention of this software was to make the process of creating socially-distanced seating plans easier than the previous method; which takes place in the MATLAB console terminal and requires manual concatenation of selected seat coordinate arrays grabbed using MATLAB's 'ginput' functionality, followed by manual visualisation and plotting. I think I've achieved this goal!
It's also my hope that this software will aid the reimplementation of some in-person teaching at UoB and other higher educational institutions in the coming academic year, or at least safely increase room capacities: this methodology of computer assisted seat planning increased room capacities by up to 10% in certain halls at UoB, when compared to the manual methods used at the start of the pandemic.
Although this software was originally created for use in higher-educational settings, I see no reason why theatres, libraries or anyone else with architectural drawings shouldn't use this software for socially-distanced seat allocation, so help yourself!
If this project interests you and you'd like to write and implement your own allocation algorithms, I've (hopefully) designed this project so this'll be straightforward! I'm planning on writing some documentation that will help this process...
I'd like to say a big thank you my supervisors, Richard Mason and Jonathan Watkins, and the University of Birmingham for supporting me through their Work Experience Bursary Scheme. Richard and Jon: thanks for your support - I've really enjoyed this project and hope you'll find it useful!