Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
5 views

Unit 7 (OA) - Queuing Simulation

The document discusses queuing models, emphasizing the importance of managing waiting lines to balance operational costs and customer service. It outlines characteristics of queuing systems, including population source, number of servers, and arrival/service patterns, while presenting various models like M/M/1 and M/D/1. Additionally, it provides examples and simulations to illustrate how to analyze and optimize queuing systems.

Uploaded by

rizwalboban2020
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Unit 7 (OA) - Queuing Simulation

The document discusses queuing models, emphasizing the importance of managing waiting lines to balance operational costs and customer service. It outlines characteristics of queuing systems, including population source, number of servers, and arrival/service patterns, while presenting various models like M/M/1 and M/D/1. Additionally, it provides examples and simulations to illustrate how to analyze and optimize queuing systems.

Uploaded by

rizwalboban2020
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Queuing Model

Introduction
Waiting lines or queues
occur when there is a
temporary imbalance
between supply (capacity)
and demand. Waiting lines
add to the cost of operation
and they reflect negatively
on customer service.
So, it is important to balance the cost of having customers wait with the cost of providing
service capacity.
Why is there Queue?
Even though a system is basically underloaded. For example, a fast-food restaurant may
have the capacity to handle an average of 200 orders per hour and yet experience
waiting lines even though the average number of orders is only 150 per hour. In reality,
customers arrive at random intervals rather than at evenly spaced intervals, and some
orders take longer to fill than others. Both arrivals and service times exhibit a high
degree of variability. And because services cannot be performed ahead of time and
stored until needed, the system at times becomes temporarily overloaded, giving rise to
waiting lines. However, at other times, the system is idle because there are no
customers. In systems where variability is minimal or nonexistent waiting lines do not
ordinarily form. JIT/lean systems strive to achieve this.
Goal of Waiting Line management
In a queuing system, customers enter a waiting line of a service facility, receive service
when their turn comes, and then leave the system.

The number of customers in the system (awaiting service or being served) will vary
randomly over time.

The goal of waiting-line management is essentially to minimize total costs. There are two
basic categories of cost in a queuing situation: those associated with customers waiting
for service and those associated with capacity.

TC = Customer waiting cost + Capacity cost


Characteristics of Waiting Line
There are numerous queuing models from which an analyst can choose. The success of
the analysis will depend on choosing an appropriate model which is affected by the
characteristics of the system under investigation. The main characteristics are:
1. Population Source or Calling Population 3. Arrival and Service patterns

2. Number of Servers (Channels) 4. Queue Discipline (Order of Service)


Population Source
The approach to use in analyzing a queuing problem depends on whether the potential
number of customers is limited. There are two possibilities:

Infinite-source – Here the potential number of customers greatly exceeds system capacity
(service is unrestricted). Examples - supermarkets, banks, restaurants, amusement
centers, and toll bridges. Theoretically, large numbers of customers from the “calling
population” can request service at any time.

Finite-Source – Here The potential number of customers is limited. Example – A repair


technician responsible for a certain number of machines in a company. The potential
number of machines that might need repairs at any one time cannot exceed the number
of machines assigned to the repairer, or a nurse in charge of a 10-bed ward.
Number of Servers or Channels
The capacity of queuing systems is a function of the capacity of each server and the
number of servers being used. It is assumed that each server can handle one customer at
a time. Systems can be either single- or multiple-sever.

Single-server systems - small grocery stores with one checkout counter or single-bay car
washes,

Multiple-channel systems – Multiple counters found in banks or at airline ticket counters.

A related distinction is the number of steps or phases in a queuing system. For example,
at theme parks, people go from one attraction to another. Each attraction constitutes a
separate phase where queues can form.
Basic Relationships
System or Service utilization: This reflects the ratio of demand (as measured by the arrival
rate λ) to supply or capacity (as measured by the product of the number of servers, M, and
the service rate, μ).

Service Utilization:

The average number of customers being served:

Service time:
λ
The probability that an arriving unit has to wait for service: Pw =
µ

