No Slide Title

Download Report

Transcript No Slide Title

Chapter 11 Queuing Models

Waiting and Managing Waiting TimeFeatures of Queuing Systems Single Server M/M/1 ModelLittle’s FormulaMultiple Server M/M/s ModelEconomic Analysis of Queues

1 - Chap 11

Waiting is Everywhere

How much time did you spend waiting for lunches/suppers

last week?

How much time did you spend waiting for buses to school

last week?

How much time did you spend waiting for a banking service?How much time did you spend waiting for checkout at

Parknshop?

Do you know how much of

your life queues?

will be spent waiting in

It will be in terms of years.

2 - Chap 11

Waiting is Everywhere

3 - Chap 11

Waiting is Everywhere

4 - Chap 11

Time Well Spent?

In a life time, an average person will spend- SIX MONTHS Waiting at stoplights EIGHT MONTHS Opening junk mail ONE YEAR Looking for misplaced objects TWO YEARS Unsuccessfully returning phone calls FOUR YEARS FIVE YEARS Doing housework Waiting in line SIX YEARS Eating 5 - Chap 11

Flow Time Examples

Industry

Life Insurance Consumer packaging Bank Hospital Automobile

Process

New policy application Graphic design Consumer loan Patient billing Car painting

Processing time

7 min 2 hrs 34 min 3 hrs 10 min Consumer electronics Mould making 36 hrs

Why are the flow times so long? flow time = waiting time + processing time Actual flow time

72 hrs 18 days 24 hrs 10 days 2 hrs 25 days

6 - Chap 11

Remember Me

The Customer

I am the person who goes into a restaurant, sits down,

and patiently waits while the wait-staff does everything but take my order.

I am the person that waits in line for the clerk to finish

chatting with his buddy.

I am the one who never comes back and it amuses me to

see money spent to get me back.

I was there in the first place, all you had to do was to

show me some courtesy and service.

7 - Chap 11

Features of Queueing Systems

Balk (No waiting) Calling Population Arrival process Renege (Waited) Queue configuration Queue discipline Service process Departure No future need for service 8 - Chap 11

Elements of a Queueing System

Calling populationSource of customers (a customer is a person or thing that wants

service from an operation)

Infinite: large enough that one more customer can always arrive to be

served

Finite: countable number of potential customersArrival rate

: average number of arrivals in unit time calculated over a long period of time, usually denoted by

l,

and the inter arrival time between two arrivals = 1/

l • Service rate

: average number of customers served by a server calculated over a long period of time, usually denoted by

m,

and the average time to serve one customer = 1/

m

9 - Chap 11

Arrival Process

Paced (deterministic) arrivals

: products off the assembly line for inspection

Random arrivals

: patients, cars for repair, calls, Internet requests

Batch arrivals

: parts for milling bus loads, arriving passengers at the airports,

Singleton arrivals

: traveler checking in at the hotel reception counter, semi-finished products to an assembly station

Inter-arrival times:

time between 2 consecutive arrivals 10 - Chap 11

Arrival Characteristics in Queues

11 - Chap 11

Service Process

Deterministic time:

beer bottling, some assembly operations,

Random time:

checking passport, repairing car engine, haircut, milling a part

Batch service:

processing bus, heat treatment of metal parts, food

Singleton service:

immigration, doctor, assembly operation 12 - Chap 11

Queue Configurations

Multiple Queues Single Queue Take a Number 3 8 6 4 11 12 10 9 5 7 2 Enter 13 - Chap 11

Factors in a Queue Discipline

14 - Chap 11

Queue elements Arrival Server

Systems with Queues

Repair center Bank branch customers customers technicians tellers Production line parts machines Queue Service time single line random multiple lines random Queue discipline FCFS FCFS: first come first served SPT: shortest processing time FCFS Airport immigration travelers officers single buffer multiple lines constant or random FCFS, SPT random FCFS 15 - Chap 11

