There are many situations where a service is provided by a limited number of agents; the total time to complete a transaction equals the period of waiting time plus the service time. Queuing theory has its roots in telephony where a limited number of connections is available to customers to make a call. If the connections are busy then the customer has to wait until a line becomes available. This model can be extended to services such as contact centres, support teams, checking points, etc. This article develops the theory and provides some practical advice for the application of queuing models using spreadsheets.
There are many possible variants, such as priority of service, restrictions on the queue,etc. We shall deal with the most common situation as shown in the diagram.
There are a number of questions that are important for the design of optimal service management systems:
- Probability that a customer has to wait
- Average waiting time
- Probability of being served within a target time
To answer these questions we make the following assumptions:
- The system can accommodate an infinite number of customers
- The customer does not leave the system until served
- The arrival rate follows a Poisson process, meaning that the time between customer arrivals is random with mean time
- The Service time of each customer is exponentially distributed with mean time
- The number of servers is
Let = probability that there are customers in the system. The system is in equilibrium when the probability of a customer entering the system is equal to the probability of a customer leaving the system.
We can analyse this situation by considering the transition between two adjacent states.
The assumption of exponential service times implies that when there are customers being served the rate at which service completions occur is and when all servers are busy only the customers that are being served can leave at a rate of .
These equations can be combined recursively to obtain:
We define following useful quantities:
- Traffic intensity:
- Server utilisation:
To determine we use the boundary condition
When the system is in equilibrium and the infinite sum on the right term converges.
The probability distribution for the number of customers in the system is:
Probability that a customer has to wait
Customers that arrive when all the servers are busy must wait in the queue, and the probability is given by:
Multiplying the numerator and denominator by we get the Erlang-C formula:
We can re-write this function using the Poisson distribution:
Where is the Poisson distribution probability mass function, and is the Poisson distribution cumulative function. These formulas are available in popular spreadsheet software.
Average waiting time
To calculate the average waiting time we use Little’s formula
The expected number of customers in the queue is:
We calculate = probability that a customer has to wait longer than a target time by considering a saturated system where all servers are busy during an interval of time . The number of customers leaving the system during the time follows a Poisson distribution with mean . Let = the number of customers in the system immediately before an arrival, then:
From the theorem of total probability and the PASTA property of Poisson distributions:
The probability that a customer will be served within a target time is given by:
A practical question is the number of servers required to supply a given service level. To answer this question a model is build with , and as parameters and and as outputs. By changing the number of servers one can check the service level and the server utilisation to decide the ideal numbers.
Recalling that customer arrivals follow a Poisson process with mean arrival rate it is important to note that customer arrivals are not evenly distributes throughout the day. The following picture shows a typical arrival pattern over 8 hours.
Calculating the number of servers to meet an average customer arrival rate over the entire range will result in periods where the service level is not achieved. To alleviate this situation only the peak period is used to decide . This results in periods of under utilisation .
The mean service time is also determined over the entire range of services. To model the provision of services with different durations by shared servers, each service can be modelled using the total number of servers. The number of servers can then be adjusted to offer the desired service provided that the total utilisation is not exceeded so the system operates in a stable state:
We have discussed the M/M/c or Blocked customers delayed model, and is the departure point for the analysis of more complex situations such as priority queues and abandonment. All these models can be analysed using similar techniques to those described in this article.
The system parameters are:
- Customer arrival rate
- Mean service time
- Number of servers
The performance of the system is characterised by:
- The probability that a customer has to wait
- The mean waiting time
- The probability that a customer will be served within a target time
- The server utilisation
Cooper, R. (1981) “Introduction to Queuing Theory”
Kleinrock, L. (1975) “Queuing Theory”