Ls = λ Ws and Lq = λ Wq
Basic Relationships
The average number of customers waiting in line for service:
Lq [Model dependent. Obtain using a table or formula.]
The average number of customers in the system (line plus being served):
Ls = Lq + r
Determining the Arrival Rate and the Service Rate
Example 1 - Customers arrive at a bakery at an average rate of 18 per hour on weekday
mornings. The arrival distribution can be described by a Poisson distribution with a mean
of 18. Each clerk can serve a customer in an average of three minutes; this time can be
described by an exponential distribution with a mean of 3.0 minutes
a. What are the arrival and service rates?
b. Compute the average number of customers being served at any time.
c. Suppose it has been determined that the average number of customers waiting in
line is 8.1. Compute the average number of customers in the system, the average
time customers wait in line, and the average time in the system.
d. Determine the system utilization for M = 1, 2, and 3 servers
Determining the Arrival Rate and the Service Rate
Example 1 – Answers
a. Arrival rate = 18, Service Rate = 20
b. 0.9 customers
c. average number of customers in the system = 9,
average time customers wait in line = 0.45 hour, and
the average time in the system = 0.5 hour.
d. System utilization for M = 1, 2, and 3 servers are 0.9, 0.45 and 0.30 respectively.
Notation used to specify Waiting-line Models
D.G. Kendall suggested in 1953 a notation that is helpful in classifying different queuing
models. The three-symbol Kendall notation is: A/B/K where,
A denotes the probability distribution for the arrivals
B denotes the probability distribution for the service time
K denotes the number of channels
M - designates a Poisson distribution for arrival or an exponential probability distribution
for service time
D - designates that the arrivals or the service time is deterministic or constant
G - designates that the arrivals or the service time has a general probability distribution
with a known mean and variance
Notation used to specify Waiting-line Models
Hence,
M/M/1 indicates a Poisson arrival rate, a Poisson service rate, and one server.
M/D/1 indicates the arrival rate is Poisson and the service rate is constant or deterministic.
M/M/S would indicate multiple servers.
Single Server, Exponential Service Time, M/M/1
Determining the Arrival Rate and the Service Rate
Example 2 - An airline is planning to open a satellite ticket desk in a new shopping plaza,
staffed by one ticket agent. It is estimated that requests for tickets and information will
average 15 per hour, and requests will have a Poisson distribution. Service time is assumed to
be exponentially distributed. Previous experience with similar satellite operations suggests
that mean service time should average about three minutes per request. Determine:
a. System utilization
b. Percentage of time the server (agent) will be idle
c. The expected number of customers waiting to be served
d. The average time customers will spend in the system
e. The probability of zero customers the probability of four customers in the system
Determining the Arrival Rate and the Service Rate
Example 2 – Answers
Determining the Arrival Rate and the Service Rate
Example 2.1 – In the Dome’s food Operating characteristics for the Dome’s single-
outlet customers arrive with a channel queuing system are
mean arrival rate of λ = 0.75
customers per minute and a mean
service rate of µ = one customer
per minute. So, with µ > λ.

P7 = P0(λ/µ)7 = 0.25(0.75)7 =
Probability of a specified queue length
Using the formula
Pn = P0(λ/µ)n = 0.25(0.75)n
Number of Customers Probability
Probability for 7 or more in the queue
0 0.2500
1 0.1875 = 1 - σ60 𝑃𝑖
2 0.1406
= 1 - 0.8665
3 0.1055
4 0.0791 = 0.1335
5 0.0593
6 0.0445
7 or More 0.1335
Single Server Constant Service Time M/D/1
As noted previously, waiting lines are a consequence of random, highly variable arrival
and service rates. If a system can reduce or eliminate the variability of either or both,
it can shorten waiting lines noticeably. For example, the effect of a constant service
time is to cut in half the average number of customers waiting in line.

The average time customers spend waiting in line is also cut in half. Similar
improvements can be realized by smoothing arrival times (e.g., by use of appointments).
Thus, anything a manager can do to reduce service time variability will reduce the
number waiting and the time waiting.
Single Server Constant Service Time M/D/1
Example 3 - Wanda’s Car Wash & Dry is an automatic, five-minute operation with a
single bay. On a typical Saturday morning, cars arrive at a mean rate of eight per hour,
with arrivals tending to follow a Poisson distribution. Find the following:
a. The average number of cars in line
b. The average time cars spend in line and service.
Multiple Server M/M/S
A multiple-server system exists whenever two or more servers are working
independently to provide service to customer arrivals. Use of the model involves the
following assumptions:

1. A Poisson arrival rate and exponential service time.


