E N D
BU275 Business Decision Models Lectures 11, 12 & 13 Waiting Line Models
Agenda • Waiting Line Models; Exponential & Poisson Probability Distributions • Waiting Line System Structure • Input Characteristics • Operating Characteristics • Analytical Formulas • Single-Channel Model with Poisson Arrivals & Exponential Service Times • Multiple-Channel Model with Poisson Arrivals & Exponential Service Times • Economic Analysis
Objectives • Understand queuing concepts • Understand basic models & formulae used • Be able to mathematically model and analyze a specific situation (single channel, single phase) • Understand multichannel models • Capable of using formulae for the basic multichannel model • Understand and competent in completing an economic analysis of a queuing situation
Queuing Examples • What are some waiting line situations you’ve experienced? • Describe your situation • arrivals • service • queue discipline • Are there other waiting line situations? • Why is it important to study waiting lines?
Waiting Line Systems • Queuing theory is study of waiting lines • Characteristics of a queuing system: • size of calling population (infinite, finite) • pattern in which customers arrive • behaviour of arrivals (patient, balk, renege) • waiting line (limited or unlimited capacity) • priority determining order of service • time required for service • number & configuration of servers in system • number of phases (service stops)
Psychological Principles of Waiting • Unoccupied time feels > occupied time • Pre-service waiting feels > in-service waiting • Anxiety makes waiting seem longer • Uncertain waiting is > known, finite waiting • Unexplained waiting is > explained waiting • Unfair waiting is > fair waiting • Solo waiting is > group waiting • The more valuable the service, the longer it is worth waiting for • Give people something to do while waiting
Basic Queuing Configurations: Single Channel, Single-Phase System Queue Arrivals Service Facility Departures Departures Type 1 Service Facility #1 Type 2 Service Facility #1 Arrivals Departures Type 1 Service Facility #2 Type 2 Service Facility #2 Multi-Channel, Multi-Phase System
Basic Configurations (cont.): Single Channel, Multi-Phase System Queue Type 1 Service Facility Type 2 Service Facility Arrivals Departures Service Facility #1 Departures Service Facility #2 Arrivals Departures Multi-Channel, Single-Phase System Service Facility #3 Departures
Arrival & Service Distributions • In general, arrival of customers into system is a random event • Frequently arrival pattern is modeled as a Poisson process • Service time is also usually a random variable • Distribution commonly used to describe service time is exponential distribution • Most common queue discipline is first come, first served (FCFS)
Poisson Probability Distribution • Poisson Probability Function: x = 0, 1, 2, … f(x)= prob. of x occurrences in an interval l = mean # of occurrences in an interval e = 2.71828 • use POISSON(k, l, cum), or calculate • Excel demo; cum = 0 or 1 (point or cumulative prob; discrete dist.)
*Exercise (Poisson) • Trucks arrive at a border crossing at a rate of 100/hr (Poisson dist.) • What is the average time between arrivals? • What is the probability of exactly 100 trucks arriving in the next hour? • What is the probability of fewer than 50 trucks arriving in the next hour? • What is the probability 50 – 150 trucks (inclusive) arriving?
Exponential Prob. Distribution • Exponential Prob. Density Function for x> 0, l > 0 where l = 1/m = rate e = 2.71828 • Cumulative Exponential Dist. Func. where x0 = some specific value of x • use EXPONDIST(x, lambda, cum) • Excel demo; cum = 1 always; cont. dist.
* Exercise (Exponential) • Inspection at this border crossing takes an average of 5 minutes (Exp. dist.) • What is the “service rate” (per hour)? • What is the probability an inspection will take precisely 5 minutes? • What is the probability an inspection will take more than 10 minutes? • What is the probability an inspection will take between 2.5 and 7.5 minutes?
Example: SJJT, Inc. (A) Joe Ferris is a specialist trader on the floor of the Toronto Stock Exchange for the firm of Smith, Jones, Johnson, & Thomas, Inc. Transactions arrive at a mean rate of 20 per hour (Poisson distribution). Each order received by Joe requires an average of two minutes to process (Exponentially distributed).
Example: SJJT, Inc. (A) • Arrival Rate Distribution (Poisson) Question:What is probability that no orders are received within a 15-minute period? Answer:Orders arrive at a mean rate of 20 per hour. In a 15 minute interval, average # of orders arriving will be l = 20/4 = 5. P(x) = (l xe-l)/x! P(0) = (50e - 5)/0! = e - 5 = .0067 = POISSON(0, 5, 0)
Example: SJJT, Inc. (A) • Arrival Rate Distribution (Poisson) Question:What is the probability that exactly 3 orders are received within a 15-minute period? Answer: P(3) = (5 3 e - 5)/3! = 125(.0067)/6 = .1404 = POISSON(3, 5, 0)
Example: SJJT, Inc. (A) • Arrival Rate Distribution (Poisson) Question:What is the probability that more than 6 orders arrive within a 15-minute period? Answer: P(x > 6) = 1 - [P(0) + P(1) + P(2) + P(3) + P(4) + P(5) + P(6)] = 1 - .7622 = .2378 = 1 - POISSON(6,5,1)
Example: SJJT, Inc. (A) • Service Rate Distribution (Exponential) Question: What is the mean service rate per hour Answer:Since Joe Ferris can process an order in an average time of 2 minutes (= 2/60 hr.), then the mean service rate, µ, is µ = 1/(mean service time), or 60/2 = 30/hr. (watch your units, and be consistent)
Example: SJJT, Inc. (A) • Service Time Distribution (Exponential) Question:What % of orders will take less than one minute to process? Answer: Since units are expressed in hrs, P(T < 1 minute) = P(T < 1/60 hour) Using exponential distribution, P(T < t) = 1 - e-µt Hence, P(T < 1/60) = 1 - e-30(1/60) = 1 - .6065 = .3935 = EXPONDIST(1/60, 30,1)
Example: SJJT, Inc. (A) • Service Time Distribution (Exponential) Question:What percentage of orders will be processed in exactly 3 minutes? Answer:Since the exponential distribution is a continuous distribution, the probability a service time exactly equals any specific value is 0.
Example: SJJT, Inc. (A) • Service Time Distribution (Exponential) Question: What proportion of orders will require more than 3 minutes to process? Answer:Proportionof orders requiring more than 3 minutes to process is: P(T > 3/60) = e -30(3/60) = e-1.5 = .2231 = 1- EXPONDIST(3/60, 30, 1)
Queuing System Notation • Three part code of form A/B/s used to describe various queuing systems • A identifies arrival distribution, B the service (departure) distribution & s the number of servers • Frequently used symbols for arrival & service processes: M - Markov distributions (Poisson/Exponential), D - Deterministic (constant), G - General distribution (known mean & variance) • e.g., M/M/k refers to a system in which arrivals occur according to a Poisson distribution, service times follow an Exponential distribution and there are S servers working at identical service rates
Memoryless property • If the time until the next arrivalis independent of the time of the last arrival, then the system has no control over when customers will arrive (i.e., interarrival times are completely unpredictable). • This means that the probability I wait 5 minutes (for the next customer to come) is the same as the probability that I wait additional 5 minutes, given that I have already waited 10 minutes. (i.e., future state of the system only depends on the present state and not the past) This property is called Memoryless/Markovian property.
Memoryless property • Interarrival time in many real-world queueing systems has memoryless property. • If memoryless property holds: • Interarrival times are modeled using Exponential distribution function & • Arrivals are modeled using Poisson distribution function. Arrival defines the way customers enter the system.
Input Characteristics l = average arrival rate 1/l = average time between arrivals µ = average service rate for each server 1/µ = average service time l /(s µ) = = utilization factor) NB: l for arrival rate; µ for service rate
Operating Characteristics P0 = prob. service facility is idle Pn = prob. ofn units in system Pw = prob. arriving unit must wait Lq = avg # of units in queue awaiting service L = avg # of units in system Wq = avg time a unit spends in queue awaiting service W= avg time a unit spends in system
Analytical Formulas • For nearly all queuing systems, there is a relationship between average time a unit spends in system or queue & average # of units in system or queue. These relationships, known as Little's flow equations are: L = lW and Lq = lWq • When queue discipline is FCFS, analytical formulas have been derived for several different queuing models including the following: M/M/1, M/M/k, M/G/1, M/G/k with blocked customers cleared, and M/M/1 with a finite calling population • Analytical formulas are not available for all possible queuing systems. In this event, insights are usually gained through a simulation of the system.
Example: SJJT, Inc. (A) • M/M/1 Queuing System Joe Ferris is a stock trader on the floor of the Toronto Stock Exchange for the firm of Smith, Jones, Johnson, and Thomas, Inc. Stock transactions arrive at a mean rate of 20 per hour. Each order received by Joe requires an average of two minutes to process.
Example: SJJT, Inc. (A) • Average Time in System ( W ) Question:What is average time an order must wait from time Joe receives order until it is finished being processed (i.e. its turnaround time)? Answer: This is an M/M/1 queue with l = 20 per hour & m = 30 per hour. Average time an order waits in the system is: W = 1/(µ - l ) = 1/(30 - 20) = 1/10 hour or 6 minutes
Example: SJJT, Inc. (A) • Average Length of Queue ( Lq ) Question:What is the average # of orders Joe has waiting to be processed? Answer: Average # of orders waiting in queue is: Lq = l2/[µ(µ - l)] = (20)2/[(30)(30-20)] = 400/300 = 4/3
Example: SJJT, Inc. (A) • Utilization Factor ( ) Question:What percentage of time is Joe processing orders? Answer: % of time Joe is processing orders is equivalent to utilization factor (), l/m. Thus, % of time he is processing orders is: l/m = 20/30 = 2/3 or 66.67%
* Class Exercise • Work in pairs • Single server system, infinite calling population, FIFO queue discipline • Poisson arrivals, 16 customers/hr • Exponential service, 24 customers/hr Find P0, P3, L, Lq, W, Wq, and r
Example: SJJT, Inc. (B) • M/M/2 Queuing System Smith, Jones, Johnson, & Thomas, Inc. has begun a major advertising campaign which it believes will increase its business 50%. To handle the increased volume, the company has hired an additional floor trader, Sue Hanson, who works at the same speed as Joe Ferris. Note that the new arrival rate of orders, l , is 50% higher than that of problem (A). Thus, l = 1.5(20) = 30 per hour.
Example: SJJT, Inc. (B) • Sufficient Service Rate Question: Why will Joe Ferris alone not be able to handle the increase in orders? Answer:Since Joe Ferris processes orders at a mean rate of µ = 30 per hour, then l = µ = 30 and utilization factor is 1. This implies queue of orders will grow infinitely large. Hence, Joe alone cannot handle this increase in demand.
Example: SJJT, Inc. (B) • Probability of n Units in System Question:What is probability that neither Joe nor Sue will be working on an order at any point in time? Answer:Given l = 30, µ = 30, S = 2 & l/µ = 1, prob. that neither Joe nor Sue will be working is: = 1/{[1+(1)1/1!]+[(1)2/2!][2(30)/(2(30)-30)]} = 1/(1 + 1 + 1) = 1/3
Example: SJJT, Inc. (B) • Average Time in System Question:What is average turnaround time for an order with both Joe & Sue working? Answer:Average turnaround time is average waiting time in system, W (l/µ)S+1(30/30)3 Lq = P0 = (1/3)=1/3 S(S)!(1- λ/Sμ)2 2(2!)(1 – 30/2x30)2 L = Lq + (l /µ) = 1/3 + (30/30) = 4/3 W = L/l =(4/3)/30 = 4/90 hr = 2.67 min.
Example: SJJT, Inc. (B) • Average Length of Queue Question:What is average # of orders waiting to be filled with both Joe and Sue working? Answer: Average # of orders waiting to be filled is Lq. This was calculated earlier as 1/3. • Utilization Factor • for s = 2, r = l / s m = 30 / (2)(30) = 0.5
Waiting Line Costs • Most problems centre around finding ideal level of service that firm should provide • Level of service is usually an option over which management has control • Want to find balance between two extremes • Trade-off must take place between cost of providing good service, cost of customer waiting time, customer retention, .… • Look at total expected cost (service, waiting, other)
Improving Performance • Change queue discipline • prioritize clients; any examples? • Change queue configuration • single queue lowers average wait • Improve service rate • more channels • faster channels (technology, self service, ...)
Example: SJJT, Inc. (C) • Economic Analysis of Queuing Systems The advertising campaign of Smith, Jones, Johnson & Thomas, Inc. was so successful that business actually doubled. The mean rate of special orders arriving at the exchange is now 40/hr and the company must decide how many floor traders to employ. Each floor trader hired can process an order in an average time of 2 min. Based on a number of factors the brokerage firm has determined the average system waiting cost/minute for an order to be $0.50. Floor traders hired will earn $20/hr in wages & benefits. Using this information compare the total hourly cost of hiring 2 traders with that of hiring 3 traders.
Example: SJJT, Inc. (C) • Economic Analysis of Waiting Lines Total Hourly Cost = (Cost of service) + (Cost of waiting) = (Cost/trader)(# traders) + (Wait cost)(# orders/hr)(avg wait/order) = $20s + $30l W (but L = l W; Little’s Flow eqn.) = 20s+ 30L (watch units: $, hrs) Thus, L must be determined for s= 2 traders and for s= 3 traders with l = 40/hr and m = 30/hr (since the average service time is 2 minutes (1/30 hr).
Example: SJJT, Inc. (C) • Cost of Two Servers = 1 / [1+(1/1!)(40/30)1]+[(1/2!)(40/30)2(60/(60-40))] = 1 / [1 + (4/3) + (1/2)(4/3)2(6/2)] = 1/5 Thus, (l /µ)S+1 Lq = P0 = 16/15 S(S)!(1- λ/Sμ )2 L= Lq + (l /µ) = 16/15 + 4/3 = 12/5 Total Cost = (20)(2) + 30(12/5) = $112.00 per hour
Example: SJJT, Inc. (C) • Cost of Three Servers P0 = 1/[[1+(1/1!)(40/30)1+(1/2!)(40/30)2]+ [(1/3!)(40/30)3(90/(90-40))] ] = 1 / [1 + 4/3 + 8/9 + 32/45] = 15/59 Hence, Lq = 0.1446 Thus, L = 128/885 + 40/30 = 1308/885 (= 1.4780) Total Cost = (20)(3) + 30(1308/885) = $104.35 per hour
Example: SJJT, Inc. (C) • System Cost Comparison Wage Waiting Total Cost/HrCost/HrCost/Hr 2 Traders $40.00 $72.00 $112.00 3 Traders 60.00 44.35 104.35 Thus, cost of having 3 traders is less than that of 2 traders
Homework • Partially completed products arrive at a mean rate of 40/hr • Processing time averages 1.2 min/unit • Poisson arrivals, Exponential service, etc. • WIP costs $31/unit/day (on average) • For $52/day, firm can add staff & reduce processing time to 0.9 min/unit • Continue current operation or add extra employees? Show your work.
Other Waiting Line Models • M/G/1: single-channel with Poisson arrivals and arbitrary (General) service times • M/D/1: single-channel with Poisson arrivals and constant (Deterministic) service times • M/G/k with Blocked Customers Cleared: multiple-channel with Poisson arrivals, arbitrary service times, and no waiting line • M/M/1 with Finite Calling Population: single-channel with Poisson arrivals, exponential service times, and a finite calling population