106
QUEUING THEORY Learning Objectives University of the Philippines By the end of this module, the students are expected to: 1. Identify the appropriate queuing model for a particular situation. 2. Evaluate the performance of a queuing system using different metrics. 3. Use a spreadsheet template to easily compute queuing-related performance measures.

QUEUING THEORY - PHL CHED Connect

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYLearning Objectives

University of the Philippines

By the end of this module, the students are expected to:

1. Identify the appropriate queuing model for a particular situation.

2. Evaluate the performance of a queuing system using different metrics.

3. Use a spreadsheet template to easily compute queuing-related performance measures.

Page 2: QUEUING THEORY - PHL CHED Connect

service facility

QUEUING THEORYThe Queuing System

University of the Philippines

customer server

queue

arriving

customer

customers

in service

system boundary

Page 3: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYKendall-Lee Notation

University of the Philippines

A six-element classification system for queuing systems using the notation:

_____ / _____ / _____ / _____ / _____ / _____A S s D K N

Examples:

1. M / M / 2 / FCFS / 20 / 20

2. D / M / 1 / FCFS / ∞ / ∞

3. G / G / 2 / LCFS / 100 / ∞

Page 4: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYKendall-Lee Notation

University of the Philippines

_____ / _____ / _____ / _____ / _____ / _____A S s D K N

A: Arrival (Input) Process. The arrival pattern of arriving customers. Let λ be

the arrival rate of customers.

M – Markovian (exponential)

Ek – Erlang

D – constant (degenerate)

G – general

S: Service (Output ) Process. The service time distribution. Let µ be the

service rate of each server.

M – Markovian

Ek – Erlang

D – constant (degenerate)

G – general

s: Servers. The number of servers in a service facility.

Page 5: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYKendall-Lee Notation

University of the Philippines

_____ / _____ / _____ / _____ / _____ / _____A S s D K N

D: Queuing Discipline. Determines which customer will be served next.

FSFC – first come, first served

LCFS – last come, first served

SIRO – service in random order

GD – general discipline

K: System Capacity. The maximum number of customers that are allowed to

enter the system.

N: Input Source / Calling Population. The number of customers that may

enter the system.

The last three may be omitted in the notation if FCFS/∞/∞.

Page 6: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYReview of Relevant Probability Distributions

University of the Philippines

Degenerate Normal Erlang Exponential

Increasing Randomness (Variability)

Mathematicallytractable

Limited Mathematical Analysis(may require simulation)

Mathematicallytractable

Page 7: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYReview of Relevant Probability Distributions

University of the Philippines

Degenerate Normal Erlang Exponential

10.0

10.0

10.0

10.0

10.0

10.0

10.0

10.0

9.7

9.7

9.6

9.6

9.3

11.3

9.3

10.1

17.6

17.9

15.0

7.0

6.4

7.2

39.3

4.0

7.6

8.6

40.0

36.1

8.3

34.2

3.4

9.0

Page 8: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYReview of Relevant Probability Distributions

University of the Philippines

Exponential

Degenerate

Normal

Erlang

Page 9: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYKendall-Lee Notation

University of the Philippines

Identify the Kendall-Lee notation of these queuing systems.

1. A canteen operates an espresso stand. Customers arrive to the standwith an exponential inter-arrival time. The espresso vending machinerequires exactly 45 seconds for each customer to operate.

2. A company has provided specialized machines to 12 different clients.Part of the agreement between the company and the clients is that thecompany will send a technician whenever the machine breaks. Thetechnician visits the site and will spend an average of 3 days per site tofix the machine. Assume normally distributed fix time. The company has2 technicians. Mean time to failure (MTTF) of each machine isexponential with mean of 60 days.

M/D/1/FCFS/∞/∞ or M/D/1

M/G/2/FCFS/12/12

Page 10: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYKendall-Lee Notation

University of the Philippines

Identify the Kendall-Lee notation of these queueing systems.

3. An eat-all-you-can dining place is usually full (can seat only 45 groups ofpeople). That is why it usually has a number of groups waiting in theholding area. A group of customers will balk (go to other dining place) ifthey see that there are 10 groups already in the holding area. Eatingtime per group is roughly 1.5 hrs. Assume Poisson arrival and randomeating time.

4. Students return books to the library at a rate of 6 books per hour. Theborrower’s section librarian returns the books, one at a time, to theirrespective bookshelves. This takes an erlang distributed time per book.Since a newly-returned book is placed on top of the pile, it is the firstone to be given attention by the librarian.

M/M/45/FCFS/55/∞

M/Ek/1/LCFS/∞/∞

Page 11: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYPerformance Measure of Queuing Systems

University of the Philippines

▪ Ls. Average number of customers being served.

▪ Lq. Average length of customers in the line (queue).

▪ L = Ls + Lq. Average number of customers in the system

▪ Ws. Average service time of a customer.

▪ Wq. Average waiting time of customer in the line (queue).

▪ W = Ws + Wq. Average waiting time of customer in the system.

▪ Probability of Balking. Balking happens when a customer cannot (orrefuses to) enter the line because it is either full or too long.

▪ Server Utilization. The proportion of time that a given server is busy as itattends to customers.

Page 12: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYPerformance Measure of Queuing Systems

University of the Philippines

Steady State(reported values)

Transient Period(not reported)

Page 13: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYPerformance Measure of Queuing Systems

University of the Philippines

Let Pn be the steady-state probability that the queuing system has n

customers.

𝐿 =

𝑛

𝑛𝑃𝑛

𝐿𝑞 =

𝑛>𝑠

൫𝑛 − 𝑠)𝑃𝑛

Page 14: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYLittle’s Queuing Formulas

University of the Philippines

Little’s Law states that the average number of customers in a queuingsystem is the product of the average entry rate of customers and theaverage time a customer spends in the system.

The following relationships are likewise true.

𝐿 = 𝜆𝑎𝑣𝑒𝑊

𝐿𝑞 = 𝜆𝑎𝑣𝑒𝑊𝑞

𝐿𝑠 = 𝜆𝑎𝑣𝑒𝑊𝑠

Page 15: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYLittle’s Queuing Formulas

University of the Philippines

L WL = λaveW

Wq

W = Wq + 1/µ

Lq

Lq = λaveWq

L = Lq + λ/µ

Page 16: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYLittle’s Queuing Formulas

University of the Philippines

In the Bills Payment section of a utility company, customers arrive to settletheir bills at a rate of 60 per hour. These customers join a single queueleading to three cashiers. Each cashier, if working continuously, can servecan serve a customer 24 customers in an hour. It is estimated that acustomer waits in line for an average of 1.5 mins before service begins.Determine the average number of customers in queuing system.

𝜆 = 60 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠/ℎ𝑟

𝑊𝑞 = 1.5 𝑚𝑖𝑛𝑠

μ = 24 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠/ℎ𝑟

𝑊𝑠 =1

𝜇=

1

24= 0.042 ℎ𝑟 = 2.5 𝑚𝑖𝑛𝑠

𝑊 = 𝑊𝑞 + 𝑊𝑠 =1.5

60+ 0.042 = 0.067 ℎ𝑟 = 4 𝑚𝑖𝑛𝑠

𝐿 = 𝜆𝑎𝑣𝑒𝑊 = 60 0.067 = 𝟒 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔

Page 17: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYBirth-and-Death Model of Markovian Queues

University of the Philippines

0 1 2 3 4 5 . . .

λ0 λ1 λ2 λ3 λ4 λ5

µ1 µ2 µ3 µ4µ5 µ6

Let the state N(t) of the queuing system be the number of customers in the

system at time t.

Birth is the transition from state n to state n+1. If the system is in state n,

the remaining time until the next birth is exponential with rate λn, n ≥ 0.

Death is the transition from state n to state n-1. If the system is in state n,

the remaining time until the next death is exponential with rate µn, n ≥ 1.

Page 18: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYBirth-and-Death Model of Markovian Queues

University of the Philippines

0 1 2 3 4 5 . . .

λ0 λ1 λ2 λ3 λ4 λ5