Service Facility Arrangements

Service facility Server arrangement Parking lot Self-serve Cafeteria Servers in series Toll booths Hospital Supermarket Servers in parallel Many service centers in parallel and series, not all used by each patient Self-serve, first stage; parallel servers, second stage 16 - Chap 11

A Service Process without Variability

arriving customer server

Inter-arrival time = service time = 6 minutes, a constantArrival rate = 10 customers per hourService rate = 10 customers per hourWith one server:

no queue, no server idling 17 - Chap 11

A Service Process with Variability

arriving customer queue server with a customer

Arrival rate = 20 customers per hour, service rate = 60

customers per hour, one server

Inter-arrival times and service times are randomWhat happen if

- 100 customers arrive between 9:45 and 10 am?

- One customer takes much longer than 1 minute to be served?

18 - Chap 11

Waiting Realities

Inevitability of Waiting:

- Waiting results from variations in arrival time between customers and the time required to serve customers

Economics of Waiting:

- High utilization realized at the price of customer waiting. 19 - Chap 11

Approaches to Manage Customer Waiting

Animate:

- Disneyland distractions, elevator mirror, recorded music

Discriminate:

- Avis frequent renter treatment (out of sight)

Automate:

- Use computer scripts to address 75% of questions

Control arrival times:

- Appointments, pricing “Disney-world's management of waiting lines”.

http://www.youtube.com/watch?v=6OJIy-PzCgs

20 - Chap 11

How Technology Can Provide Faster Service

Eliminate Customer Waiting Time (24x7 service)Automated teller machines (ATMs)Internet access to customer accountsReduce Customer Waiting TimeBar-code scannersOptical character recognition (OCR)Menu-driven databases

21 - Chap 11

What probability distributions are often used for inter arrival times and service times?

Suppose you start a service business. You haven’t seen the actual

customers arrival process, but you want to have some idea about the queue you will be facing.

So, you need to make some

assumptions about the customers arrival process, and service time distribution.

A most commonly used distribution is the

exponential distribution : 1/

l

~ exp(λ) 1/

m

~ exp(μ)

0

inter-arrival time 1/

l 0

service time 1/

m

22 - Chap 11

Why use these assumptions?

In many situations, the exponential distribution assumption is a good approximation of what really happens

Such an arrival process is also called “

Poisson process ”

» Number of customers arriving per time unit is Poisson

distributed 23 - Chap 11

Arrivals

Single-Server M/M/1Model

Queue Service system Service facility Served units Ships at sea Ship unloading system Waiting ship line Dock Empty ships

24 - Chap 11

Single-Server M/M/1 Model

Assumptions:Inter-arrival times follow an

Exponential distribution with mean 1/λ

 • Input rate follows a Poisson Distribution with rate λ

M

Service times follow an

Exponential distribution with rate

m 

(average time to serve one customer = 1/

m

)

Single server

1 M

Other technical assumptionsSingle queueNo limit on queue length (unlimited waiting capacity)All units that arrive enter the queue (no balking)Any unit entering the system stays in the queue till served (no

reneging)

First Come - First Served (FCFS)All units arrive

independently of each other 25 - Chap 11

Single-Server M/M/1 System: The State of the System

n = number of customers in system (in service plus in

waiting)

If service rate (μ) > arrival rate (λ), system can reach the

steady state

Steady state: the probabilities of observing any particular

number of customers in the system at any two arbitrary time

t

1 and t 2 are equal

Steady system state probability distribution

P i

= P(n =i ), i = 0, 1, 2 , …

P i

is the probability of observing i customers in a steady system at an arbitrary time

How to compute P

i

?

26 - Chap 11

Formulas for Single-Server M/M/1 Model

Probability that the server is busy and the customer has to wait (utilization factor) Probability that the server is idle and no customers are in the system (either in the queue or being served)

=

l m

P

0 = 1 -

= 1 -

l m

Probability of exactly n customers in the system

