77
1 Waiting Lines and Queuing Theory Models Chapter 2

1 Waiting Lines and Queuing Theory Models Chapter 2

Embed Size (px)

Citation preview

Page 1: 1 Waiting Lines and Queuing Theory Models Chapter 2

1

Waiting Lines and Queuing Theory Models

Chapter 2

Page 2: 1 Waiting Lines and Queuing Theory Models Chapter 2

2

Learning ObjectivesStudents will be able to:

1. Describe the trade-off curves for cost-of-waiting time and cost-of-service.

2. Explain the three parts of a queuing system: the calling population, the queue itself, and the service facility.

3. Explain the basic queuing system configurations.

4. Describe the assumptions of the common queuing system models.

5. Analyze a variety of operating characteristics of waiting lines.

Page 3: 1 Waiting Lines and Queuing Theory Models Chapter 2

Chapter Outline5.1 Introduction.5.2 Waiting Line Costs.5.3 Characteristics of a Queuing System.5.4 Single-Channel Queuing Model with Poisson

Arrivals and Exponential Service Times (M/M/1).5.5 Multi-Channel Queuing Model with Poisson Arrivals

and Exponential service Times (M/M/m).5.6 Constant Service Time Model (M/D/1).5.7 Finite Population Model (M/M/1 with Finite Source).5.8 Some General Operating Characteristics

Relationships.5.9 More Complex Queuing Models and the Use of

Simulation.3

Page 4: 1 Waiting Lines and Queuing Theory Models Chapter 2

1. Introduction

Arrivals, Service facilities, Actual waiting line.Waiting line problems are centered on the questions of finding the ideal level of services that the firm should provide.

4

Queuing theory is one of the most widely used quantitative analysis techniques. The three basic components are:

Page 5: 1 Waiting Lines and Queuing Theory Models Chapter 2

1. Introduction (Cont’d.)

- Supermarkets, decides how many cash register check out positions opened.

- Gasoline stations, the number of pumps opened.

- Manufacturing plants, the optimal number of mechanics to have on duty for repair.

- Banks, the number of teller windows to keep open to serve customers in various hours of a day.

5

Page 6: 1 Waiting Lines and Queuing Theory Models Chapter 2

2. Waiting Line Costs

Determining the best level of service. Analyzing the trade-off between cost of providing

service and cost of waiting time. Most managers want queues that are short enough

so that customers do not become unhappy. • One means of evaluating a service facility is to look

at a total expected cost, which is the sum of expected service cost plus expected waiting cost, see the following figure:

6

Queuing analysis includes:

Page 7: 1 Waiting Lines and Queuing Theory Models Chapter 2

Queuing Costs and Service Levels

7

Cos

t

Service Level

Total Expected

CostCost of

ProvidingService

Cost of Waiting

Time

Optimal Service Level

Page 8: 1 Waiting Lines and Queuing Theory Models Chapter 2

Three Rivers Shipping Co. Example

8

Number of Stevedores Working1 2 3 4

5

7 4 3 2

35 20 15 10

$1,000

$35,000 $20,000 $15,000 $10,000

$6,000 $12,000 $18,000 $24,000

$41,000 $32,000 $33,000 $34,000

(b) Average waiting time per ship to be unloaded (hours)(c) Total ship hours lost per

shift (a × b)(d) Estimated cost per hour

of idle ship time(e) Value of ship’s lost time

(c × d)(f) Stevedore teams salary

(g) Total expected cost (e+f)

(a) Avg. number of ships arriving per shift

The superintendent at Three Rivers Shipping Company wants to determine the optimal number of stevedores to employ each shift.

Page 9: 1 Waiting Lines and Queuing Theory Models Chapter 2

3. Characteristics of a Queuing System

Arrival Characteristics:Size of the calling population.Pattern of arrivals.Behavior of arrivals.

Waiting Line Characteristics:Queue length.Queue discipline.

Service Facility Characteristics: Configuration of the queuing system.Service time distribution.

9

Page 10: 1 Waiting Lines and Queuing Theory Models Chapter 2

Arrival Characteristics of a Queuing System

Calling Population:Unlimited (infinite).Limited (finite).

Arrival Pattern:Randomly.Poisson Distribution.

10

Page 11: 1 Waiting Lines and Queuing Theory Models Chapter 2

Arrival Characteristics:Poisson Distribution

11

! P(X)

X

e x

.00

.05

.10

.15

.20

.25

.30

.35

012 3 4 5 6 7 8 9 10X

P(X

) P(X), = 2

.00

.05

.10

.15

.20

.25

.30

01 23 4 5 6 7 8 9 10 11X