µ1 µ2 µ3 µ4µ5 µ6

𝑃1 =𝜆0𝜇1𝑃0

𝑃2 =𝜆0𝜆1𝜇1𝜇2

𝑃0 =𝜆1𝜇2𝑃1

𝑃3 =𝜆0𝜆1𝜆2𝜇1𝜇2𝜇3

𝑃0 =𝜆2𝜇3𝑃2

𝑃4 =𝜆0𝜆1𝜆2𝜆3𝜇1𝜇2𝜇3𝜇4

𝑃0 =𝜆3𝜇4𝑃3

𝑃5 =𝜆0𝜆1𝜆2𝜆3𝜆4𝜇1𝜇2𝜇3𝜇4𝜇5

𝑃0 =𝜆4𝜇5𝑃4

𝑃0 = 1 +𝜆0𝜇1

+𝜆0𝜆1𝜇1𝜇2

+𝜆0𝜆1𝜆2𝜇1𝜇2𝜇3

+𝜆0𝜆1𝜆2𝜆3𝜇1𝜇2𝜇3𝜇4

+𝜆0𝜆1𝜆2𝜆3𝜆4𝜇1𝜇2𝜇3𝜇4𝜇5

+ …

−1

1 +𝜆0𝜇1

+𝜆0𝜆1𝜇1𝜇2

+𝜆0𝜆1𝜆2𝜇1𝜇2𝜇3

+𝜆0𝜆1𝜆2𝜆3𝜇1𝜇2𝜇3𝜇4

+𝜆0𝜆1𝜆2𝜆3𝜆4𝜇1𝜇2𝜇3𝜇4𝜇5

+ …

Page 19: QUEUING THEORY - PHL CHED Connect

QUEUING THEORYBirth-and-Death Model of Markovian Queues

University of the Philippines

0 1 2 3 4 5

5/hr 5/hr 5/hr 5/hr 5/hr

4/hr 8/hr 8/hr 8/hr 8/hr

𝑃1 =𝜆0𝜇1𝑃0 =

5

40.249 = 0.311

𝑃2 =𝜆1𝜇2𝑃1 =

5

80.311 = 0.195

𝑃3 =𝜆2𝜇3𝑃2 =

5

80.195 = 0.122

𝑃4 =𝜆3𝜇4𝑃3 =

5

80.122 = 0.076

𝑃5 =𝜆4𝜇5𝑃4 =

5

80.076 = 0.048

𝑃0 = 1 +𝜆0𝜇1

+𝜆0𝜆1𝜇1𝜇2

+𝜆0𝜆1𝜆2𝜇1𝜇2𝜇3

+𝜆0𝜆1𝜆2𝜆3𝜇1𝜇2𝜇3𝜇4

+𝜆0𝜆1𝜆2𝜆3𝜆4𝜇1𝜇2𝜇3𝜇4𝜇5

+

−1

1 +5

4+5(5)

4(8)+5(5)(5)

4(8)(8)+5(5)(5)(5)

4(8)(8)(8)+5(5)(5)(5)

4(8)(8)(8)

Consider the rate diagram of a Markovian queuing system. Find the steady-

state probabilities Pn’s.

= 0.249

Page 20: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

𝜌 =𝜆

𝜇< 1 𝑃0 = 1 − 𝜌

𝐿 =𝜌

1 − 𝜌=

𝜆

𝜇 − 𝜆𝐿𝑞 =

𝜌2

1 − 𝜌=