P n n

= • P 0

l

n

= 1 -

l m

27 - Chap 11

Formulas for Single-Server M/M/1 Model

Average number of customers in the waiting line (average queue length Average number of customers in the system Average time a customer spends waiting in line to be served Average time a customer spends in the queuing system (average flow time)

L q W q

m

(

m l 

-

  l

) 1-

 m l

-

l  1- 

q

+

 m

(

m l

-

l

)

m 

-

l m

1 -

l

L

l

q

+ 1

m

28 - Chap 11

Example: Dr. Wang’s Clinic

Dr. Wang runs a private walk-in clinic. She spends an

average of 10 minutes to see one patient. Four months ago, patients arrived at a rate of 4/hour.

One afternoon, you were walking in …What was the probability that you had to wait?If you saw 3 or more patients waiting, you would go away.

How likely would this happen?

What was the expected number of patients in the clinic?What was the expected number of patients in the queue?What was your expected waiting time?What was your expected flow time?

29 - Chap 11

Example: Dr. Wang’s Clinic

Arrival rate

l

= 4, service rate

m

= 6, ρ= 2/3 Probability that you had to wait = probability that Dr. Wang was busy = 1– probability that she was idle = 1− (1−ρ) = 2/3 Probability of seeing 3 or more waiting {there are 4 or more patients in the clinic.} =1– P 0 – P 1 – P 2 – P 3 =1 – 1/3 – (2/3)x(1/3) – (4/9)x(1/3) – (8/27)x(1/3) =1 – 65/81=0.1975

30 - Chap 11

Example: Dr. Wang’s Clinic

Expected number of patients in the clinic

L =

/(1 –

) = (2/3)/[1-2/3]=2 patients

Expected number of patients in the queue

Lq= L –

= 2 – 2/3 = 1.33 patients

Expected waiting time

Wq =

/(m

l)

= (2/3)/(6−4)= 1/3= 20 minutes

Expected flow time

W = Wq + 1/

m

= 20 + 10 = 30 minutes 31 - Chap 11

Little’s Law of Service Systems

Little's Law: W - average flow time W L q q - average customer waiting time L - average number of customers in the system - average queue length The fundamental relations:

L

 l  W ,

L q

 l 

W q

32 - Chap 11

Use of Little’s Law for Dr. Wang’s Clinic Case

By Little’s Law,

The average flow time is

W = L/λ = 1/(μλ) = 1/(6−4) = 30 minutes

The average queue length is

L q

= λ

×

W q

= ρ 2 /(1−ρ) = (4/9)/(1/3) = 4/3 = 1.33 patients 33 - Chap 11

Example: Photo Express

On average 10 customers arrive per hour at a Photo Express

to process film.

There is one clerk in attendance that on average spends 4

minutes per customer.

1. What are the average queue length and the average number of customers in the system?

2. What are the average waiting time in queue and the average time spent in the system?

3. What is the probability of having 2 or more customers waiting in queue?

34 - Chap 11

Photo Express: Queue Length

Poisson arrival: l

= 10 customers per hour

Exponential service time: 1/ m

= 4 minutes

Service rate = 15 customers per hourUtilization:   10 / 15  0 .

6667 • Solution:

L q

 

2 1

 

0 .

6667 2 1

-

0 .

6667

1 .

3336 customers L

 

1

 

0 .

6667 1

-

0 .

6667

2 .

0003 customers 35 - Chap 11

Photo Express: Other Results

Average waiting time

W q

L q

/ l  1 .

3336 / 10  0 .

1334 hours  8 minutes • Average time in system

W

L

/ l  2 .

0003 / 10  0 .

2 hours  12 minutes • Probability of 3 or more customers in system (2 or more

customers waiting in queue) P(n ≥ 3) = 1 – P 0 – P 1 – P 2 = 0.2963

36 - Chap 11

M/M/s Multiple-Server Model

l Arrival rate customers/hr Average throughput l customers/hr Servers queue Assumption : l 

s

m s = number of servers  = l / (

s

m

)

Service rate (per server) customers/hr m • Customers only form one queueThe first customer in the queue will be served by the next empty

server 37 - Chap 11

M/M/s Multiple-Server Model

Two or more independent servers serve a single waiting linePoisson arrivals, exponential service time, infinite populationProbability that no customers are in the system (all servers are

idle): 1

P

0 = n=s-1

n=0 1 n!

l m

n

+ 1 s!

l m

s s

m

s

m

-

l

38 - Chap 11

Basic M/M/s Multiple-Server Model

Probability of exactly n customers in the system

P n

= 1 s! s

n-s

1 n!

l m

n

l m

n P

0 , for n > s

P

0 , for 0

n

s

Probability that an arriving customer must wait

P w

Average number of customers in system 1 s!

l m

s s s

m

-

l

0

lm

(

l

/

m

)

s

(s - 1)!(s

m

-

l

) 2 0 +

l m

39 - Chap 11

Basic M/M/s Multiple-Server Model

Average time a customer spends in system Average number of customers in queue Average time a customer spends in queue Utilization factor W =

L

l

L q

= L

– l m

W q

= W

1

m

=

L q

l 

=

l

/(s

m)

40 - Chap 11

MS Course Ware

The formulas for determining the performance measures of

M/M/s model are complicated.

An Excel template “MMs Economic Analysis.xls” for the M/M/s

model which is available from Moodle, will calculate all the measures of performance.

41 - Chap 11

Multiple-Server System: Example

Student Health Service Waiting Room

l

= 10 students per hour

m

= 4 students per hour per service representative s = 3 representatives s

m

= (3)(4) = 12 Probability no students are in the system Average number of students in the service area

P

0 = 0.045

L = 6 42 - Chap 11

Multiple-Server System: Example

Average waiting time students spend in the service area Average number of students waiting to be served Average time students wait in line W = L /

l

= 0.60 = 36 minutes

L W q q

= L -

l

/

m

= L

q

/

l

= 3.5

= 0.35 hours = 21 minutes Probability that a student must wait

P w

= 0.703

43 - Chap 11

Multiple-Server System: Example

Add a 4th server to improve service.

Re-compute operating characteristics:

P

0 = 0.073 (probability of no students) L = 3.0 students W = 0.30 hour, 18 minutes in service

L q W q

= 0.5 students waiting = 0.05 hours, 3 minutes waiting, versus 21 earlier

P w

= 0.31 (probability that a student must wait) 44 - Chap 11

Economic Analysis of Queuing Systems Example: SHKS (A)

M/M/1 Queuing System Mr. Chan is a stock trader on the floor of the Hong Kong Stock Exchange for the firm SHK Security. Stock transactions arrive at a mean rate of 20 per hour. Each order received by Mr. Chan requires an average of two minutes to process.

Orders arrive at a mean rate of 20 per hour or one order every 3 minutes. Therefore, in a 15 minute interval the average number of orders arriving will be

l

= 15/3 = 5.

45 - Chap 11

Economic Analysis of Queuing Systems Example: SHKS (A)

Service Rate Question: What is the mean service rate per hour?

Answer: Since Mr. Chan 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.

46 - Chap 11

Economic Analysis of Queuing Systems Example: SHKS (A)

Average Waiting Time Question: What is the average time an order must wait for process?

Answer: This is an M/M/1 queue with

W q

=

/(µ - l

) = (2/3)/(30 - 20)

l

= 20 per hour and

m

= 30 per hour. The average time an order waits in the system is: = 1/15 hour or 4 minutes 47 - Chap 11

Economic Analysis of Queuing Systems Example: SHKS (A)

Average Time in the System Question: What is the average time an order must wait from the time Mr. Chan receives the order until it is finished being processed (i.e. its flow time)?

Answer: The average time an order stays in the system is: W = W

q

+ service time = 4 + 2 = 6 minutes 48 - Chap 11

Economic Analysis of Queuing Systems Example: SHKS (A)

Average Queue Length Question: What is the average number of orders waiting to be processed?

Answer: The average number of orders waiting in the queue is:

L q

=

l

x W

q

= 20 x 1/15 = 4/3 49 - Chap 11

Example: SHKS (A)

Utilization Factor Question: What percentage of the time is Mr. Chan processing orders?

Answer: The percentage of time Mr. Chan is processing orders is equivalent to the utilization factor,

l

/

m

. Thus, the percentage of time he is processing orders is:

l

/

m

= 20/30 = 2/3 or 66.67% 50 - Chap 11

Economic Analysis of Queuing Systems Example: SHKS (A)

M/M/2 Queuing System SHK Security 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, Mr. Wong, who works at the same speed as Mr. Chan.

Note that the new arrival rate of orders,

l

than that of problem (A). Thus,

l

, is 50% higher = 1.5(20) = 30 per hour.

51 - Chap 11

Example: SHKS (B)

Sufficient Service Rate?

Question: Why will Mr. Chan alone not be able to handle the increase in orders?

Answer: Since Mr. Chan processes orders at a mean rate of µ = 30 per hour, then

l

= µ = 30 and the utilization factor is 1. This implies the queue of orders will grow infinitely large. Hence, Mr. Chan cannot handle this increase in demand.

52 - Chap 11

Economic Analysis of Queuing Systems Example: SHKS (C)

The advertising campaign of SHK Security (see problems (A) and (B)) was so successful that business actually doubled. The mean rate of stock orders arriving at the exchange is now 40 per hour 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 minutes.

Based on a number of factors the brokerage firm has determined the average waiting cost per minute for an order to be $5.0. Floor traders hired will earn $200 per hour in wages and benefits. Using this information compare the total hourly cost of hiring 2 traders with that of hiring 3 traders.

53 - Chap 11

Economic Analysis of Waiting Lines ― A Simple Tradeoff Model

Parameters:

- c w

= Hourly waiting cost of one customer

- c s

= Hourly cost per server - s = Number of servers as the decision variable Total Hourly Cost = (Total cost of servers per hour) + (Total cost of waiting)

min

TC

(

s

) subject to 

c s s s

  l

c w

m

L q

We can also use service rate as a decision variable.

54 - Chap 11

Cost Relationship in Queue Analysis

Total Cost Cost of Servers Cost of Waiting Optimal Number Of Servers 55 - Chap 11

Example: SHKS (C)

Economic Analysis of Waiting Lines Total Hourly Cost = (Total salary cost per hour) + (Total waiting cost for orders in the system) = ($200 per trader per hour) x (Number of traders) + ($300 waiting cost per hour) x (Average number of orders waiting in the system) = 200s + 300L q .

56 - Chap 11

Example: SHKS (C)

Use the Excel template “MMs Economic Analysis.xls to

calculate L q with

l

= 40/hr and

m

= 30/hr s 1 2 3 4 Lq #N/A 1.067

0.145

0.026

57 - Chap 11

Example: SHKS (C)

Cost with Two Floor Traders (Servers) L q = 1.067

Total Cost = (200)(2) + 300(1.067) = $720 per hour Cost with Three Floor Traders (Servers) L q = 0.145

Total Cost = (200)(3) + 300(0.145) = $643 per hour Cost with Four Floor Traders (Servers) L q = 0.026

Total Cost = (200)(4) + 300(0.026) = $808 per hour 58 - Chap 11

Example: SHKS (C)

System Cost Comparison Wage 2 Traders 3 Traders 4 Traders Cost/Hr $400 $600 $800 Waiting Cost/Hr $320 $43 $8 Total Cost/Hr $720 $643 $808 Thus, the cost of having 3 traders is the lowest. SHK should hire 3 floor traders.

59 - Chap 11