02 Basics of Queueing Analysis - S - Modified
02 Basics of Queueing Analysis - S - Modified
Mumen Rababah
Industrial Engineering
Department
The Hashemite University
Typical Queueing System – Urgent Care Clinic
2
Arrival Queue Departure
process discipline c process
(A)
Service
mechanism
(S)
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 0.00, Initialize
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [1, 0.00, Arr]
0.00 0 0 <empty> [–, 20.00, End]
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 0.00, Arrival of Part 1
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [2, 1.73, Arr]
1 0.00 1 0 <empty> [1, 2.90, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
1 0.00 0.00 0.00
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 1.73, Arrival of Part 2
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [1, 2.90, Dep]
2 1 1.73 1 1 (1.73) [3, 3.08, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
1 0.00 0.00 1.73
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 2.90, Departure of Part 1
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [3, 3.08, Arr]
2 2.90 1 0 <empty> [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.17 2.90
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 3.08, Arrival of Part 3
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [4, 3.79, Arr]
3 2 3.08 1 1 (3.08) [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.17 3.08
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 3.79, Arrival of Part 4
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [5, 4.41, Arr]
4 3 2 3.79 1 2 (3.79, 3.08) [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.88 3.79
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 4.41, Arrival of Part 5
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [2, 4.66, Dep]
5 4 3 2 4.41 1 3 (4.41, 3.79, 3.08) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 3.12 4.41
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 4.66, Departure of Part 2
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [3, 8.05, Dep]
5 4 3 4.66 1 2 (4.41, 3.79) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
3 2.75 3.87 4.66
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 8.05, Departure of Part 3
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [4, 12.57, Dep]
5 4 8.05 1 1 (4.41) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
4 7.01 10.65 8.05
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 12.57, Departure of Part 4
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [5, 17.03, Dep]
5 12.57 1 0 () [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
5 15.17 15.17 12.57
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 17.03, Departure of Part 5
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [6, 18.69, Arr]
17.03 0 0 () [–, 20.00, End]
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 18.69, Arrival of Part 6
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [7, 19.39, Arr]
6 18.69 1 0 () [–, 20.00, End]
[6, 23.05, Dep]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.17 17.03
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 19.39, Arrival of Part 7
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [–, 20.00, End]
7 6 19.39 1 1 (19.39) [6, 23.05, Dep]
[8, 34.91, Arr]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.17 17.73
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
t = 20.00, The End
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [6, 23.05, Dep]
7 6 20.00 1 1 (19.39) [8, 34.91, Arr]
4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20
Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...
Simulation by Hand:
Finishing Up
• Average waiting time in queue:
I1 I2 I3 I4 I5
0 A1 A2 C1 C2 A3 A4 A5 C3 C4 C5 time
S1 S2 S3 S4 S5
Wq2 Wq4
Wq5
n n
W qi W i
Wq lim i 1
W lim i 1
n n n n
Steady state average Steady state average
delay in the queue waiting time in the system
Queuing Systems
I1 I2 I3 I4 I5
0 A1 A2 C1 C2 A3 A4 A5 C3 C4 C5 time
S1 S2 S3 S4 S5
L(t)
How to compute ?
3
2
1
0
A1 A2 C1 C2 A3 A4 A5 C3 C4 C5 time
Queuing Systems
T T
L lim
0
L(t )dt
Lq lim
0
Lq (t ) dt
T T T T
Steady state time-average Steady state time-average
number in the system number in the queue
Lq Wq
L W (Little’s Law)
Conservation equations
Queuing Systems
• Common assumptions/definitions: • Kendall’s Notation
– c servers with a single queue with – A/B/c/k
FIFO ordering
– Examples:
– A1, A2, …, An are IID random variables • M/M/1
• l is the arrival rate • M/M/3
– S1, S2, …, Sn are IID random variables • G/G/1
– Wi = Wqi + Si is the waiting time in the system for the ith customer
M / M /1 M /M /c
1
c c c 1
c
n
p(0) 1
c! 1 n 0 n!
c p(0)
c
2
Lq
c! 1
2
1
L Lq
1
Wq
c c p(0)
1 c! c 1
2
1
Manufacturing Systems, John Wiley
& Sons, New York, NY, 1993.
Element ρ L W Lq Wq
A 0.6250 1.6667 0.0833 1.0417 0.0521
B 0.7500 3.0000 0.2500 2.2500 0.1875
C 0.4444 1.1077 0.1385 0.2188 0.0274
System N/A 5.7744 0.2887 3.5105 0.1755
34