This project is a Python-based application for simulating and analyzing queue theory, supporting both deterministic and non-deterministic queue models. Built with a PyQt5-based graphical user interface (GUI), the program enables users to compute performance metrics for various queue configurations in an interactive and user-friendly manner.
The application is suitable for students, researchers, and professionals interested in exploring and understanding queue dynamics.
-
Supported Queue Models:
- Deterministic models (e.g., D/D/1): Fixed arrival and service times.
- Non-deterministic models (e.g., M/M/1, M/M/c): Randomized arrival and service times (e.g., exponential distribution).
-
Performance Metrics:
- Utilization (\u03c1): Server workload.
- Average number in system (L): Tasks in queue and service.
- Average waiting time in queue (Wq).
- Average response time (W).
-
Graphical User Interface (GUI):
- Built with PyQt5 for a modern and responsive user experience.
- Easy-to-use input forms for queue parameters.
- Real-time calculation and visualization of results.
-
Visualization:
- Dynamic graphs, including queue length over time and response time distribution.
- Comparison between deterministic and non-deterministic models.
Before running the application, make sure you have the following:
- Python 3.8+
- Required Python libraries (install using
pip
):pip install pyqt5 numpy matplotlib scipy
git clone https://github.com/abdo-mongy/Queuing-theory-
cd queue-theory-simulation
Start the application by running the main script:
python main.py
- Select the queue type: Deterministic or Non-Deterministic.
- Input the required parameters:
- Arrival rate .
- Service rate.
- Number of servers (c) (for multi-server models).
- Click Graph to view the results.
- Launch the application.
- Choose Deterministic from the queue type options.
- Input the following:
- Arrival time: 2 seconds.
- Service time: 1 second.
- Click Graph.
Results:
- Utilization (\u03c1): 0.5
- Average number in system (L): 1.
- Average waiting time in queue (Wq): 0 seconds.
Graphs:
- Launch the application.
- Choose Non-Deterministic from the queue type options.
- Input the following:
- **Arrival rate **: 5 tasks/second.
- **Service rate **: 7 tasks/second.
- Click Simulate.
Results:
We welcome contributions! Here's how you can help:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature-name"
- Push your branch:
git push origin feature-name
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
Special thanks to the creators of PyQt5, NumPy, Matplotlib, and SciPy for providing the essential tools to build this application. This project aims to simplify the study of queue theory for both deterministic and non-deterministic systems.