2. Servers all work at the same average rate.
3. Customers form a single waiting line (in order to maintain first-come, first-served
processing).
Multiple Server M/M/S
M = Number of servers
n = any integer that takes
values from 0 to M-1
Multiple Server M/M/S
Multiple Server M/M/S
Multiple Server M/M/S
Example 4 - Alpha Taxi and Hauling Company has seven cabs stationed at the airport.
The company has determined that during the late-evening hours on weeknights,
customers request cabs at a rate that follows the Poisson distribution with a mean of 6.6
per hour. Service time is exponential with a mean of 50 minutes per customer. Assume
that there is one customer per cab. Find each of the relevant performance measures.
Multiple Server M/M/S
Example 4 - Solutions

From Table
Multiple Server M/M/S
Example 5 - Alpha Taxi and Hauling also plans to have cabs at a new rail station. The
expected arrival rate is 4.8 customers per hour, and the service rate (including return
time to the rail station) is expected to be 1.5 per hour. How many cabs will be needed
to achieve an average time in line of 20 minutes or less?
Using Lq = λ × Wq, we solve for Lq: 4.8/ (.333) = 1.6
customers. Thus, the average number waiting should
not exceed 1.6 customers. From MS-Excel worksheet
(Queuing Model.xlsx).
with r = 3.2, Lq = 2.386 for M = 4, and
Lq = 0.513 for M = 5. Hence, five cabs will be needed.
Queuing Simulation - Example
Hong Kong Savings Bank (HKSB) ATM Queuing System

HKSB will open several new branch banks during the coming year. Each new branch is
designed to have one automated teller machine (ATM). A concern is that during busy
periods several customers may have to wait to use the ATM. This concern prompted
the bank to undertake a study of the ATM queuing system.
The bank’s vice president wants to determine whether one ATM at each branch will be
sufficient. The bank established service guidelines for its ATM system stating that the
average customer waiting time for an ATM should be one minute or less.
A simulation model can be used to study the ATM queue at a particular branch
Queuing Simulation - Example
Two probabilistic input into the queuing models are customer arrival rate and service rate.
For the branch bank being studied, the customer interarrival times are assumed to be
uniformly distributed between zero and five minutes.
Interarrival time = a + r(b-a) where r is a random number between 0 to 1
Interarrival time = 0 + r(5-0) = 5r = 5*rand()
Past data from similar ATMs indicate that a normal probability distribution with a mean of
two minutes and a standard deviation of 0.5 minutes.
Past data from similar ATMs indicate that a normal probability distribution with a mean of
two minutes and a standard deviation of 0.5 minutes can be used to describe service times.
NORMINV(RAND(),2,0.5)
Queuing Simulation - Example
▪ When ATM is idle customer can
start the service immediately.

▪ When ATM is busy customer has


to wait till the service completion
time of the previous customer.
Queuing Simulation - Example
Interarrival Time = Generated by 5*rand()
Arrival Time = Previous customer arrival time + Interarrival Time
Service Start Time = Max (Previous customer completion time - Arrival time, 0)
Waiting Time = Service Start Time - Arrival Time
Service Time = Generated by NORM.INV(rand(),2,0.5)
Completion Time = Service Start Time + Service Time
Time in System = Completion Time - Arrival Time
ATM Idle Time Max (Arrival time - Previous customer completion time, 0)
Queuing Simulation
Interarrival Arrival Service Waiting Service Completio Time in
Customer
Time Time Start Time Time Time n Time System
1 1.4 1.4 1.4 0.0 2.3 3.7 2.3
2 1.3 2.7 3.7 1.0 1.5 5.2 2.5
3 4.9 7.6 7.6 0.0 2.2 9.8 2.2
4 3.5 11.1 11.1 0.0 2.5 13.6 2.5
5 0.7 11.8 13.6 1.8 1.8 15.4 3.6
6 2.8 14.6 15.4 0.8 2.4 17.8 3.2
7 2.1 16.7 17.8 1.1 2.1 19.9 3.2
8 0.6 17.3 19.9 2.6 1.8 21.7 4.4
9 2.5 19.8 21.7 1.9 2.0 23.7 3.9
10 1.9 21.7 23.7 2.0 2.3 26.0 4.3
Total 21.7 11.2 20.9 32.1
Average 2.17 1.12 2.09 3.21

Refer to Queuing Simulation - HKSB ATM.xlsx


Queuing Simulation - 1 ATM – 1000 Customers
Simulation Run with 1000 customers. Refer to Queuing Simulation - HKSB ATM.xlsx

Simulation studies of dynamic systems focus on the operation of the system during its
long-run or steady-state operation. The length of the start-up period can vary depending
on the application.