P(X

)

P(X), = 4

For X = 0, 1, 2, 3, 4, …

Page 12: 1 Waiting Lines and Queuing Theory Models Chapter 2

Arrival Characteristics of a Queuing System (continued)

Behavior of arrivals: Join the queue, wait till served, and do not

switch between lines.

Balk; refuse to join the line.

Renege (Withdraw); enter the queue, but

then leave without completing the

transaction.12

Page 13: 1 Waiting Lines and Queuing Theory Models Chapter 2

Waiting Line Characteristics of a Queuing System

Waiting Line Characteristics:Length of the queue:

Limited.

Unlimited.

Service priority/Queue discipline: First In First Out (FIFO).

Other.

13

Page 14: 1 Waiting Lines and Queuing Theory Models Chapter 2

Number of channels (servers): Single. Multiple.

Number of phases in service system (customer stations): Single (1 stop). Multiple (2+ stops).

• Service time distribution: Exponential. Other.

14

Service Facility Characteristics

Configuration of the queuing system:

Page 15: 1 Waiting Lines and Queuing Theory Models Chapter 2

Service Characteristics: Queuing System Configurations

15

A bank which has only one open teller. Single Channel, Single Phase

Queue

Servicefacility

arrivals

Departure after Service

Facility 1

Facility2

Single Channel, Multi-Phase

Queue Service Facility

arrivals

Departure after Service

Page 16: 1 Waiting Lines and Queuing Theory Models Chapter 2

Service Characteristics: Queuing System Configurations

16

Servicefacility 1

Servicefacility 2

Servicefacility 3

Multi-Channel, Single Phase System

Queue

arrivals

Departure after Service

Multi-Channel, Multiphase System

Queue Type 1 Service Facility

Type 1 Service Facility

Type 2 Service Facility

Type 2 Service Facility

arrivals

Departure after Service

Page 17: 1 Waiting Lines and Queuing Theory Models Chapter 2

Service Characteristics of a Queuing System

Service Time Patterns: Exponential probability distribution.

Other distributions.

17

Page 18: 1 Waiting Lines and Queuing Theory Models Chapter 2

Service Time Characteristics: Exponential Distribution

18

Pro

babi

lity

30 60 90 120 150 180

Average Service Time of 1 Hour

Average Service Time of 20 Minutes

Service Time (Minutes), X

MinutePer ServedNumber Average μ

0 μ and 0, for x μef(x) μx

Page 19: 1 Waiting Lines and Queuing Theory Models Chapter 2

Identifying Models Using Kendall Notation

The basic three-symbol Kendall notation:

19

Arrival Service Time Number of ServiceDistribution Distribution Channels Open

Where:

M = Poisson distribution for the number of occurrences (or exponential times).

D = Constant (deterministic rate).G = General distribution with mean and variance known.

M/M/1 A Single channel model with Poisson arrivals and exponential service times.

M/M/2 When a second channel is added

Page 20: 1 Waiting Lines and Queuing Theory Models Chapter 2

• If there are m distinct service channels in the queuing system with Poisson arrivals and exponential service times, the Kendall notations will be:

• A three channel system with poisson arrivals and constant service time is:

• A four-channel system with Poisson arrivals and service times that are normally distributed would be:

20

M / M / m

M / D / 3

M / G / 4

Identifying Models Using Kendall Notation (Cont’d.)

Page 21: 1 Waiting Lines and Queuing Theory Models Chapter 2

4. Single-Channel Queuing Model with Poisson Arrivals and Exponential Service Times (M / M/ 1)

21

Assumptions of the Model:

1. Queue discipline: FIFO.2. No balking or reneging.3. Arrivals: Poisson distributed.4. Independent arrivals; constant rate over time.

5. Service times: exponential, average known.6. Average service rate > average arrival rate.

Page 22: 1 Waiting Lines and Queuing Theory Models Chapter 2

M/M/1Single channel

22

Page 23: 1 Waiting Lines and Queuing Theory Models Chapter 2

Operating Characteristics of Queuing Systems

1. Average number of customers in the system (L).2. Average time each customer spends in the

system (W).

3. Average length of the queue (Lq).4. Average time each customer spends waiting in

the queue (Wq).5. Utilization factor for the system (ρ). 6. Probability that the service facility will be idle

(P○).7. Probability that the number of customers in the

system (n) is greater than k, (Pn > k).23

Page 24: 1 Waiting Lines and Queuing Theory Models Chapter 2

Queuing Equations

24

-

L system,in number Average 1.

-

1 W system,in timeAverage 2.

- L queue,in number Average 3.

2

q

- W waiting, timeAverage 4. q

