We all have visited a bank at some point in our life, and we are familiar with how banks operate. Customers enter, wait in a queue for their number to be called out, get service from the teller, and finally leave. This is a queueing system, and we encounter many queueing systems in our day to day lives, from grocery stores to amusement parks they’re everywhere. And that’s why we must try and make them as efficient as possible. There is a lot of randomness involved in these systems, which can cause huge delays, result in long queues, reduce efficiency, and even monetary loss. The randomness can be addressed by developing a discrete event simulation model, this can be extremely helpful in improving the operational efficiency, by analyzing key performance measures.

In this project, I am going to be simulating a queueing system for a bank.

Let’s consider a bank that has two tellers. Customers arrive at the bank about every 3 minutes on average according to a Poisson process. This rate of arrival is assumed in this case but should be modeled from actual data to get accurate results. They wait in a single line for an idle teller. This type of system is referred to as a M/M/2 queueing system. The average time it takes to serve a customer is 1.2 minutes by the first teller and 1.5 minutes by the second teller. The service times are assumed to be exponential here. When a customer enters the bank and both tellers are idle, they choose either one with equal probabilities. If a customer enters the bank and there are four people waiting in the line, they will leave the bank with probability 50%. If a customer enters the bank and there are five or more people waiting in the line, they will leave the bank with probability 60%.

Lets first try and visualize the system

Image for post

Great! now let’s start building the model

#simulation #decision-making #queuing-theory #discrete-event-simulation #python

Simulating a Queuing System in Python
47.65 GEEK