2022-09-01

Author

Witek ten Hove

Lectures Queuing Theory

Poisson distribution

Definition

Assumptions:

  • All numbers of arrival come from the same distribution
  • The numbers of arrival are independent from each other

The arrival rate \(\lambda\) is the average number of arrivals per unit of time (eg. patients per hour). The average inter-arrival time is \(\frac{1}{\lambda}\).

The service time \(\mu\) is the average number of clients a server is able to handle per unit of time if it is always busy (e.g. the number of patients handled by a physician). The average service time equals \(\frac{1}{\mu}\).

The offered load, \(\rho\), is defined as:

\[ \rho=\frac{\lambda}{\mu} \]

The unit of \(\rho\) is Erlang and is dimensionless. In a stable queue the rate of clients arriving is lower than the rate at whih clients are served. Otherwise the system is overloaded. So, queue will be stable when:

\[ \rho<1 \]

import numpy as np
import math
import plotly.express as px
import matplotlib.pyplot as plt
from IPython.display import display, Markdown

l = 1
title = "$$P(U_i \geq u)=e^{- \lambda u} \ with \ \lambda = 2 $$"
u = np.arange(7)
P = np.array([math.exp(-1*l*num) for num in u])

display(Markdown(title))
fig = px.line(x=u, y=P)
fig.show()

\[P(U_i \geq u)=e^{- \lambda u} \ with \ \lambda = 2 \]

Memoryless property

Minimum of two independent variables

Let \(U \sim e^ \lambda\) and \(S \sim e^ \mu\). Assume that \(U\) and \(S\) are independent.

mintwovar

Let:

\[ Z=min(U,S)\\, so \ that: \]

\[ Z=U \ if \ U \leq S \]

\[ Z=S \ if \ U >U \] Then:

\[ P(Z=U) = P(U \leq S)=\frac {\lambda}{\lambda + \mu} \\ \]

\[ P(Z=S) = P(U > S)=\frac {\mu}{\lambda + \mu} \]