Queue Analyzer
This standalone app is the Graphical user interface version of the python program written to generate a distribution for arrival objects and analyze the results from the Dosimis software. The app is written in python version 3.11 and GUI is enabled with GTK 3.0 with Glide software.
Table of Contents
Installation
The App can be run/installed in following ways.
Install
Prerequisites are following
-
matplotlib>=3.5.1
-
numpy>=1.21.5
-
pycairo>=1.20.1
-
PyGObject>3.42.0
-
pandas>=2.0.1
Prerequistic for PyGObject
On Ubuntu or debian based OS :
sudo apt-get install libgirepository1.0-devOn Fedora, you can use the "dnf" package manager:
sudo dnf install gobject-introspection-develOn Arch Linux, you can use the "pacman" package manager:
sudo pacman -S gobject-introspectionOn macOS, you can use Homebrew:
brew install gobject-introspection
Install using pip
From GitHub
pip install git+https://github.com/dipson94/Queue-Analyzer.git@main#subdirectory=singlepyfile
From pypi
pip install Queue-Analyzer
Running the App
Enter the following command in Terminal to run program
queueanalyzer
Run and install preview
https://github.com/dipson94/Queue-Analyzer/assets/123653581/d6a0cac6-0086-4ecc-a708-a4f88f766a8b
Standalone running (without install)
-
Download .exe windows executable file.Download Link.
-
Build the .exe file using pyinstaller.run 'pyinstaller -w --onefile Queue_Analyzer.py' in terminal. find executable in dist folder. Or use auto-py-to-exe for GUI experience. pip install auto-py-to-exe and then run auto-py-to-exe in terminal.
-
Run python script file. make sure the following dependencies are met before running Queue_Analyzer.py file.
- Python 3.10 or newer
- Gtk version 3.0 (libraries include pycairo,pygobject,gtk,gi)
- numpy
- matplotlib
- pandas
- datetime
- Base64
Usage
The App has Two functions, one is to generate arrival distribution for the Dosimis model and second is to analyse the results from the simulation of Dosimis model.
The top left corner shows the group of widgets to enter details for generating the arrival distribution. The first four text entries are for entering the persons/time slot for four different cases. The next row entries are simulation time and time slot value (time interval) respectively. Hovering mouse pointer over them shows which text entries for which. The Button next to it enables to save the .txt files at desired location. Once everything in order, clicking generate button will generate the data files for the Dosimis model, simultaneously appearing completion message.
The analyse part uses the rest of the widgets. Use file chooser button to load .tra files and input .txt files (arrival data) for the four cases. These files are in Dosimis model directory. Also note the module number of each module when modelling the model in Dosimis. Enter the module number at which object enter and exits in corresponding text entries. Once the details are loaded click the generate statistics to display the results.
The results will contain the following items.
- Statistical data of total time spend and queue length (the time) at entrance for four cases.
- Graph plotted between time spend vs number of peoples for four cases.
- Second graph plotted between max time spend across each module and corresponding modules for four cases.
Subsequently a local directory is created and filled with data used for the results including the .png files of graphs.
How it works
The program has two segments. First segment perform the task of arrival data generater and second segment consists of Queue analyzing part.
Data Generater
A raw string is created with template of input data for Dosimis.
First two rows are the part of templete and later rows with columns 1, 2, and 3 represents time, object type and order number respectively.
The arrival data is generated with regular interval and added to the raw string. Later that string saved as .txt format.
Queue Analyzer
The above illustration is the data from .tra file when space is used as the delimiter. It is then sliced and saved as .csv format. Refer the Dosimis user Manual for more details about .tra file (Dosimis-3 User manual 2017, page number : 414) .
The below illustraion is the result of the above change.
-
First column indicates the time starting from the beginning of the simulation.
-
Third column indicates identifying number of module.
-
Fourth column indicates the keys to identifiy the current event corresponding to the time.
- B+ indicates the entering time of object into the module.
- B- indicates the exit time of object from module.
-
Sixth column indicates the object number.
The idendified data is extracted into a dataframe. And that dataframe is used to form the data such as queue tine,dwell tiem etc.
Base64 Encoding
In order to have the ability of standalone -independant nature, all the dependent data are encapsulated into python file.
The icon file encoded into base64 and stored as string values. it is then to decoded and directly used as icon.
Simlarly the glade file, which in xml format, is loaded as raw string and later loaded as GUI of the program.
Contributing
Optimizing the project with size and run speed.
Making C version of the same App.
License
GNU General Public License v3.0
Author
Dipson
Metadata
Release files for Queue-Analyzer 0.9.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Queue_Analyzer-0.9.1.2.tar.gz | 29.0 kB | Without provenance | Details for Queue_Analyzer-0.9.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Queue_Analyzer-0.9.1.2-py3-none-any.whl | Python 3 | none | any | Details for Queue_Analyzer-0.9.1.2-py3-none-any.whl |
Total release size: 54.9 kB
Release files / Queue_Analyzer-0.9.1.2.tar.gz
| Download URL | Queue_Analyzer-0.9.1.2.tar.gz |
|---|---|
| Size | 29.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04f501e6b17551c3d2d2701b4a7cef470dcda10adfb1681894216a0272804422
|
|
BLAKE2b-256 checksum How to use checksums |
6c70c85750f2517e3bc242f5ecf395997dbe41056e5b94f5e2a175623947b65b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / Queue_Analyzer-0.9.1.2-py3-none-any.whl
| Download URL | Queue_Analyzer-0.9.1.2-py3-none-any.whl |
|---|---|
| Size | 25.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18c003867f230d379ef390f75b1240fdfe648e7396e4befa4c27cfea75b0f8b9
|
|
BLAKE2b-256 checksum How to use checksums |
4c1a452e262f88c1a578c8c36093a6a321094666f6e88724e8433683fbfa5e50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for Queue-Analyzer 0.9.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.