Queues
Queues
Plan
Plan de Systems
de Formación
Formación (40h)
(40h)
Lecture 3. Queues
Learning
• Learning goals: Ability to estimate, describe and charcaterize how
vehicles, people and goods overcome time by a transport system with one or
more bottlenecks. Ability to calculate waiting times, service times and queue
lenghts in queueing systems from cumulative-time diagrams.
• Previous knowledge: Probability. Distribution of arrival times, expected
values and variance of random variables with a known distribution. Markov
chains.
• Exercices or cases: Queues in highways, Management of vehicles in a
concrete plant, toll-booths in highways.
1
Index
• Introduction to operations
• Queueing systems
– Components
– Diagrams
– Processes
– Disciplines
• Little’s formula
• Examples and applications
• Stochastic queues theory
• Duality (s-t) vs (N-t)
Real queues
2
Real queues
Wq Ws
3
Queue system: Components
SYSTEM
STORAGE SPACE
ARRIVALS CONSTRAINT DEPARTURE
POPULATION QUEUE
Components:
• Customer EXAMPLES:
• Queue discipline 7
4
Cumulative diagrams
CUMULATIVE
NUMBER OF
CUSTOMERS
Waiting
In service
CUSTOMERS 1
IN SERVICE
0 TIME
9
1
N (t)
(Cumulative
number of Q 𝑑𝐴(𝑡)
customers) 𝜆(𝑡) =
A(t) D(t) 𝑑𝑡
N
𝑑𝐷(𝑡)
𝜇(𝑡) =
1 𝑑𝑡
time T
10
5
System configuration
Queue
Fast lane
Regular queues
SERIES COMBINATION
11
Queue disciplines
DISCIPLINE BEHAVIOUR
- Emergency - Abandonment
- Priority - Jump
- FCFS / FIFO - Cycle
Same E(W), with
- LCFS / LIFO different var(W) - Combination
- SIRO - Division
- SST (shortest service time) - …
- EDDF (earliest due date first)
- SWST (shortest weighted service time)
- RR (round Robin)
6
Queue length and Waiting time
Queue length:
Lq (t): Number of cutomers on the queue at time t. Lq(t)= A(t)-Dq(t)
Ls(t): Number of customers in the system at time t. Ls(t)=A(t)-Ds(t)
W s(t): Total waiting time in the system, 𝑊𝑠 𝑡 = ∫ 𝐴 𝑡 − 𝐷 (𝑡) 𝑑𝑡
Then: A(t) ≥ Dq(t) ≥ Ds(t) t≥0
Maximum length (longest vertical distance) and waiting time (longest horizontal distance)
A-1(n) , Dq-1(n) , Ds-1(n) are arrival time, departure time from the queue, departure time
from the system for the customer n. 13
Transport operations s
• Trajectories (in movement)
– Speed, acceleration, etc. Dual analysis of
movement
t
• Queues (waiting)
– Waiting time, average
and maximum queue,
N
etc. (Acum.
A(t)
number)
Ds(t) N
A(t): Acumulated arrivals of clients from 0 to t
Ds(t): Acumulated departures of clients from 0 to t
T time 14
7
Trajectories and 3D acumulated diagrams
15
DECISIONS: COSTS:
- ADEQUATE LEVEL OF SERVICE SERVICE
- NUMBER OF SERVERS - CONSTRUCTION/INVESTMENT
- EFFICIENCY OF SERVERS - OPERATION
- PRIORITY OF SERVICE - MAINTENANCE, ETC.
- OPENING HOURS WAITING
- STORAGE SPACE (MAX. QUEUE LENGTH) - VALUE OF TIME
16
8
Optimization
Cost
Optimization:
• Cost of resources TOTAL
COST
• Cost of the queue Cost of
service
MIN
Cost of
waiting
17
Equilibrium ρ < 1
18
9
Deterministic queues
Queue generation :
19
1
N (t)
(Cumulative
number)
Dq(t)
A(t) Ds(t)
Average queue = Total Delay/T
N
Average waiting = Total Delay/N
1
𝐿 =𝜆𝑤
𝐿 =𝜆𝑤 Time
0 T
20
10
Serial Queues (tandem)
A(t) Dn(t)
D1(t)=A2(t) D2(t)
Examples:
Initial queue
...UNTIL ONE CAPACITY
CONSTRAINT IS VIOLATED
Cum.
Num.
Time
22
11
Parallel servers (I)
Queue Server
Arrivals
Server
Queue
Server
Queue
Arrivals
Server
Queue
Server
23
POINT
OF SERVICE
SERVER’S QUEUE
As(t)
Cumulated
Number Ds(t)
Ac(t)
12
Deterministic queues
Examples
25
Cost
TOTAL
COST
Cost of service
MIN
Cost of waiting
13
Bus bunching
Cumulative 1
number of pax λ
Hn
H3
𝑇𝑜𝑡𝑎𝑙 𝑑𝑒𝑙𝑎𝑦 (𝑎𝑟𝑒𝑎 𝑜𝑓 𝑎𝑙𝑙 𝑡𝑟𝑖𝑎𝑛𝑔𝑙𝑒𝑠)
<𝑤 >=
H2 𝑃𝑎𝑠𝑠𝑒𝑛𝑔𝑒𝑟𝑠 𝑡ℎ𝑎𝑡 𝑤𝑎𝑖𝑡𝑒𝑑 𝑖𝑛 𝑡ℎ𝑒 𝑏𝑢𝑠 𝑠𝑡𝑜𝑝
Var ( X ) E ( X 2 ) E 2 ( X ) H1 Time
2
2
n 1
2 H i2
Hi
H i H i
2
w in i i i
H var( H )
n 2 H
Hi 2 Hi
i 1 i 1
<𝑤 >= 1+ ≥
27
Bus bunching
Bus bunching offers worst service….
…. at same cost
Trajectory bunching: Do not open
bus doors
Waiting time increases with CV2
of the headway
Variable headways increase the
user’s waiting time even though
the average headway remains
constant
Variable compensation of delay
controllers (3%) to minimize
headways variance (TMB)
28
14
Accident in highway
Additional queue due to an accident
Cumulative
number of A(t)
vehicles
Incident Time
2 lanes in use
Reestablishment
of 3 lanes
Cumulative
vehicles
n’
n
λ µmax
r g r t
𝐴 𝑟𝑛/2 𝜇 𝑟 /2
𝑤= = =
𝑛′ 𝑛′ 𝐶(𝜇 − 𝜆)
30
15
Queues at traffic lights
INTERSECTION
(i=1)
(i=2)
μ r 2
w 1 i i
i 2 C (μ λ )
i i
Cycle : C = g1 + g2 + l
l: amber + clearance (all red)
r1= g2 + l/2 ; r2= g1 + l/2
31
PROFESSIONAL PRACTICE:
LoS w
i
λ
i
μ A <5”
g (C l)
i 2 B 5-15”
λ j μ j
j1
…
E 40-60” HCM
Proportional to utilization factor F >60”
Flows for the quarter of rush hour
32
16
Serial servers: Double-deck bus stop
A bus stop with two platforms: In case of one platform:
BUS 0
BUS 2
BUS 1
𝐸 𝐻 = 𝐸 𝑅 + 𝐸 𝑃 + 𝐸(𝐷)
𝐶= capacity
Service Service ( )
position 2 position 1
In case of 2 platforms:
Distance
Service Service
position 1 position 1
Service Bus 0 Service Bus 0
position 2 position 2
Waiting Bus 1 Waiting Bus 1
position 1 position 1
Waiting Bus 2 Waiting
Bus 2
position 2 position 2
R’1 R’2 P’2 D’2 R’1 P’1 D’1 R’2
H’ H’
Time Time
𝐻′ = max( 𝑅 + 𝑅 +𝑃 + 𝐷 , 𝑅 + 𝑅 +𝑃 + 𝐷 )
𝐶 = ∆𝐶 = −1= − 1= −1
∆ ,
Given two stop times Di independents, function of distribution of the maximum value is:
𝐹 , 𝑥 = 𝑃 max 𝐷 , 𝐷 ≤ 𝑥 = 𝑃 𝐷 ≤ 𝑥 𝑃 𝐷 ≤ 𝑥 = 𝐹 𝑥 then,
12
10
0
0 10 20 30 40 50
Dwell time (seconds)
70
65
E(S)=30 s
60
Increase of Capacity (%)
25 s
55
50 20 s
45 15 s
40
10 s
35
30
0 5 10 15 20 25 30 35 40 45
Standard Deviation of Dwell Time (seconds)
34
17
Queues at PT stops
Loading: all links of the chain are important
1
CAPACITY test before Olympics’92 Cum. #
Stochastic models
36
18
Total time in the system
“It is better to have stochastic service time than stochastic arrivals”
Total time in
the system
S/S
S/D
D/S
1/µ
D/D
ρ
0 1 Traffic intensity
D: DETERMINISTIC; S: STOCHASTIC
Total time in
the system
M/M/n
n Number of servers
1/µ
1 ρ
Stochastic models
- Unknown numerically arrival and departure curves.
19
Stochastic Models
NOMENCLATURE A: arrival process; B: service time distribution
𝐿 = (𝑛 − 𝑐)𝑃
Queueing management
40
20
Queuing management
Reduction of delays
CHANGES IN SERVICE
- SERVICE IN TEAM: Free server helps
- FLEXIBLE ASSIGNMENT
- AUTOMATIZED SERVICE
- REDUCTION OF CUSTOMER PARTICIPATION
- CUSTOMER PARTICIPATION: e.g. gas station, forms, packing in supermarket.
- SIMULTANEOUS SERVICE: meanwhile a customer decides or participates.
- SERVICE IN GROUPS: similar customers e.g. Medical prescriptions in Social Security
services
- ALTERNATION OF CUSTOMER TYPES: e.g. Pick up + delivery “messengers”
- INCREASING THE NUMBER OF SERVERS: Part-Time
- ELIMINATION OF PREDICTABLE QUEUES
- TEMPORARY INCREMENT OF CAPACITY (RESOURCES ASSIGNMENT)
41
Queuing management
Reduction of delays
CHANGES IN ARRIVALS
- RESERVATIONS AND APPOINTMENTS e.g. Restaurant, doctor
- PRICE e.g. Automatic discounts on Sunday from 8 to 12 h (Macy’s, USA)
- UNDERLYING ARRIVAL PROCESS: Flextime
- ABANDONMENT: Info. traffic dynamics, radio
-PSYCHOLOGY
- Entertainment: comfort, performances
- Information: reasons+ info.+ remember they have not been forgotten
- Equity
- PHYSIOLOGY
- Noise
DESIGN - Lighting
- Ventilation / temperature: water in queues under the sun
- Agglomerations
-QUEUING DISCIPLINE
- Passive maintenance
- Active maintenance
- QUEUE DESIGN Avoid demoralization
42
21
Conclusions
43
Referencias
44
22
Transport
Plan
Plan de Systems
de Formación
Formación (40h)
(40h)
Lecture 3. Queues
23