𝜆2

)𝜇(𝜇 − 𝜆

𝑃𝑛 = 𝜌𝑛(1 − 𝜌)

𝑊 =𝜌

)𝜆(1 − 𝜌=

1

𝜇 − 𝜆𝑊𝑞 =

𝜌2

)𝜆(1 − 𝜌=

𝜆

)𝜇(𝜇 − 𝜆

0 1 2 3 . . .

λ λ λ λ

μ μ μ μ

𝑃 > 𝑡 = 𝜌𝑒−𝜇 1−𝜌 𝑡Wq

Note: is the waiting time of customer in queue. Wq is the average waiting time of

customer in queue or E( ).

WqWq

Page 21: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

A regional airport has a single runway. Airplanes requiring the use of therunway arrive at a Poisson rate of 12 per hour. Each plane uses the runwayfor an exponential time with mean of 4 mins.

a. Find the average waiting time of airplanes before they can use therunway.

b. What is the utilization of the runway?

c. Compute the average number of airplanes currently using or waiting touse the runway.

d. Find the probability that an airplane does not need to queue to use therunway.

e. What is the probability that an airplane needs to wait for more than 6mins before it can use the runway?

Page 22: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

0 1 2 3 4 5 . . .

12/hr 12/hr 12/hr 12/hr 12/hr 12/hr

15/hr 15/hr 15/hr 15/hr 15/hr 15/hr

M/M/1 with λ = 12/hr and µ = 15/hr

Page 23: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

a. Find the average waiting time of airplanes before they can use therunway.

b. What is the utilization of the runway?

c. Compute the average number of airplanes currently using or waiting touse the runway.

𝑊𝑞 =𝜆

)𝜇(𝜇 − 𝜆=

12

)15(15 − 12= 𝟎. 𝟐𝟔𝟔𝟕 𝒉𝒓 = 𝟏𝟔𝒎𝒊𝒏𝒔

𝜌 =𝜆

𝜇=12

15= 𝟎. 𝟖𝟎

𝐿 =𝜆

𝜇 − 𝜆=

12

15 − 12= 𝟒 𝒑𝒍𝒂𝒏𝒆𝒔

Page 24: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

d. Find the probability that an airplane does not need to queue to use therunway.

e. What is the probability that an airplane needs to wait for more than 6mins before it can use the runway?

𝑃0 = 1 − 𝜌 = 1 − 0.80 = 𝟎. 𝟐𝟎

𝑃 > 𝑡 = 𝜌𝑒−𝜇 1−𝜌 𝑡 = 0.80𝑒−15 1−0.80 (660) = 𝟎. 𝟓𝟗𝟑Wq

Page 25: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

Page 26: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

A small grocery store has a single cashier lane where grocers line up to payfor their purchases. Inter-arrival time of customers is exponentiallydistributed with mean of 3 mins. Due to the variety in type and number ofitems purchased, transaction time is approximately exponentially distributedwith mean 2.5 mins.

a. Compute the average number of customers in the cashier lane.

b. Find the probability that there are at most 4 customers in the lane.

c. What is the proportion of time that the cashier is idle?

d. Find the average time a customer spends in the cashier, includingqueuing time and transaction time.

e. Buying a POS machine will help reduce average transaction time to only2 mins (20% reduction) with the aid of a barcode reader – eliminatingthe need to type item codes manually. If implemented, find the percentreduction in the average time a customer spends in the cashier.

Page 27: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

0 1 2 3 4 5 . . .

20/hr 20/hr 20/hr 20/hr 20/hr 20/hr

24/hr 24/hr 24/hr 24/hr 24/hr 24/hr

M/M/1 with λ = 20/hr and µ = 24/hr

Page 28: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

a. Compute the average number of customers in the cashier lane.

b. Find the probability that there are at most 4 customers in the lane.

c. What is the proportion of time that the cashier is idle?

𝐿 =𝜆

𝜇 − 𝜆=

20

20 − 24= 𝟓 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔

𝑛=0

4

𝑃𝑛 =

𝑛=0

4

)𝜌𝑛(1 − 𝜌 =

𝑛=0

420

24

𝑛

1 −20

24= 𝟎. 𝟓𝟗𝟖

𝑃0 = 1 − 𝜌 = 1 −20

24= 𝟎. 𝟏𝟔𝟕

Page 29: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

d. Find the average time a customer spends in the cashier, includingqueuing time and transaction time.

e. Buying a POS machine will help reduce average transaction time to only2 mins (20% reduction) with the aid of a barcode reader – eliminatingthe need to type item codes manually. If implemented, find the percentreduction in the average time a customer spends in the cashier.

𝑊 =1

𝜇 − 𝜆=

1

24 − 20= 0.25 ℎ𝑟 = 𝟏𝟓𝒎𝒊𝒏𝒔

𝑊𝑛𝑒𝑤 =1

𝜇𝑛𝑒𝑤 − 𝜆=

1

30 − 20= 0.10 ℎ𝑟 = 𝟔𝒎𝒊𝒏𝒔

% 𝑅𝑒𝑑𝑢𝑐𝑡𝑖𝑜𝑛 =15 𝑚𝑖𝑛𝑠 − 6 𝑚𝑖𝑛𝑠

15 𝑚𝑖𝑛𝑠= 𝟔𝟎%

Page 30: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1

University of the Philippines

Page 31: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

0 1 2 s-1. . .

λ λ λ λ

μ 2μ 3μ sμ

. . .s

λ

s+1

sμ(s-1)μ

λ

λ

𝜌 =𝜆

𝑠𝜇< 1 𝑃 𝑛 ≥ 𝑠 =

Τ𝜆 𝜇 𝑠𝑃0)𝑠! (1 − 𝜌

𝑃0 = 𝑛=0

𝑠−1 Τ𝜆 𝜇 𝑛

𝑛!+

Τ𝜆 𝜇 𝑠

)𝑠! (1 − 𝜌

−1

𝑃𝑛 =

Τ𝜆 𝜇 𝑛𝑃0𝑛!

, 𝑛 ≤ 𝑠.Τ𝜆 𝜇 𝑛𝑃0𝑠! 𝑠𝑛−𝑠

, 𝑛 ≥ 𝑠

𝐿𝑞 =𝑃 𝑛 ≥ 𝑠 𝜌

1 − 𝜌

𝑊𝑞 =𝑃 𝑛 ≥ 𝑠

𝑠𝜇 − 𝜆

𝑃 > 𝑡 = 𝑃 𝑛 ≥ 𝑠 𝑒−𝑠𝜇 1−𝜌 𝑡Wq

Page 32: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

A customer support contact center employs 15 employees (or agents). Callsfrom customers who wish to made an inquiry enter the company’s IT systemat a Poisson rate of 94 calls per hour. The system places the call (or ticket)in a single queue and directs it to an agent once available. Customer callslast for an exponential time with mean of 8 mins

a. Find the probability that all agents are busy in a given time.

b. Find the average time a call is put on hold before it is attended by anagent.

c. On the average, how may calls are in the IT system (both being attendedto and put on hold).

d. Since waiting time is not acceptable, find the number of additionalagents required to ensure that average time a call is put on hold isreduced to at most 30 seconds.

Page 33: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

0 1 2 … 14 15 16 …

94/hr 94/hr 94/hr 94/hr 94/hr 94/hr 94/hr

7.5/hr 2(7.5)/hr 3(7.5)/hr 14(7.5)/hr 15(7.5)/hr 15(7.5)/hr 15(7.5)/hr

M/M/15 with λ = 94/hr and µ = 7.5/hr

Page 34: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

a. Find the probability that all agents are busy in a given time.

𝜌 =𝜆

𝑠𝜇=

94

15(7.5)= 0.836

𝑃0 = 𝑛=0

𝑠−1 Τ𝜆 𝜇 𝑛

𝑛!+

Τ𝜆 𝜇 𝑠

)𝑠! (1 − 𝜌

−1

= 𝑛=0

14 Τ94 7.5 𝑛

𝑛!+

Τ94 7.5 15

)15! (1 − 0.836

−1

= 2.96 𝑥 10−6

𝑃 𝑛 ≥ 𝑠 =Τ𝜆 𝜇 𝑠𝑃0

)𝑠! (1 − 𝜌=

94/7.5 15 2.96 𝑥 10−6

)15! (1 − 0.836= 𝟎. 𝟒𝟎𝟕

Page 35: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

b. Find the average time a call is put on hold before it is attended by anagent.

c. On the average, how may calls are in the IT system (both being attendedto and put on hold).

𝑊𝑞 =𝑃 𝑛 ≥ 𝑠

𝑠𝜇 − 𝜆=

0.407

15(7.5) − 94= 𝟎. 𝟎𝟐𝟐 𝒉𝒓 = 𝟏. 𝟑𝟐𝟏𝒎𝒊𝒏𝒔

𝐿𝑞 =𝑃 𝑛 ≥ 𝑠 𝜌

1 − 𝜌=0.407 ∗ 0.836

1 − 0.836= 2.069 𝑐𝑎𝑙𝑙𝑠

𝐿 = 𝐿𝑞 +𝜆

𝜇= 2.069 +

94

7.5= 𝟏𝟒. 𝟔𝟎𝟐 𝒄𝒂𝒍𝒍𝒔

Page 36: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

d. Since waiting time is not acceptable, find the number of additionalagents required to ensure that average time a call is put on hold isreduced to at most 30 seconds (0.5 min).

s Wq

15 1.321 mins

16 0.619 min

17 0.306 min

18 0.155 min

Page 37: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

Page 38: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

A dental clinic has three dentists. Patients arrive at a Poisson rate of 2.7patients / hr. Due to the varying nature of services required by patients, thetime a dentist needs to serve a patient is found to be exponentiallydistributed with mean of 40 mins per patient. Compute the fourperformance measures (L, Lq, W, Wq) of the queuing system for the twoassumptions below:

a. Assume that patients are indifferent

among the three dentists and are

willing to be attended by whoever is

immediately available. There is a

single queue of patients.

b. Assume each patient has a preferred

dentist. Thus, there are three

separate queues, each with identical

arrival rate of 0.9 patient per hour.

Page 39: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

a. Assume that patients are indifferent among the three dentists and arewilling to be attended by whoever is immediately available. There is asingle queue of patients.

0 1 2 3 4 5 . . .

2.7/hr 2.7/hr 2.7/hr 2.7/hr 2.7/hr 2.7/hr

1.5/hr 3.0/hr 4.5/hr 4.5/hr 4.5/hr 4.5/hr

M/M/3 with λ = 2.7/hr and µ = 1.5/hr

Page 40: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

a. Assume that patients are indifferent among the three dentists and arewilling to be attended by whoever is immediately available. There is asingle queue of patients.

𝜌 =𝜆

𝑠𝜇=

2.7

3(1.5)= 0.60

𝑃0 = 𝑛=0

𝑠−1 Τ𝜆 𝜇 𝑛

𝑛!+

Τ𝜆 𝜇 𝑠

)𝑠! (1 − 𝜌

−1

= 𝑛=0

2 Τ2.7 1.5 𝑛

𝑛!+

Τ2.7 1.5 𝑠

)3! (1 − 0.60

−1

= 0.146

𝑃 𝑛 ≥ 𝑠 =Τ𝜆 𝜇 𝑠𝑃0

)𝑠! (1 − 𝜌=

2.7/1.5 30.146

)3! (1 − 0.60= 0.355

Page 41: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

a. Assume that patients are indifferent among the three dentists and arewilling to be attended by whoever is immediately available. There is asingle queue of patients.

𝐿𝑞 =𝑃 𝑛 ≥ 𝑠 𝜌

1 − 𝜌=0.355 ∗ 0.60

1 − 0.60= 𝟎. 𝟓𝟑𝟐 𝒑𝒂𝒕𝒊𝒆𝒏𝒕𝒔

𝐿 = 𝐿𝑞 +𝜆

𝜇= 0.532 +

2.7

1.5= 𝟐. 𝟑𝟑𝟐 𝒑𝒂𝒕𝒊𝒆𝒏𝒕𝒔

𝑊𝑞 =𝑃 𝑛 ≥ 𝑠

𝑠𝜇 − 𝜆=

0.355

3(1.5) − 2.7= 𝟎. 𝟏𝟗𝟕 𝒉𝒓 = 𝟏𝟏. 𝟖𝟐𝟓𝒎𝒊𝒏𝒔

𝑊 = 𝑊𝑞 +1

𝜇= 0.197 +

1

1.5= 𝟎. 𝟖𝟔𝟒 𝒉𝒓 = 𝟓𝟏. 𝟖𝟐𝟓𝒎𝒊𝒏𝒔

Page 42: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

b. Assume each patient has a preferred dentist. Thus, there are threeseparate queues, each with identical arrival rate of 0.9 patient per hour.

M/M/1 with λ = 0.9/hr, µ = 1.5/hr

𝐿𝑞 =𝜆2

𝜇(𝜇 − 𝜆)=

0.92

1.5(1.5 − 0.9)= 𝟎. 𝟗𝟎 𝒑𝒂𝒕𝒊𝒆𝒏𝒕

𝐿 =𝜆

𝜇 − 𝜆=

0.9

1.5 − 0.9= 𝟏. 𝟓 𝒑𝒂𝒕𝒊𝒆𝒏𝒕𝒔

𝑊 =1

𝜇 − 𝜆=

1

1.5 − 0.9= 𝟏. 𝟔𝟕 𝒉𝒓𝒔 = 𝟏𝟎𝟎𝒎𝒊𝒏𝒔

𝑊𝑞 =𝜆

𝜇(𝜇 − 𝜆)=

0.9

1.5(1.5 − 0.9)= 𝟏 𝒉𝒓 = 𝟔𝟎𝒎𝒊𝒏𝒔

Page 43: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

(a) 1 M/M/3 (b) 3 M/M/1

Whole Individual Whole

Lq (patients) 0.532 0.90 2.70

L (patients) 2.332 1.50 4.50

Wq (hours) 0.197 1.00 1.00

W (hours) 0.864 1.67 1.67

Page 44: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

Page 45: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s

University of the Philippines

Page 46: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSG/G/∞ (Self-Service Model)

University of the Philippines

𝑊𝑞 = 𝐿𝑞 = 0 𝑊 =1

𝜇𝐿 =

𝜆

𝜇

For G/G/∞/GD/∞/∞

Only for M/G/∞/GD/∞/∞

𝑃𝑛 =𝑒 )−( Τ𝜆 𝜇 ( )Τ𝜆 𝜇 𝑛

𝑛!

Page 47: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSG/G/∞ (Self-Service Model)

University of the Philippines

A gym is available to its members 24/7. Members arrive at a Poisson rate of4 per hour. On the average, each member stays in the gym for a normallydistributed time with mean of 2.5 hrs and standard deviation of 0.5 hr.

a. How many members are expected to be found in the gym at any givenpoint in time?

b. What is the probability that there are at most 14 members in the gym?

Page 48: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSG/G/∞ (Self-Service Model)

University of the Philippines

a. How many members are expected to be found in the gym at any givenpoint in time?

b. What is the probability that there are at most 14 members in the gym?

𝐿 =𝜆

𝜇=

4

0.4= 𝟏𝟎𝒎𝒆𝒎𝒃𝒆𝒓𝒔

𝑛=0

14

𝑃𝑛 =

𝑛=0

14𝑒−(𝜆/𝜇) 𝜆/𝜇 𝑛

𝑛!=

𝑛=0

14𝑒−(4/0.4) 4/0.4 𝑛

𝑛!= 𝟎. 𝟗𝟏𝟕

M/G/∞ with λ = 4/hr and µ = 0.4/hr

Page 49: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSG/G/∞ (Self-Service Model)

University of the Philippines

Page 50: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1/GD/K/∞

University of the Philippines

0 1 2 . . .

λ λ λ

μ μ μ

K-1

λ

μ

K

μ

λ

𝜌 =𝜆

𝜇

𝑃𝑛 =

1 − 𝜌 𝜌𝑛

1 − 𝜌𝐾+1, 𝜌 ≠ 1

1

𝐾 + 1, 𝜌 = 1

For n > K, Pn = 0.

For n ≤ K:

𝐿𝑞 = 𝐿 − (1 − 𝑃0)

𝜆𝑎𝑣𝑒 = ҧ𝜆 = 𝜆(1 − 𝑃𝐾

𝐿 =

𝜌

1 − 𝑝−

𝐾 + 1 𝜌𝐾+1

1 − 𝜌𝐾+1, 𝜌 ≠ 1

.𝐾

2, 𝜌 = 1

Page 51: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

0 1 s. . .

λ λ λ

μ 2μ sμ

K-1

λ

K

sμsμ

λ

. . .

λ

𝜌 =𝜆

𝑠𝜇, 𝑠 ≤ 𝐾 𝑃0 =

𝑛=0

𝑠 Τ𝜆 𝜇 𝑛

𝑛!+

Τ𝜆 𝜇 𝑠

𝑠!

𝑛=𝑠+1

𝐾

𝜌𝑛−𝑠−1

𝑃𝑛 =

Τ𝜆 𝜇 𝑛𝑃0𝑛!

, 𝑛 ≤ 𝑠.Τ𝜆 𝜇 𝑛𝑃0𝑠! 𝑠𝑛−𝑠

, 𝑛 ≥ 𝑠

For n > K, Pn = 0.

For n ≤ K:

𝐿𝑞 =𝜌 Τ𝜆 𝜇 𝑠𝑃0 )1 − 𝜌𝐾−𝑠 − 𝐾 − 𝑠 𝜌𝐾−𝑠(1 − 𝜌

𝑠! 1 − 𝜌 2

𝐿 = 𝐿𝑞 + 𝑛=0

𝑠−1

𝑛𝑃𝑛 + 𝑠 1 − 𝑛=0

𝑠−1

𝑃𝑛

൯𝜆𝑎𝑣𝑒 = ҧ𝜆 = 𝜆(1 − 𝑃𝐾

Page 52: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

A drive-thru of a fast food chain has a single window that services itscustomers. Attending a customer takes an exponential time with mean of 4mins. Including the space for the car/customer being served, the drive-thruhas a total of 6 available spaces. If an arriving car finds that all spaces aretaken, it will opt to get meals elsewhere. Cars arrive at the drive-thru at aPoisson rate of 15 customers per hour (but not all can enter as pointed out).

a. Find the average number of customers in the queuing system.

b. On the average, how long does a car stay in the drive-thru?

c. What is the probability that all the available spaces are occupied?

d. If each served customer generates a revenue of PhP 200, find theexpected total revenue in 4 hours of operations?

Page 53: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

0 1 2 3 4 5 6

15/hr 15/hr 15/hr 15/hr 15/hr 15/hr

15/hr 15/hr 15/hr 15/hr 15/hr 15/hr

M/M/1/FCFS/6/∞ with λ = 15/hr and µ = 15/hr

Page 54: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

a. Find the average number of customers in the queueing system.

b. On the average, how long does a car stay in the drive-thru?

𝜌 =𝜆

𝜇=15

15= 𝟏

𝐿 =𝐾

2=6

2= 𝟑 𝒄𝒂𝒓𝒔

𝑃𝐾 =1

𝐾 + 1=

1

6 + 1= 𝟎. 𝟏𝟒𝟑

)𝜆𝑎𝑣𝑒 = 𝜆(1 − 𝑃𝐾 = 15 1 − 0.143 = 𝟏𝟐. 𝟖𝟓𝟕 𝒄𝒂𝒓𝒔

𝑊 =𝐿

𝜆𝑎𝑣𝑒=

3

12.857= 𝟎. 𝟐𝟑𝟑 𝒉𝒓 = 𝟏𝟒𝒎𝒊𝒏𝒔

Page 55: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

c. What is the probability that all the available spaces are occupied?

d. If each served customer generates a revenue of PhP 200, find theexpected total revenue in 4 hours of operations?

𝑃𝐾 =1

𝐾 + 1=

1

6 + 1= 𝟎. 𝟏𝟒𝟑

)𝜆𝑎𝑣𝑒 = 𝜆(1 − 𝑃𝐾 = 15 1 − 0.143 = 𝟏𝟐. 𝟖𝟓𝟕 𝒄𝒂𝒓𝒔

𝑇𝑜𝑡𝑎𝑙 𝑅𝑒𝑣𝑒𝑛𝑢𝑒 = 200(4)𝜆𝑎𝑣𝑒 = 200(4) 12.857 = 𝐏𝐡𝐏 𝟏𝟎, 𝟐𝟖𝟓. 𝟕𝟏

Page 56: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

Page 57: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

An amusement arcade has 5 videoke booths where customers can belttheir hearts out. Customers arrive at a Poisson rate of 4 groups per hour.Each group occupies one booth for an exponential time with mean of 1 hour.If a group finds no vacant videoke booth, the group will then leave.

a. Find the average number of occupied videoke booths.

b. What is the average time a group spends in queue before it can use thebooth?

c. Find the proportion of time that a given booth is occupied.

d. On the average, how many groups balk in an hour?

e. Recompute average time a group spent in queue assuming this timethat arriving groups will only balk if there are two groups already waiting,in addition to the five groups in the booths.

Page 58: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

0 1 2 3 4 5

4/hr 4/hr 4/hr 4/hr 4/hr

1/hr 2/hr 3/hr 4/hr 5/hr

M/M/5/FCFS/5/∞ with λ = 4/hr and µ = 1/hr

Page 59: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

a. Find the average number of occupied videoke booths.

𝜌 =𝜆

𝑠𝜇=

4

5(1)= 0.80

𝑃0 = 𝑛=0

𝑠 Τ𝜆 𝜇 𝑛

𝑛!+

Τ𝜆 𝜇 𝑠

𝑠!

𝑛=𝑠+1

𝐾

𝜌𝑛−𝑠−1

𝑃0 = 𝑛=0

5 Τ4 1 𝑛

𝑛!+

Τ4 1 5

5!

𝑛=6

5

0.80𝑛−5−1

= 0.0233

𝐿𝑞 =𝜌 Τ𝜆 𝜇 𝑠𝑃0 )1 − 𝜌𝐾−𝑠 − 𝐾 − 𝑠 𝜌𝐾−𝑠(1 − 𝜌

𝑠! 1 − 𝜌 2

𝐿𝑞 =0.80 Τ4 1 5(0.0233) )1 − 0.85−5 − 5 − 5 0.85−5(1 − 0.80

5! 1 − 0.80 2 = 0

Page 60: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

a. Find the average number of occupied videoke booths.

𝑃1 =(𝜆/𝜇)𝑛𝑃0

𝑛!=(4/1)10.0233

1!= 0.0933

𝑃2 =(𝜆/𝜇)𝑛𝑃0

𝑛!=(4/1)20.0233

2!= 0.1866

𝑃3 =(𝜆/𝜇)𝑛𝑃0

𝑛!=(4/1)30.0233

3!= 0.2488

𝑃4 =(𝜆/𝜇)𝑛𝑃0

𝑛!=(4/1)40.0233

4!= 0.2488

𝑃5 =(𝜆/𝜇)𝑛𝑃0

𝑛!=(4/1)50.0233

5!= 0.1991

𝐿 = 𝐿𝑞 + 𝑛=0

𝑠−1

𝑛𝑃𝑛 + 𝑠 1 − 𝑛=0

𝑠−1

𝑃𝑛 = 0 +𝑛=0

4

𝑛𝑃𝑛 + 5 1 − 𝑛=0

4

𝑃𝑛

𝐿 = 𝟑. 𝟐𝟎𝟑𝟕 𝒃𝒐𝒐𝒕𝒉𝒔

Page 61: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

b. What is the average time a group spends in queue before it can use thebooth?

c. Find the proportion of time that a given booth is occupied.

d. On the average, how many groups balk in an hour?

)𝜆𝑎𝑣𝑒 = 𝜆(1 − 𝑃𝐾 = 4 1 − 0.1991 = 3.204 𝑔𝑟𝑜𝑢𝑝𝑠/ℎ𝑟

𝑊𝑞 =𝐿𝑞𝜆𝑎𝑣𝑒

=0

3.204= 𝟎 𝒉𝒓 = 𝟎𝒎𝒊𝒏

% 𝑈𝑡𝑖𝑙 =𝜆𝑎𝑣𝑒𝑠µ

=3.204

5(1)= 𝟔𝟒. 𝟎𝟕%

𝜆𝑏𝑎𝑙𝑘 = 𝜆𝑃𝐾 = 4 0.1991 = 𝟎. 𝟕𝟗𝟔 𝒈𝒓𝒐𝒖𝒑/𝒉𝒓

Page 62: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

𝑃1 =4

1𝑃0 =

4

1(0.0233) = 0.0933

𝑃2 =4

2𝑃1 =

4

2(0.0933) = 0.1866

𝑃3 =4

3𝑃2 =

4

3(0.1866) = 0.2488

𝑃4 =4

4𝑃3 =

4

4(0.2488) = 0.2488

𝑃5 =4

5𝑃4 =

4

5(0.2488) = 0.1991

𝑃0 = 1 +4

1+4(4)

1(2)+4(4)(4)

1(2)(3)+4(4)(4)(4)

1(2)(3)(4)+4(4)(4)(4)(4)

1(2)(3)(4)(5)

−1

= 0.0233

Page 63: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

a. Find the average number of occupied videoke booths.

b. What is the average time a group spends in queue before it can use thebooth?

𝐿 = 𝑛=0

K

𝑛𝑃𝑛 = 0 0.0233 + 1 0.0933 + …+ 5 0.1991 = 𝟑. 𝟐𝟎𝟑𝟕 𝒃𝒐𝒐𝒕𝒉𝒔

𝑊𝑞 =𝐿𝑞𝜆𝑎𝑣𝑒

=0

3.204= 𝟎 𝒉𝒓 = 𝟎𝒎𝒊𝒏

𝐿𝑞 = 𝑛>s

(𝑛 − 𝑠)𝑃𝑛 = 0 𝑔𝑟𝑜𝑢𝑝

𝜆𝑎𝑣𝑒 =𝑛=0

K

𝜆𝑛𝑃𝑛 = 4 0.0233 + 4 0.0933 + …+ 0 0.1991 = 3.204 𝑔𝑟𝑜𝑢𝑝𝑠/ℎ𝑟

Page 64: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

c. Find the proportion of time that a given booth is occupied.

d. On the average, how many groups balk in an hour?

%𝑈𝑡𝑖𝑙 =0

50.0233 +

1

50.0933 +

2

50.1866 + ⋯+

5

50.1991 = 𝟔𝟒. 𝟎𝟕%

𝜆𝑏𝑎𝑙𝑘 = 0 0.0233 + 0 0.0933 + …+ 4 0.1991 = 𝟎. 𝟕𝟗𝟔 𝒈𝒓𝒐𝒖𝒑/𝒉𝒓

Page 65: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

0 1 2 3 4 5 6 7

4/hr 4/hr 4/hr 4/hr 4/hr 4/hr 4/hr

1/hr 2/hr 3/hr 4/hr 5/hr 5/hr 5/hr

M/M/5/FCFS/7/∞ with λ = 4/hr and µ = 1/hr

Page 66: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

e. Recompute average time spent in queue assuming this time thatarriving groups will only balk if there are two groups already waiting, inaddition to the five groups in the booths.

𝑃0 = 1 +4

1+4(4)

1(2)+4(4)(4)

1(2)(3)+ ⋯+

4(4)(4)(4)(4)(4)

1(2)(3)(4)(5)(5)+4(4)(4)(4)(4)(4)(4)

1(2)(3)(4)(5)(5)(5)

−1

𝑃0 = 0.0181

Page 67: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

e. Recompute average time spent in queue assuming this time thatarriving groups will only balk if there are two groups already waiting, inaddition to the five groups in the booths.

𝑃1 =4

1𝑃0 =

4

1(0.181) = 0.0725

𝑃2 =4

2𝑃1 =

4

2(0.0725) = 0.1450

𝑃3 =4

3𝑃2 =

4

3(0.1450) = 0.1934

𝑃4 =4

4𝑃3 =

4

4(0.1934) = 0.1934

𝑃5 =4

5𝑃4 =

4

5(0.1934) = 0.1547

𝑃6 =4

5𝑃5 =

4

5(0.1547) = 0.1238

𝑃7 =4

5𝑃6 =

4

5(0.1238) = 0.0990

Page 68: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

e. Recompute average time spent in queue assuming this time thatarriving groups will only balk if there are two groups already waiting, inaddition to the five groups in the booths.

𝐿𝑞 = 𝑛>s

(𝑛 − 𝑠)𝑃𝑛 = 1𝑃6 + 2𝑃7 = 1 0.1238 + 2 0.0990 = 0.3218 𝑔𝑟𝑜𝑢𝑝

𝜆𝑎𝑣𝑒 =𝑛=0

K

𝜆𝑛𝑃𝑛 = 4 𝑃0 + 𝑃1 + 𝑃2 + 𝑃3 + 𝑃4 + 𝑃5 + 𝑃6 + 0𝑃7 = 4 1 − 𝑃7

𝜆𝑎𝑣𝑒 = 4 1 − 0.990 = 3.604 𝑔𝑟𝑜𝑢𝑝𝑠/ℎ𝑟

𝑊𝑞 =𝐿𝑞𝜆𝑎𝑣𝑒

=0.3218

3.604= 𝟎. 𝟎𝟖𝟗𝟑 𝒉𝒓 = 𝟓. 𝟑𝟓𝟖𝒎𝒊𝒏𝒔

Page 69: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/K/∞

University of the Philippines

Page 70: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/1/GD/N/N

University of the Philippines

For n > N, Pn = 0.

For n ≤ N:

0 1 2 . . .

Nλ (N-1)λ

μ μ μ

N-1

λ

μ

N

μ

2λ(N-2)λ

𝑃0 = 𝑛=0

𝑁 𝑁!

𝑁 − 𝑛 !

𝜆

𝜇

𝑛 −1

𝑃𝑛 =𝑁!

𝑁 − 𝑛 !

𝜆

𝜇

𝑛

𝑃0

𝐿 = 𝑁 −𝜇

𝜆1 − 𝑃0

𝐿𝑞 = 𝑁 −𝜇 + 𝜆

𝜆1 − 𝑃0

൯𝜆𝑎𝑣𝑒 = ҧ𝜆 = 𝜆(𝑁 − 𝐿

Page 71: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

For n > N, Pn = 0.

For n ≤ N:

0 1 s. . .

Nλ (N-1)λ 2λ

μ 2μ sμ

N-1

λ

N

sμsμ

(N-s+1)λ

. . .

(N-s)λ

𝑃0 = 𝑛=0

𝑠−1

𝐶𝑛𝑁

𝜆

𝜇

𝑛

+ 𝑛=𝑠

𝑁 𝐶𝑛𝑁𝑛!

𝑠! 𝑠𝑛−𝑠𝜆

𝜇

𝑛 −1

𝑃𝑛 =

𝐶𝑛𝑁

𝜆

𝜇

𝑛

𝑃0, 𝑛 ≤ 𝑠

.

𝐶𝑛𝑁𝑛!

𝑠! 𝑠𝑛−𝑠𝜆

𝜇

𝑛

𝑃0, 𝑛 ≥ 𝑠

𝐿𝑞 = 𝑛=𝑠

𝑁

൫𝑛 − 𝑠)𝑃𝑛

𝐿 = 𝐿𝑞 + 𝑛=0

𝑠−1

𝑛𝑃𝑛 + 𝑠 1 − 𝑛=0

𝑠−1

𝑃𝑛

൯𝜆𝑎𝑣𝑒 = ҧ𝜆 = 𝜆(𝑁 − 𝐿

Page 72: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

A printing business has five printing machines used for high-volume orders.All throughout the day, these machines are running, except for a few timeswhen they are required to be attended by a printing employee to setmachine parameters. In some instances, the machines may wait for anemployee to be available since the employees may be attending othermachines for setup. The business employs two printing employees. Eachemployee can setup a machine at an exponential time with mean of 20mins. After setup, each machine runs for an exponential time with mean 2hrs before requiring another setup.

a. What is the proportion of time that the both employees are idle as allmachines are working?

b. On the average, how long does a machine queue before being attendedby an employee for setup?

c. A cost of PhP 1,000 per hour is incurred if a machine is not running dueto lost machine productivity, find the total expected cost of waiting in anhour considering all the machines.

Page 73: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

0 1 2 3 4 5

2.5/hr 2.0/hr 1.5/hr 1.0/hr 0.5/hr

3/hr 6/hr 6/hr 6/hr 6/hr

M/M/2/FCFS/5/5 with λ = 0.5/hr and µ = 3/hr

Page 74: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

a. What is the proportion of time that the both employees are idle as allmachines are working?

b. On the average, how long does a machine queue before being attendedby an employee for setup?

𝑃0 = 𝑛=0

𝑠−1

𝐶𝑛𝑁

𝜆

𝜇

𝑛

+ 𝑛=𝑠

𝑁 𝐶𝑛𝑁𝑛!

𝑠! 𝑠𝑛−𝑠𝜆

𝜇

𝑛 −1

𝑃0 = 𝑛=0

1

𝐶𝑛5

0.5

3

𝑛

+ 𝑛=2

5 𝐶𝑛5𝑛!

2! 2𝑛−20.5

3

𝑛 −1

= 𝟎. 𝟒𝟓𝟔

𝑃1 = 𝐶𝑛𝑁

𝜆

𝜇

𝑛

𝑃0 = 𝐶15

0.5

3

1

0.456 = 0.3800

𝑃2 = 𝐶𝑛𝑁

𝜆

𝜇

𝑛

𝑃0 = 𝐶25

0.5

3

2

0.456 = 0.1267

Page 75: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

b. On the average, how long does a machine queue before being attendedby an employee for setup?

𝑃3 =𝐶𝑛𝑁𝑛!

𝑠! 𝑠𝑛−𝑠𝜆

𝜇

𝑛

𝑃0 =𝐶353!

2! 23−20.5

3

𝑛

0.456 = 0.0317

𝑃4 =𝐶𝑛𝑁𝑛!

𝑠! 𝑠𝑛−𝑠𝜆

𝜇

𝑛

𝑃0 =𝐶454!

2! 24−20.5

3

𝑛

0.456 = 0.0053

𝑃5 =𝐶𝑛𝑁𝑛!

𝑠! 𝑠𝑛−𝑠𝜆

𝜇

𝑛

𝑃0 =𝐶555!

2! 25−20.5

3

𝑛

0.456 = 0.0004

𝐿𝑞 = 𝑛=𝑠

𝑁

൫𝑛 − 𝑠)𝑃𝑛 = 0𝑃2 + 1𝑃3 + 2𝑃4 + 3𝑃5 = 0.0435 𝑚𝑎𝑐ℎ𝑖𝑛𝑒𝑠

Page 76: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

b. On the average, how long does a machine queue before being attendedby an employee for setup?

𝐿 = 𝐿𝑞 + 𝑛=0

𝑠−1

𝑛𝑃𝑛 + 𝑠 1 − 𝑛=0

𝑠−1

𝑃𝑛 = 0.0435 + 𝑛=0

1

𝑛𝑃𝑛 + 2 1 − 𝑛=0

1

𝑃𝑛

𝐿 = 0.0435 + 0 0.3800 + 1 0.1267 + 2 1 − 0.3800 − 0.1267 = 0.7516 𝑚𝑎𝑐ℎ𝑖𝑛𝑒𝑠

)𝜆𝑎𝑣𝑒 = 𝜆(N − 𝐿 = 0.5 5 − 0.7516 = 2.1242 𝑚𝑎𝑐ℎ𝑖𝑛𝑒𝑠/ℎ𝑟

𝑊𝑞 =𝐿𝑞𝜆𝑎𝑣𝑒

=0.0435

2.1242= 𝟎. 𝟎𝟐𝟎𝟓 𝒉𝒓 = 𝟏. 𝟐𝟐𝟗𝟖𝒎𝒊𝒏𝒔

Page 77: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

c. A cost of PhP 1,000 per hour is incurred if a machine is not running dueto lost machine productivity, find the total expected cost of waiting in anhour considering all the machines.

𝐻𝑜𝑢𝑟𝑙𝑦 𝑊𝑎𝑖𝑡𝑖𝑛𝑔 𝐶𝑜𝑠𝑡 = 1000𝑊𝜆𝑎𝑣𝑒 = 1000𝐿 = 1000 0.7516 = 𝑷𝒉𝑷 𝟕𝟓𝟏. 𝟔𝟏

Page 78: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

Page 79: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

A hospital wing has a supply station where nurses retrieve items importantto their patients. The station is manned by a single supply officer. The winghas 6 nurses. On the average, each nurse will use be back to the station1.25 hours after his or her last visit. Assume exponential time. The supplyofficer takes an exponential time with mean of 6 minutes to service therequirement of a nurse.

a. Find the probability that there are exactly 2 nurses, including the onebeing served, in the supply station.

b. Find the proportion of time the supply officer is busy.

c. How long, on the average, does a nurse stay in the supply station beforeher transaction is completed.

Page 80: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

0 1 2 3 4 5 6

4.8/hr 4.0/hr 3.2/hr 2.4/hr 1.6/hr 0.8/hr

10/hr 10/hr 10/hr 10/hr 10/hr 10/hr

M/M/1/FCFS/6/6 with λ = 0.8/hr and µ = 10/hr

Page 81: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

𝑃1 =4.8

10𝑃0 =

4.8

10(0.5712) = 0.2742

𝑃2 =4.0

10𝑃1 =

4.0

10(0.2742) = 0.1097

𝑃3 =3.2

10𝑃2 =

3.2

10(0.1097) = 0.0351

𝑃4 =2.4

10𝑃3 =

2.4

10(0.0351) = 0.0084

𝑃5 =1.6

10𝑃4 =

1.6

10(0.0084) = 0.0013

𝑃0 = 1 +4.8

10+4.8(4.0)

10(10)+ ⋯+

4.8(4.0)(3.2)(2.4)(1.6)(0.8)

10(10)(10)(10)(10)(10)

−1

= 0.5712

𝑃6 =0.8

10𝑃5 =

0.8

10(0.0013) = 0.0001

Page 82: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

a. Find the probability that there are exactly 2 nurses, including the onebeing served, in the supply station.

b. Find the proportion of time the supply officer is busy.

𝑃2 = 𝟎. 𝟏𝟎𝟗𝟕

% 𝑈𝑡𝑖𝑙 =0

1𝑃0 +

1

1𝑃1 + 𝑃2 + 𝑃3 + 𝑃4 + 𝑃5 + 𝑃6 = 1 − 𝑃0

%𝑈𝑡𝑖𝑙 = 1 − 0.5712 = 𝟒𝟐. 𝟖𝟖%

Page 83: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

c. How long, on the average, does a nurse stay in the supply station beforeher transaction is completed?

𝐿 = 𝑛=0

N

𝑛𝑃𝑛 = 0 0.5712 + 1 0.2742 + …+ 6 0.0001 = 0.6399 𝑛𝑢𝑟𝑠𝑒

𝜆𝑎𝑣𝑒 =𝑛=0

K

𝜆𝑛𝑃𝑛 = 4.8𝑃0 + 4.0𝑃1 + 3.2𝑃2 + 2.4𝑃3 + 1.6𝑃4 + 0.8𝑃5 + 0𝑃6

𝜆𝑎𝑣𝑒 = 4.8 0.05712 + 4.0 0.2742 +⋯+ 0 0.0001 = 4.2881 𝑛𝑢𝑟𝑠𝑒𝑠/ℎ𝑟

𝑊 =𝐿

𝜆𝑎𝑣𝑒=0.6399

4.2881= 𝟎. 𝟏𝟒𝟗𝟐 𝒉𝒓 = 𝟖. 𝟗𝟓𝟑𝟏𝒎𝒊𝒏𝒔

Page 84: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/M/s/GD/N/N

University of the Philippines

Page 85: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/G/1

University of the Philippines

Pollaczek-Khinchin Equation, where variance of service time is given as σ2.

𝐿𝑞 =(𝜆𝜎)2+ 𝜆/𝜇 2

2 1−𝜆

𝜇

Page 86: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/G/1

University of the Philippines

Customers arrive randomly to a bank at a rate of 1 customer every 3minutes. To service customers, the bank is considering two alternatives: (a)a human teller with random service time of mean 2 minutes, and (b) ATMwith a normal service time with mean 2 minutes and standard deviation of0.3 mins. Random times are modelled using the exponential distribution.Which one should be preferred in order to minimize customer queuing time?

Page 87: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/G/1

University of the Philippines

a. human teller with random service time of mean 2 minutes

M/M/1 with λ = 20/hr and µ = 30/hr

b. ATM with a normal service time with mean 2 minutes and standarddeviation of 0.3 mins.

M/G/1 with λ = 20/hr, µ = 30/hr, and σ = 0.3/60 hr = 0.005 hr

𝑊𝑞 =𝜆

)𝜇(𝜇 − 𝜆=

20

)30(30 − 20= 𝟎. 𝟎𝟔𝟕 𝒉𝒓 = 𝟒𝒎𝒊𝒏𝒔

𝐿𝑞 =(𝜆𝜎)2+ 𝜆/𝜇 2

2(1 − 𝜆/𝜇 )=(20 ∗ 0.005)2+ 20/30 2

2(1 − 20/30 )= 0.682 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟

𝑊𝑞 =𝐿𝑞𝜆𝑎𝑣𝑒

=0.682

20= 𝟎. 𝟎𝟑𝟒 𝒉𝒓 = 𝟐. 𝟎𝟒𝟓𝒎𝒊𝒏𝒔

Page 88: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/G/1

University of the Philippines

Page 89: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/G/1

University of the Philippines

Compare the performance measures – L, Lq, W, Wq – of the followingqueueing systems: (A) M/M/1, (B) M/D/1, and (C) M/G/1 (where theservice time is uniformly distributed from 2 to 4 minutes). Assume similaraverage service rate of 20/hr, and similar arrival rate of 10/hr. Include a 4thcase (D) where the server performs two tasks on a single customer. Theservice time for each task is exponentially distributed with mean of 1.5minutes for this last case.

Page 90: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/G/1

University of the Philippines

Computations of standard deviation σ:

a. exponential with rate λexpo = 20/hr

b. Constant (deterministic)

c. continuous uniform with minimum a = 2/60 hr and maximum b =4/60 hr.

𝜎 =1

𝜆𝑒𝑥𝑝𝑜2 =

1

202= 𝟎. 𝟎𝟓𝟎𝟎 𝒉𝒓

𝜎 = 𝟎 𝒉𝒓

𝜎 =𝑏 − 𝑎 2

12=

(4/60) − (2/60) 2

12= 𝟎. 𝟎𝟏𝟔𝟕 𝒉𝒓

Page 91: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/G/1

University of the Philippines

Computations of standard deviation σ:

d. exponential with λexpo = 40/hr + exponential with λexpo = 40/hr =erlang with shape parameter k = 2 and λexpo = 40/hr

𝜎 =𝑘

𝜆𝑒𝑥𝑝𝑜2 =

2

402= 𝟎. 𝟎𝟑𝟓𝟒 𝒉𝒓

Page 92: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/G/1

University of the Philippines

Sample computations for case (D)

𝐿𝑞 =(𝜆𝜎)2+ 𝜆/𝜇 2

2(1 − 𝜆/𝜇 )=(10 ∗ 0.0354)2+ 10/20 2

2(1 − 10/20 )= 𝟎. 𝟑𝟕𝟓 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓

𝑊𝑞 =𝐿𝑞𝜆𝑎𝑣𝑒

=0.375

10= 𝟎. 𝟎𝟑𝟕𝟓 𝒉𝒓

𝑊 = 𝑊𝑞 +1

𝜇= 0.0375 +

1

20= 𝟎. 𝟎𝟖𝟕𝟓 𝒉𝒓

𝐿 = 𝜆𝑎𝑣𝑒𝑊 = 10 0.0875 = 𝟎. 𝟖𝟕𝟓 𝒉𝒓

Page 93: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/G/1

University of the Philippines

Case A B C D

Kendall-Lee Notation M/M/1 M/D/1 M/G/1 M/E2/1

Service Time Distribution exponential constant uniform erlang

Arrival Rate, λ 10/hr 10/hr 10/hr 10/hr

Service Rate, µ 20/hr 20/hr 20/hr 20/hr

Service Time Std Dev, σ 0.0500 hr 0.0000 hr 0.0167 hr 0.0354 hr

Lq (customers) 0.500 0.250 0.278 0.375

L (customers) 1.000 0.750 0.778 0.875

Wq (hrs) 0.050 0.025 0.028 0.038

W (hrs) 0.100 0.075 0.078 0.088

Page 94: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSM/G/1

University of the Philippines

Page 95: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Cooperating Servers

University of the Philippines

A car wash shop has 3 employees. Each employee can wash a car in anexponential time with mean of 45 mins. However, when there are only twocars in the shop, one of the employees will help one of the other two,reducing the average time from 45 mins to 30 mins. Meanwhile, thecustomer being served by one employee will still have a service timeaverage of 45 mins. Note than when a new vehicle arrives, one of thecooperating employee will leave its partner and will now assist the newlyarrived customer. In that case, service time average goes back to 45 minsper customer.

If there is a single customer in the shop, only two employees will wash thevehicle, with service time average of 30 mins. The third employee will beidle during this time.

Cars arrive to this system at a Poisson rate of 5 customers per hour.However, customers balk when two cars are already waiting in the shop(excluding those being washed).

Page 96: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Cooperating Servers

University of the Philippines

a. Find the expected revenue per hour of the shop if each vehicle washedgenerates PhP 200.

b. Find the average number of vehicles present in the shop.

c. On the average, how long does a vehicle stay in the car wash?

Page 97: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Cooperating Servers

University of the Philippines

0 1 2 3 4 5

5/hr 5/hr 5/hr 5/hr 5/hr

2/hr (1.33+2)/hr 3(1.33)/hr 3(1.33)/hr 3(1.33)/hr

Page 98: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Cooperating Servers

University of the Philippines

𝑃1 =5

2𝑃0 =

5

2(0.0398) = 0.0994

𝑃2 =5

3.33𝑃1 =

5

3.33(0.0994) = 0.1493

𝑃3 =5

4𝑃2 =

5

4(0.1493) = 0.1866

𝑃4 =5

4𝑃3 =

5

4(0.1866) = 0.2333

𝑃5 =5

4𝑃4 =

5

4(0.2333) = 0.2916

𝑃0 = 1 +5

2+

5(5)

2(3.33)+

5(5)(5)

2(3.33)(4)+ ⋯+

5(5)(5)(5)(5)

2(3.33)(4)(4)(4)

−1

= 0.0398

Page 99: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Cooperating Servers

University of the Philippines

a. Find the expected revenue per hour of the shop if each vehicle washedgenerates PhP 200.

b. Find the average number of vehicles present in the shop.

𝜆𝑎𝑣𝑒 =𝑛=0

5

𝜆𝑛𝑃𝑛 = 5 𝑃0 + 𝑃1 + 𝑃2 + 𝑃3 + 𝑃4 + 0𝑃5 = 5 1 − 𝑃5

𝜆𝑎𝑣𝑒 = 5 1 − 0.2916 = 3.542 𝑣𝑒ℎ𝑖𝑐𝑙𝑒𝑠/ℎ𝑟

𝐻𝑜𝑢𝑟𝑙𝑦 𝑅𝑒𝑣𝑒𝑛𝑢𝑒 = 200𝜆𝑎𝑣𝑒 = 200 3.542 = 𝑷𝒉𝑷 𝟕𝟎𝟖. 𝟒𝟎

𝐿 = 𝑛=0

5

𝑛𝑃𝑛 = 0 0.0398 + 1 0.0994 + …+ 5 0.2916 = 𝟑. 𝟑𝟒𝟗 𝒗𝒆𝒉𝒊𝒄𝒍𝒆𝒔

Page 100: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Cooperating Servers

University of the Philippines

c. On the average, how long does a vehicle stay in the car wash?

𝑊 =𝐿

𝜆𝑎𝑣𝑒=3.349

3.542= 𝟎. 𝟗𝟒𝟔 𝒉𝒓 = 𝟓𝟔. 𝟕𝟑𝟏𝒎𝒊𝒏𝒔

Page 101: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Balking Customers

University of the Philippines

A newly-opened tea shop is very popular to mall-goers. The Poisson arrivalsof customers to the said shop has rate of λ = 26 per hour. The shop has asingle employee. The mean service time is 2.5 mins. Assume that theservice time is exponentially distributed.

Though popular, some clients may not go inside when there is a relativelylong queue. They will instead go to other tea shops in the mall. Specifically,an arriving customer will balk with probability 0.30 if there are 3 or 4customers inside (including the one being served). This probability ofbalking goes up to 0.75 if there are 5 or 6 customers inside. No customerenters the queue when there are 7 customers.

a. What is the probability that the employee is idle?

b. Find the average waiting time before a customer is entertained by theemployee.

c. How many customers are lost per hour due to balking?

Page 102: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Balking Customers

University of the Philippines

0 1 2 3 4 5 6 7

26/hr 26/hr 26/hr 18.2/hr 18.2/hr 6.5/hr 6.5/hr

24/hr 24/hr 24/hr 24/hr 24/hr 24/hr 24/hr

Page 103: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Balking Customers

University of the Philippines

𝑃0 = 0.1544

𝑃1 = 0.1673

𝑃2 = 0.1812

𝑃3 = 0.1963

𝑃4 = 0.1489

𝑃5 = 0.1129

𝑃6 = 0.0306

𝑃7 = 0.0083

Page 104: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Balking Customers

University of the Philippines

a. What is the probability that the employee is idle?

b. Find the average waiting time before a customer is entertained by theemployee.

𝑃0 = 𝟎. 𝟏𝟓𝟒𝟒

𝐿𝑞 = 𝑛=𝑠

7

൫𝑛 − 𝑠)𝑃𝑛 = 0𝑃1 + 1𝑃2 + 2𝑃3 +⋯+ 6𝑃7

𝐿𝑞 = 0 0.1673 + 1 0.1812 + 2 0.1963 + ⋯+ 6 0.0083 = 1.675 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠

𝜆𝑎𝑣𝑒 =𝑛=0

7

𝜆𝑛𝑃𝑛 = 26𝑃0 + 26𝑃1 + 26𝑃2 + 18.2𝑃3 + 18.2𝑃4 + 6.5𝑃5 + 6.5𝑃6 + 0𝑃7

𝜆𝑎𝑣𝑒 = 26 0.1544 + 26 0.1673 + ⋯+ 0 0.0083 = 20.294 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠/ℎ𝑟

𝑊𝑞 =𝐿𝑞𝜆𝑎𝑣𝑒

=1.675

20.294= 𝟎. 𝟎𝟖𝟑 𝒉𝒓 = 𝟒. 𝟗𝟓𝟐𝒎𝒊𝒏𝒔

Page 105: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSOther Models: Balking Customers

University of the Philippines

c. How many customers are lost per hour due to balking?

𝜆𝑏𝑎𝑙𝑘 = 𝜆 − 𝜆𝑎𝑣𝑒 = 26 − 20.294 = 𝟓. 𝟕𝟎𝟔 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔 𝒑𝒆𝒓 𝒉𝒐𝒖𝒓

Page 106: QUEUING THEORY - PHL CHED Connect

QUEUING MODELSReferences

University of the Philippines

▪ Hillier F. and G. Lieberman. Introduction to Operations Research, 9th ed.New York: McGraw-Hill Higher Education, 2010.

▪ Taha, Hamdy. Operations Research: An Introduction, 8th ed. New Jersey:Pearson Education Ltd, 2007.

▪ Wayne, Winston. Operations Research: Applications and Algorithms, 4th

ed. Belmont, CA: Thomson Brooks / Cole, 2004.