Skip to content

This simulation project models a customer queue system using the SimPy library in Python. It simulates customers arriving at a service point, waiting in a queue if necessary, being served, and then leaving the system. The project also includes visualizations of waiting times and provides statistical analysis of the system's performance.

Notifications You must be signed in to change notification settings

yousefzekry/Simulation-Project-Customer-Queue-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simulation Project: Customer Queue System

Overview

This simulation project models a customer queue system using Python and SimPy. It simulates customers arriving at a service point, waiting in a queue if necessary, being served, and then leaving the system. The project also includes visualizations of waiting times and provides statistical analysis of the system's performance.

Dependencies

This project requires the following dependencies:

  • SimPy: A process-based discrete-event simulation library.
  • Matplotlib: A plotting library for creating visualizations.
  • Tabulate: A library for formatting data into tables.

You can install these dependencies via pip: pip install simpy matplotlib tabulate

Usage

Version 1: exact_numbers.py

This version shows the simulation for 11 customers with given interarrival times and given random service times arrays with values.

To run the simulation, execute the Python script exact_numbers.py. Make sure you have Python installed on your system.

python exact_numbers.py

Version 2: theProject.ipynb

This version shows the simulation for 100 customers with randomly generated interarrival times and randomly generated random service times arrays with values.

To run the simulation, open the Jupyter Notebook theProject.ipynb in Jupyter Notebook or Jupyter Lab and execute the cells.

The simulation will output the following:

  • A table showing various metrics for each customer, including arrival time, service time, waiting time in queue, time spent in the system, etc.
  • Histograms displaying the distribution of queue time and system time.

Additionally, the script calculates and prints various performance metrics, such as average waiting time in queue, probability of waiting, probability of idle server, average service time, average interarrival time, average time a customer spends in the queue, and average time a customer spends in the system.

Simulation Parameters

  • num_customers: The number of customers to simulate.
  • interarrival_times: A list representing the interarrival times of customers.
  • random_service_times: A list representing the service times of customers.

You can adjust these parameters in the script according to your requirements.

Contributing

Feel free to contribute to this project by adding new features, improving the simulation logic, or optimizing the code. Fork the repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This simulation project models a customer queue system using the SimPy library in Python. It simulates customers arriving at a service point, waiting in a queue if necessary, being served, and then leaving the system. The project also includes visualizations of waiting times and provides statistical analysis of the system's performance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published