Basics of queuing theory applied to calculate average waiting time

Explanation of queuing theory, along with the characteristics, math and formulas to calculate the average waiting time your customers face

Published on November 22nd, 2017

Blog post image

What is a Queuing System? A flow of customers from a finite or infinite population towards your service facility forms a queue on account of lack of capability to serve them all at the same time. To manage this, you must have a queue system that consists of customers arriving for service, waiting for service if it is not immediate, and leaving the system after being served.

There is a complete explanation of queuing theory below, along with the characteristics, math and formulas that you need to calculate these factors. But if you simply want to calculate the average waiting time your customers are facing, make use of this M/M/1 queuing theory calculator below.

Elements of Queuing System

Input process

The pattern in which customers arrive in the system.

Size of the queue

The size of the input service is either finite or infinite.

Arrival distribution

The pattern in which the customers arrive at the service system or inter-arrival time. The most common stochastic models use Poisson distribution for arrival rate and/or exponential distribution for inter-arrival times.

Customer’s behaviour

Customers may wait in the queue regardless of its length, or they may leave upon observing the queue's length.

Queue Discipline

  • FIFO – First In First Out
  • FCFS – First Come First Served
  • LIFO – Last In First Out

Service Mechanism

  • Single queue and one server
  • Single queue and several servers
  • Several queues and one server
  • Several servers

Capacity of the Queuing System

A finite source limits the customers arriving for service, while an infinite source is forever abundant and unrestricted.

Operating Characteristics

E(n) or L

Expected number of customers in the system

E(m) or Lq

Expected number of customers in the Queue

W

Expected waiting line in the system

Wq

Expected waiting time in the queue

Service Utilisation Factor (P = λ/µ)

The proportion of time that a server actually spends with a customer where λ is the average number of customers arriving per unit of time and µ is the average number of customers completing service per unit time.

Probability Distributions

Models counting only arrivals are "pure birth" models. Queuing theory typically involves "birth-death" processes, as new customers increase arrivals while service completions decrease the count via departures.

Distribution of Arrivals

Let Pn(t) be the probability of n arrivals in a time interval of length t (n ≥ 0). Assuming a Poisson process with mean λt:

Pn(t) = (λt)neλt n! ,n0

Distribution of Inter-arrival Times

If the arrival process follows a Poisson distribution, the time between successive arrivals follows an exponential distribution:

f(t) = λeλt ,t0

Distribution of Departures

For N customers at t=0, with departures at rate µ, the probability Pn(t) of n customers remaining is the Truncated Poisson distribution:

Pn(t) = (μt)Nneμt (Nn)! ,1nN
P0(t) = 1 n=1 N Pn(t)

Distribution of Service Times

The probability for completing the service of n customers in time t follows the exponential distribution:

s(t) = μeμt ,t0

Classification of Queuing Models

Models are typically described as (a / b / c) : (d / e)

a

Inter-arrival time distribution

b

Inter-service time distribution

c

Number of servers

d

System capacity

e

Queue discipline

Model 1: (M/M/1) : (∞/FIFO)

This model features a single server channel, Poisson input, exponential service, infinite capacity, and First-In-First-Out discipline.

Key Characteristics (ρ = λ/µ)

Avg. customers in system E(n) λμλ
Avg. queue length E(m) ρ21ρ
Avg. waiting time E(w) λμ(μλ)
Total time in system E(v) 1μλ

By Neel Padmanabhan November 22nd, 2017