An Introduction to Queueing Theory Rein Nobel Department of Econometrics, Vrije Universiteit, Amsterdam Open Middag november 20
Overview. Basic results for queueing models in continuous time: (a) delay models [Erlang-C] (b) loss models [Erlang-B] (c) retrial models (d) abandonment models [Erlang-A] 2. Models in discrete time.
A short introduction to queueing theory Queueing Theory (QT) is the science of congestion. A personal experience at New Delhi Airport while waiting in line for the immigration: (To an airport official) I: Sir, we are staying in line already for more than two hours without any visible progress! Can you please tell us what is going on? Official: No problem, Sir! There is only congestion in the queue! 2
The basic elements of a (simple) queueing model Customers (jobs) arrive (singly or in groups) at a service facility, One or more servers occupy the facility to serve customers, A waiting space (infinite or finite [physical] buffer or [virtual] orbit) for customers who cannot be served immediately upon arrival. 3
We distinguish four main characteristics of queueing models: delay models: customers wait in line until they can be served loss models: customers leave the system when they find all servers busy upon arrival retrial models: customers who do not find an idle server upon arrival leave the system only temporarily, and try to reenter some random time later abandonment models: customers waiting in line will leave the system before being served after their patience time has expired. 4
Example: M/G/ delay model: Customers arrive according to a Poisson process with rate λ [process A], There is one server and an infinite waiting space, Each customer requires a generally distributed service time S [process B], Customers who upon arrival find the server busy wait in line, The customers are served in order of arrival (FIFO), 5
A = {A n ; n =, 2,...}, B = {S n ; n =, 2,...}. A n exp(λ), S n G( ). traffic intensity: ρ = λe[s] <. { customer n has to wait in line C n = 0 otherwise D n = waiting time in the queue of customer n, Q(t) = number of customers waiting at time t. D n+ = max(d n + S n A n+, 0), D = 0. 6
Endogenous processes: C = {C n ; n =, 2,...}, D = {D n ; n =, 2,...}, Q = {Q(t), t 0}. Some well-known results for the M/G/ queue: lim n n n k= Pollaczek-Khintchine formula D := lim n n Q := lim t t n k= C k = ρ, w.p.. D k = λe[s2 ] 2( ρ) w.p. 0 Q(u)du = λ2 E[S 2 ] 2( ρ) w.p.. 7
Little s Law Q = λ D. The busy period L = length of a time interval that the server is busy uninterruptedly. E[L] = E[S] ρ
The M/M/c model [Erlang-C] Customers arrive according to a Poisson process with rate λ, There are c servers and there is an infinite waiting space, Each customer requires an exponential service time with mean /µ, Customers who upon arrival find all servers busy wait in line, Customers are served in FIFO order. 8
The Erlang-C formulae The traffic-intensity is now ρ := λ/(cµ), Π delay = IP(D > 0) = (cρ)c c!( ρ) Q = (cρ)c ρ c!( ρ) 2 c k=0 IP(D > x) = Π delay e cµ( ρ)x (cρ) k k! c k=0 (cρ) k k! + (cρ)c c!( ρ) + (cρ)c c!( ρ) D = Q λ = (cρ) c c!cµ( ρ) 2 c k=0 (cρ) k k! + (cρ)c c!( ρ) 9
Example: Erlang s Loss Model M/G/c/c [Erlang-B] Customers arrive according to a Poisson process with rate λ, There are c servers and there is no waiting space, Each customer requires a generally distributed service time S, Customers who upon arrival find all servers busy are rejected forever, R n = { customer n finds all servers busy 0 otherwise. 0
Erlang s Loss Formula [Erlang-B] E,c := Π lost = lim n n n k= R k = (λe[s])c /c! ci=0 (λe[s]) i /i!
Example: M/G/ retrial queue: Customers arrive according to a Poisson process with rate λ, There is one server and an infinite virtual waiting space (orbit), Each customer requires a generally distributed service time S G( ), Customers who upon arrival find the server busy try to reenter after an exponential time R exp(ν), { server busy at time t C(t) = 0 otherwise D n = waiting time in the orbit of customer n, Q(t) = number of customers in orbit at time t.
Some results for the retrial queue lim t t t 0 C(u)du = ρ, w.p., D := lim n n Q := lim t t n k= D k = λe[s2 ] 2( ρ) + ρ ν( ρ) w.p. 0 Q(u)du = λ2 E[S 2 ] 2( ρ) + λρ ν( ρ) w.p.. 2
The busy period in the M/G/ retrial queue L = time lapse from the start of a service while the orbit is empty until the first service completion epoch while the orbit is empty. where E[L] = E[S] ρ + ρ exp { λ ν β(s) = u β(λ( u)) 0 ν(β(λ( u)) u) } β(λ( v)) β(λ( v)) v dv du, 0 e st dg(t). 3
The Palm/Erlang-A Queue Customers arrive according to a Poisson process with rate λ, There are c servers and there is an infinite waiting space, Each customer requires an exponential service time with mean /µ, Customers who upon arrival find all servers busy wait in line to be served, Customers wait in line only an exponentially distributed time with mean /θ [patience time]. 4
Some performance measures for the Palm/Erlang-A model Introduce the incomplete Gamma function γ(x, y) := y 0 tx e t dt, x > 0, y 0, A(x, y) := xey y x γ(x, y) = + j= y i j x > 0, y 0 and k= (x + k), E,c := (λ/µ)c /c! ci=0 (λ/µ) i /i!. Then Π delay = A ( cµ θ IP(D > 0) = ) θ E,c + ( A ( cµ θ, λ ) ) θ E,c IP(Ab D > 0) = ρa ( cµ θ, λ ) + ρ. θ 5
Some relations between the performance measures From Little s Law [ Q = λ D] we get IP(Ab) = θ D, due to θ Q = λip(ab), or, equivalently, IP(Ab D > 0) = θ IE[D D > 0]. So we get IE[D D > 0] = θ D = θ ρa ( cµ θ, λ θ ρa ( cµ θ, λ θ ) + and by multiplying with IP(D > 0) ρ ) + ρ A ( cµ θ, λ ) θ E,c + ( A ( cµ θ, λ ) ). θ E,c 6