For the ATM simulation, we treated the results for the first 100 customers as the start-up
period. Thus, the summary statistics are for the 900 customers arriving during the steady-
state period.
Queuing Simulation
Interarrival time follows a Uniform Distribution between 0 to 5 min
Service time follows a Normal Distribution with mean of 2 minutes and standard deviation of
0.5 minute

Custome Interarriva Arrival Service Waiting Service Completio Time in ATM Idle
r l Time Time Start Time Time Time n Time System Time
1 2.8 2.8 2.8 0.0 2.8 5.6 2.8 2.8
2 0.5 3.3 5.6 2.3 2.1 7.7 4.4 0.0
3 3.5 6.8 7.7 0.9 2.3 10.0 3.2 0.0
4 4.8 11.6 11.6 0.0 1.2 12.8 1.2 1.6
5 1.5 13.1 13.1 0.0 2.7 15.8 2.7 0.3
997 4.4 2482.4 2482.8 0.4 2.3 2485.1 2.7 0.0
998 0.5 2482.9 2485.1 2.2 1.7 2486.8 3.9 0.0
999 3.1 2486.0 2486.8 0.8 2.2 2489.0 3.0 0.0
1000 3.6 2489.6 2489.6 0.0 2.8 2492.4 2.8 0.6
1001 0.8 2490.4 2492.4 2.0 1.7 2494.1 3.7 0.0
Total 30.8 4.9 22.3 27.2 10.5
Average 3.08 0.49 2.23 2.72 1.05
Queuing Simulation 1 ATM – 1000 Customers
Histogram of Customer waiting Time

, , , , , , , ,
, , , , , , , , ,

900 customers at steady state Summary Statistics for 900 Customers (Row 106:1005)
Number Waiting 577.0000
Since Customer waiting time is more Probability of waiting 0.6411
Average Waiting Time (min) 1.3840
than 1 minute the management Maximum Waiting Time (min) 10.1000
Utilization of ATM 0.8259
decides to setup one more ATM
Number Waiting > 1 min 404
with the bank branch. Probability of Waiting > 1 min 0.4489
Queuing Simulation with two ATMs
We extended the simulation model to the case of two ATMs. For the second ATM we also
assume that the service time is normally distributed with a mean of two minutes and a
standard deviation of 0.5 minutes.
We create two additional columns to show when each ATM becomes available for
customer service.
We make two assumptions like,
1) When a new customer arrives, the customer will be served by the ATM that frees up
first.
2) If both the ATM is freed up at the same time the default that the customer uses is
ATM 1
Queuing Simulation with two ATMs

With 2 ATMs simulation with 10 customers show that the average waiting time has
come down to 0.1 with maximum being 0.7 minutes. For conclusion results needs to be
verified with 1000 customers at least.
Queuing Simulation with two ATMs – 1000 runs
Service
Custome Interarrival Arrival Waiting Service Completion Completion Time in ATM
Start
r Time Time Time Time Time (ATM 1) Time (ATM 2) System Used
Time
0 0
1 0.1 0.1 0.1 0.0 0.9 1.0 0.0 0.9 1
2 2.9 3.0 3.0 0.0 2.1 1.0 5.1 2.1 2
11 3.1 32.5 32.5 0.0 2.2 34.7 31.9 2.2 1
12 0.1 32.6 32.6 0.0 1 34.7 33.6 1.0 2
13 0.7 33.3 33.6 0.3 1.5 34.7 35.1 1.8 2
14 0.6 33.9 34.7 0.8 1.4 36.1 35.1 2.2 1
15 4.6 38.5 38.5 0.0 2.7 36.1 41.2 2.7 2
22 0.4 62.3 62.3 0.0 1.3 63.6 63.9 1.3 1
23 0.1 62.4 63.6 1.2 1 64.6 63.9 2.2 1
24 0.6 63.0 63.9 0.9 1.4 64.6 65.3 2.3 2
25 1.9 64.9 64.9 0.0 1.8 66.7 65.3 1.8 1
998 4.1 2569.5 2569.5 0.0 2.5 2572.0 2567.0 2.5 1
999 3.9 2573.4 2573.4 0.0 2.4 2572.0 2575.8 2.4 2
1000 2.6 2576.0 2576.0 0.0 2 2578.0 2575.8 2.0 1
Total 0.7 0.000 2.6 22.1
Average 2.94 0.000 2.21 2.21

You might also like