Lecture - 3
Lecture - 3
1
What is Queueing Theory
❖ Queues arise when the short term demand for service exceeds the capacity
❖ Most often caused by random variation in service times and the times
between customer arrivals.
❖ If long term demand for service > capacity the queue will explode!
2
Why is Queuing Analysis Important?
❖ Capacity problems are very common in industry and one of the main drivers of
process redesign
❖ Need to balance the cost of increased capacity against the gains of increased
productivity and service
❖ Queuing and waiting time analysis is particularly important in service systems
❖ Large costs of waiting and of lost sales due to waiting
Prototype Example – ER at a Hospital
Patients arrive by ambulance or by their own accord
One doctor is always on duty
More and more patients seeks help longer waiting times
Question: Should another MD position be instated?
3
Cost/Capacity Trade-off
Total
cost
Cost Cost of
service
Cost of waiting
Process capacity
4
Examples of Queueing Systems
❖ Commercial Queueing Systems
❖ Commercial organizations serving external customers
❖ Ex. Vehicles waiting at toll stations and traffic lights, trucks or ships waiting to be loaded, taxi
rooms …
5
Components of a Basic Queueing System
Input Source The Queuing System
Arrival
Process Queue
Queue
Discipline Service
Configuration
Process
6
Components of a Basic Queueing System
7
Components of a Basic Queueing System
Servers
❖ Specification is required and typically involves data gathering and statistical analysis.
❖ Most analytical queuing models are based on the assumption of exponentially distributed
1
1
A Commonly Seen Queueing Model
❖ Service times as well as interarrival times are assumed independent and identically distributed
❖ If not otherwise specified
❖ Commonly used notation principle: A/B/C/Capacity/Pop.size
❖ A = The interarrival time distribution
❖ B = The service time distribution
❖ C = The number of parallel servers
❖ Commonly used distributions
❖ M = Markovian (exponential) - Memoryless
❖ D = Deterministic distribution
❖ G = General distribution
❖ Example: M/M/c
❖ Queuing system with exponentially distributed service and inter-arrival times and c servers
12
Steady State Analysis of Queues
❖ Steady State condition
❖ Enough time has passed for the system state to be independent of the initial state as well as
the elapsed time
❖ The probability distribution of the state of the system remains the same over time (is
stationary).
❖ Transient condition
❖ Prevalent when a queuing system has recently begun operations
❖ The state of the system is greatly affected by the initial state and by the time elapsed since
operations started
❖ The probability distribution
With few exceptions
of the stateQueuing
of the system
Theory
changes
has focused
with time
on
analyzing steady state behavior
13
Transient and Steady State Conditions
• Illustration of transient and steady-state conditions
– N(t) = number of customers in the system at time t,
– E[N(t)] = represents the expected number of customers in the system.
30
Transient condition Steady State condition
N(t)
Number of jobs in the system, 25
20
15
N(t) E[N(t)]
10
0
0 5 10 15 20 25 30 35 40 45 50
time, t
14
Notation for Steady State Analysis
Pn = The probability that there are exactly n customers/jobs in the system (in steady
state, i.e., when t)
L = Expected number of customers in the system (in steady state)
Lq = Expected number of customers in the queue (in steady state)
W= Expected time a job spends in the system
Wq = Expected time a job spends in the queue
ρ = The utilization factor for the service facility. (= The expected fraction of the time that
the service facility is being used)
15
Little’s Formula
L W Lq Wq
Holds for all queueing systems regardless of the number of servers, queue discipline, or
arrival and service time distributions
16
The M/M/1 - Model
Assumptions - the Basic Queuing Process
Infinite Calling Populations
❖ Independence between arrivals
The arrival process is Poisson with an expected arrival rate
❖ Independent of the number of customers currently in the system
The queue configuration is a single queue with possibly infinite length
❖ No reneging or balking
The queue discipline is FIFO
The service mechanism consists of a single server with exponentially distributed service times
❖ = expected service rate when the server is busy
17
The M/M/1 - Model
Needs to be satisfied, otherwise the
❖ Steady State condition: = (/) < 1
queue length goes to infinity
18
Queuing Example 1
19
M/M/1 Example 1 - Solution
20
Queueing Example 2
❖ A university is about to lease a super computer
❖ There are two alternatives available
❖ The M computer which is more expensive to lease but also faster
❖ The waiting cost per job and time unit job is estimated to $50 per job and day
❖ Question:
❖ Which computer should the university choose in order to minimize the expected costs?
21
Example – Computer Procurement
❖ Compute expected time in system for each computer type
W days in Machine M
W days in Machine C
❖ Expected Cost is
❖ For Machine M, 1/10*20*50+500= $600 per day
❖ For Machine C, 1/5*20*50+ 350=$550 per day (Slow machine is better)
23
Poisson Processes
24
Poisson Process Example
❖ We model the arrivals of email messages at a server as a Poisson process. Suppose that on
average 330 messages arrive per minute. What would you choose for the intensity λ in messages
per second? What is the expectation of the interarrival time?
❖ Because there are 60 seconds in a minute, we have
❖ λ = (number of events) / (time unit) = 330 / 60 = 5.5
❖ Since the interarrival times have an Exp(λ) distribution, the
❖ expected time between messages is 1/λ = 0.18 second, i.e.,
❖ E(T) =1/λ = t / µ = (time unite) / (number of events) = 60/330=0.18
25
Properties of the Poisson Process
• Poisson processes can be aggregated or disaggregated and the resulting processes
are also Poisson processes
26
Disaggregating a Poisson Process
𝑁 1 ( 𝑡 ) 𝑃𝑜𝑖𝑠𝑠𝑜𝑛(𝑝 1 𝜆𝑡)
p1
𝑁 2 ( 𝑡 ) 𝑃𝑜𝑖𝑠𝑠𝑜𝑛(𝑝 2 𝜆𝑡)
N(t)~Poisson(t) p2
pm
𝑁 𝑚 ( 𝑡 ) 𝑃𝑜𝑖𝑠𝑠𝑜𝑛(𝑝𝑚 𝜆𝑡)
27