Factor,on Utilizati5.

1P Idle,Percent 6. 0

1

k

knP7. Probability that the number of

customers in the system (n) is > k,

,mean number of arrivals per time period = גμ = mean number of customers served per time period.

Page 25: 1 Waiting Lines and Queuing Theory Models Chapter 2

Arnold’s Muffler Shop Case

Assume you are planning a car wash to raise money for a local charity.

You anticipate the cars arriving in a single line and being serviced by one team of washers.

Based on historical data, you believe cars will arrive every 30 minutes, and the team can wash a car in about 20 minutes.

The arrival rates follow a Poisson distribution and the service rates are exponentially distributed.

What are the operating characteristics for this system?

25

Page 26: 1 Waiting Lines and Queuing Theory Models Chapter 2

Arnold’s Muffler Shop Case Assume you are planning a car wash to raise money

for a local charity. You anticipate the cars arriving in a single line and

being serviced by one team of washers. Based on historical data, you believe cars will arrive

every 30 minutes, and the team can wash a car in about 20 minutes.

The arrival rates follow a Poisson distribution and the service rates are exponentially distributed.

What are the operating characteristics for this system?

26

Page 27: 1 Waiting Lines and Queuing Theory Models Chapter 2

27

Arnold’s Muffler Shop Case Assume you are planning a car wash to raise money for

a local charity. You anticipate the cars arriving in a single line and

being serviced by one team of washers. Based on historical data, you believe cars will arrive

every 30 minutes, and the team can wash a car in about 20 minutes.

The arrival rates follow a Poisson distribution and the service rates are exponentially distributed.

What are the operating characteristics for this system?

= 2 cars arriving per hourμ = 3 cars serviced per hour

Page 28: 1 Waiting Lines and Queuing Theory Models Chapter 2

Car Wash Example: Operating Characteristics

28

= 2 cars arriving per hour, μ = 3 cars serviced per hour

L = ? cars in the system on average

W= ? hours that an average car spends in the system

Lq= ? cars waiting on average

Wq= ? hours is average wait in line

ρ = ? percent of time car washers are busy

P0= ? probability that there are 0 cars in the system

-

-

1

-

2

-

1

Page 29: 1 Waiting Lines and Queuing Theory Models Chapter 2

Car Wash Example: Operating Characteristics Solution

29

L = = 2/(3-2) 2 cars in the system on average

W= = 1/(3-2) 1 hour that an average car spends in the system

Lq= = 22/[3(3-2)] 1.33 cars waiting on average

Wq = = 2/[3(3-2)] 0.67 hours is average wait

ρ = = 2/3 0.67 percent of time

washers are busy

P0 = =1 – (2/3) 0.33 probability that there are 0 cars in the system

-

-

1

-

2

-

1

Page 30: 1 Waiting Lines and Queuing Theory Models Chapter 2

Probability of More Than k Cars in the System:

30

1

3

2

k

knPk Pn > k

0 0.6671 0.4442 0.2963 0.1984 0.1325 0.0886 0.0587 0.039

Equal to 1-P0 = 1- 0.33

Page 31: 1 Waiting Lines and Queuing Theory Models Chapter 2

Solution Using QM for Windows

31

Lab Exercise:

1.Solve the Arnold’s Muffler Shop Example using Excel and QM for Windows.

To be continued.

Page 32: 1 Waiting Lines and Queuing Theory Models Chapter 2

Using QM for Windows

32

Page 33: 1 Waiting Lines and Queuing Theory Models Chapter 2

33

Page 34: 1 Waiting Lines and Queuing Theory Models Chapter 2

34

Page 35: 1 Waiting Lines and Queuing Theory Models Chapter 2

35

Page 36: 1 Waiting Lines and Queuing Theory Models Chapter 2

36

Page 37: 1 Waiting Lines and Queuing Theory Models Chapter 2

37

Page 38: 1 Waiting Lines and Queuing Theory Models Chapter 2

38

Page 39: 1 Waiting Lines and Queuing Theory Models Chapter 2

39

Page 40: 1 Waiting Lines and Queuing Theory Models Chapter 2

40

Page 41: 1 Waiting Lines and Queuing Theory Models Chapter 2

41

Page 42: 1 Waiting Lines and Queuing Theory Models Chapter 2

Solving Using Excel

42

ρ =

Average server utilization

Page 43: 1 Waiting Lines and Queuing Theory Models Chapter 2

43

=B7/B8

=B7^2/(B8*B8-B7))

=B7/(B8-B7)

=B7/(B8*(B8-B7))

=1/(B8-B7)

=1 – E7

