Waiting time paradox Simulation Bus example: Waiting time paradox Stochastic variable T: Lecture time between two subsequent bus departures average waiting time = 12 (1 + cT2 ) E (T ) Queuing theory `mathematics of waiting’ 1 3/19/2012 Simulation, queueing theory cT = 2 Queuing system 3/19/2012 σ (T ) E (T ) variation coefficien t Simulation, queueing theory Queuing systems: examples Network of servers and queues Uncertainty in arrival patterns of customers Production line with buffers Luggage handling system at Schiphol and in service times Dynamic bus station Terminal layout at airport Example question: how do waiting times Planning trucks at gates at HEMA DC depend on system design? Design of a the lay-out of a warehouse Easy cases: formulas from queuing theory Hard cases: discrete-event simulation 3 3/19/2012 Simulation, queueing theory Planning of a distribution network Inventory management 4 3/19/2012 Simulation, queueing theory Psychological approach Queue notation (Kendall) a|b|c|d Perception of waiting a: arrival pattern b: service times c: number of Expectation of waiting “Appreciation= Perception - Expectation” servers d: capacity of queue M: exponential G: general distribution D: deterministic Examples: M|M|1, M|G|1, M|M|c 5 3/19/2012 Simulation, queueing theory 6 3/19/2012 Simulation, queueing theory Little’s formula PASTA assume infinite waiting capacity Poisson arrivals see time averages L = λW W = Wq + E ( B ) On the long run: Lq = λWq fraction of customers seeing a certain state = fraction of time that system is in that state L : average number of items in system W : average throughput time Lq : average queue length Wq : average waiting time 7 3/19/2012 Simulation, queueing theory 8 3/19/2012 Simulation, queueing theory M|M|1 queue (2) M|M|1 queue λ= E( B) λ 1 1 = , ρ= , µ= E( A ) µ E( B) E( A ) 1 queue, 1 server A, S exponential distribution (=high variance) p j = (1 − ρ )ρ j L= Long-term average number of clients in the ρ 1− ρ W= system 1 µ(1 − ρ) L= ρ Wq = µ(1 − ρ) ρ2 Lq = 1− ρ ρ 1− ρ High variation: L Plan more careful !! If FIFO discipline : Wq ( x ) = 1 − ρe −µ (1−ρ ) x ρ 9 3/19/2012 Simulation, queueing theory 10 3/19/2012 1 Simulation, queueing theory British study: Why is the queue before the gentlemen’s toilet so much longer than the queue before the ladies toilet? M|G|1 queue ρ = λE (B) Pollaczek - Khintchine ρ2 L q = (1 + c ) (1 − ρ ) ρE (B) W q = 12 (1 + c B2 ) (1 − ρ ) 1 2 11 3/19/2012 2 B Simulation, queueing theory cB = σ (B) E (B) 12 Arrival: Poisson process Arrival: Poisson process with rate λ Average length of stay: mg = 89 sec Variation coefficient cg ≥ cl with rate λ Average length of stay: ml = 39 sec Variation coefficient cl 3/19/2012 Simulation, queueing theory