L = , W= , Lq= , Wq = , ρ = , P0 =

- -

1

-

2

-

1

Page 44: 1 Waiting Lines and Queuing Theory Models Chapter 2

44

Results:

Page 45: 1 Waiting Lines and Queuing Theory Models Chapter 2

45

=1-E12 =E12 =C17=(B7/B8)^(A18+1) =B17-B18 =C17+C18=(B7/B8)^(A19+1) =B18-B19 =C18+C19=(B7/B8)^(A20+1) =B19-B20 =C19+C20=(B7/B8)^(A21+1) =B20-B21 =C20+C21=(B7/B8)^(A22+1) =B21-B22 =C21+C22=(B7/B8)^(A23+1) =B22-B23 =C22+C23=(B7/B8)^(A24+1) =B23-B24 =C23+C24

1

k

knPPn>0 = 1- Po , , Pn = k = Pn>k-1 - Pn>k , k=1,2,…

Page 46: 1 Waiting Lines and Queuing Theory Models Chapter 2

46

Page 47: 1 Waiting Lines and Queuing Theory Models Chapter 2

M/M/m

47

A good example for the multichannel model is the super market, where you have more than one channel

5. Multichannel Queuing Model with Poisson Arrivals and Exponential Service Times (M/M/m)

Page 48: 1 Waiting Lines and Queuing Theory Models Chapter 2

5. Multichannel Queuing Model with Poisson Arrivals and Exponential Service Times (M/M/m)

48

1. Probability there are no customers in the system:

2. Average number of customers in the system:

( ) ( ) ml

lmmllm

mm

m

+--

èæ

= P !1

L 02øö

lmm

ml

ml

mm

mn

P mmn

n

n

-ççèæ+

úúû

ùêêë

é

øö

ççèæ

=

å-=

= !1

!1

11

0

0

çøöç

lmm >for

m = number of channels open.

Equations for the Multichannel Queuing Model:

Page 49: 1 Waiting Lines and Queuing Theory Models Chapter 2

49

lL=W 3. The average time a customer spends

in the system,

4. The average number of customers in line waiting,

ml

L -=L q

5. The average time a customer spends in the queue waiting for service,

ml

rm

=6. The utilization rate,

q

lmL

W =-= 1 Wq

Equations for the Multichannel Queuing Model (Cont’d.)

Page 50: 1 Waiting Lines and Queuing Theory Models Chapter 2

Should you have 2 teams of car washers?

Arnold’s Muffler Shop Revisited

50

= 2 cars/ hr u = 3 cars/ hr , m =2

W = 0.75 = 3 = 22.5 minutes 2 4

Wq = 0.083 = 0.0415 hour = 2.5 minutes 2

1

1 + 2 + 1 4 6 3 2 9 6-2

= = 0.512

P0=

2 3 2 / 3 1 2 1! 2 3 - 2 2 3

+2

2

= 3 = 0.75 4

L=

2 1 3 12

Lq = 0.75 – = =0.083

Page 51: 1 Waiting Lines and Queuing Theory Models Chapter 2

51

Solution Using QM for Windows

Lab Exercise (Cont’d.)

2. Solve the Arnold’s Muffler Shop with 2 teams of car washers Example using Excel QM.

To be continued.

Page 52: 1 Waiting Lines and Queuing Theory Models Chapter 2

52

Page 53: 1 Waiting Lines and Queuing Theory Models Chapter 2

53

Page 54: 1 Waiting Lines and Queuing Theory Models Chapter 2

54

Page 55: 1 Waiting Lines and Queuing Theory Models Chapter 2

55

Page 56: 1 Waiting Lines and Queuing Theory Models Chapter 2

6. Constant Service Time Model (M/D/1)

56

1. Average length of the queue,

2. Average waiting time in the queue,

3. Average number of customers in the queue,

4. Average time in the system,

( )lmml

2Wq -=

( )lmml

2L2

q -=

m1

W += qW

ml

L += q L

(14-20)

(14-21)

(14-22)

(14-23)

Lq and Wq are halved w.r.t. M/M/1

Page 57: 1 Waiting Lines and Queuing Theory Models Chapter 2

57

Car Wash Example: M/D/1

Page 58: 1 Waiting Lines and Queuing Theory Models Chapter 2

Car Wash Example: M/D/1 Your charity is considering purchasing an

automatic car wash system. Cars will continue to arrive according to a

Poisson distribution, with 2 cars arriving every hour.

However, the service time will now be constant with a rate of 3 cars per hour.

- Compare the operating characteristics of this model with your previous models.

58

Page 59: 1 Waiting Lines and Queuing Theory Models Chapter 2

Car Wash Example: Operating Characteristics M/D/1

59

4 2(3) (3-2)

23

2 2(3)(3-2)

1 3

4 + 2 6 3

43

1 + 1 3 3

2 3

M/D/1 M/M/1

4 cars3

2 hour3

2 cars

1 hour

Both Lq and Wq are reduced by 50%!

=

=

=

=

Lq=

Wq=

L=

W=

Page 60: 1 Waiting Lines and Queuing Theory Models Chapter 2

60

Lab Exercise (Cont’d.)

3. Solve the Arnold’s Muffler Shop M/D/1 Example using Excel QM or QM for Windows.

Page 61: 1 Waiting Lines and Queuing Theory Models Chapter 2

61

Page 62: 1 Waiting Lines and Queuing Theory Models Chapter 2

62

Page 63: 1 Waiting Lines and Queuing Theory Models Chapter 2

63

Page 64: 1 Waiting Lines and Queuing Theory Models Chapter 2

64

Page 65: 1 Waiting Lines and Queuing Theory Models Chapter 2

7. Finite Population Model (M/M/1 with Finite Source)

65

1. The probability that the system is empty:

2. Average length of the queue:

( )01 L PL q -+=3. Average number of customers (units) in the system:

0

0

)!(!

1P

nNNN

n

n

øö

ççèæ

-

=å= m

l

N = size of the population

( )0q 1L PN -øöç

èæ +-= l

ml

Equations for the Finite Population Model

Page 66: 1 Waiting Lines and Queuing Theory Models Chapter 2

66

1W W q += m

( )qWLN

Lq

-= l

4. Average waiting time in the queue:

5. Average time in the system:

6. Probability of n units in the system:

( ) 0n !! P N)n P(n, PnN

N n

øö

çèæ

-==£ mlç

For n = 0, 1, 2, ……., N

Equations for the Finite Population Model (Cont’d.)

Page 67: 1 Waiting Lines and Queuing Theory Models Chapter 2

Department of Commerce Example:

The Department of Commerce has 5 printers that each need repair after about 20 hours of work.

Breakdowns follow a Poisson distribution. The technician can service a printer in an

average of about 2 hours, following an exponential distribution.

Determine the operating characteristics for this model.

67

Page 68: 1 Waiting Lines and Queuing Theory Models Chapter 2

68

Department of Commerce Example:

Page 69: 1 Waiting Lines and Queuing Theory Models Chapter 2

Operating Characteristics M/M/1 Finite source

69

= 1/20 = 0.05 printer/ hr, u = ½ = 0.50 printer/ hr,

1 5! 0.05 (5-n)! 0.5∑

n

n=0

5 = 0.564

5 -

L = 0.2 + (1-0.564) = 0.64 printer

0.2 (5-0.64)(0.05)

= 0.91 hour

W = 0.91 + 1 = 2.91 hours 0.50

N = 5

P0=

Wq=

0.05 + 0.5 0.05

(1-Po) = 5 – 4.8 = 0.2Lq=

Page 70: 1 Waiting Lines and Queuing Theory Models Chapter 2

70

Lab Exercise (Cont’d.).

4. Solve the Department of Commerce Example using Excel QM or QM for Windows.

Page 71: 1 Waiting Lines and Queuing Theory Models Chapter 2

71

Page 72: 1 Waiting Lines and Queuing Theory Models Chapter 2

72

Page 73: 1 Waiting Lines and Queuing Theory Models Chapter 2

73

Page 74: 1 Waiting Lines and Queuing Theory Models Chapter 2

74

Page 75: 1 Waiting Lines and Queuing Theory Models Chapter 2

8. Some General Operating Characteristic Relationships

75

After reaching a steady state, certain relationships exist among specific operating characteristics.

A steady state condition exists when a queuing system is in its normal stabilized operating conditions, usually after an initial or transient state that may occur (e.g. having customers waiting at the door when a business opens in the morning). Both the arrival rate and the service rate should be stable in this state.

Page 76: 1 Waiting Lines and Queuing Theory Models Chapter 2

76

1

WW

L(or W λWL

L (or W λW L

q

qqqq

Little’s Flow Equations:

This is important because for certain queuing models, one of these may be much easier to determine than the others.

These are applicable to all of the queuing systems discussed in this chapter except the finite population model.

(14-30)

(14-31)

(14-32)

Page 77: 1 Waiting Lines and Queuing Theory Models Chapter 2

9. More Complex Queuing Models and the Use of Simulation

Computer simulation is used to handle many real-world queuing applications that are complex.

Simulation allows: Analysis of controllable factors. Approximation of the actual service system.

77