0% found this document useful (0 votes)
96 views15 pages

Lecture 4 - Single Channel Queue 2 (Edited)

The document discusses simulating queuing systems using discrete event simulation. It provides an example of simulating a single channel queue with random interarrival and service times. It also presents another example of simulating a drive-in restaurant with two carhops and discusses analyzing the results to determine performance measures like server utilization and customer wait times.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views15 pages

Lecture 4 - Single Channel Queue 2 (Edited)

The document discusses simulating queuing systems using discrete event simulation. It provides an example of simulating a single channel queue with random interarrival and service times. It also presents another example of simulating a drive-in restaurant with two carhops and discusses analyzing the results to determine performance measures like server utilization and customer wait times.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Lecture 4

Chapter-02
Discrete-Event System Simulation
-Jerry Banks

Simulation of Queuing System


Single channel Queue

1
Simulation of Queuing Systems

Example: Single-Channel Queue


A rrival D ep arture

C hecko ut C ounter

 Assumptions
• Only one checkout counter.
• Customers arrive at this checkout counter at random from 1 to
8 minutes apart. Each possible value of interarrival time has
the same probability of occurrence, as shown in Table 2.6.
• The service times vary from 1 to 6 minutes with the
probabilities shown in Table 2.7.
• The problem is to analyze the system by simulating the arrival
and service of 20 customers. 2
Simulation of Queuing Systems

3
Simulation of Queuing Systems

Set of Random Digits

RD for IAT: 0, 913, 727, 15, 948, 309, 922, 753, 235, 302, 109, 93, 607, 738,
359, 888, 106, 212, 493, 535

RD for ST: 84, 10, 74, 53, 17, 79, 91, 67, 89, 38, 32, 94, 79, 5, 79, 84, 52, 55,
30, 50

4
Simulation of Queuing Systems

5
Simulation of Queuing Systems

Example (Cont.)
 The average waiting time for a customer : 2.8 minutes
total time customers wait in queue 56
average waitng time    2.8 (min)
total numbers of customers 20

 The probability that a customer has to wait in the queue : 0.65


number of customers who wait 13
probability ( wait )    0.65
total numbers of customers 20

 The fraction of idle time of the server : 0.21


total idle time of server 18
probability of idle server    0.21
total run time of simulation 86

 The probability of the server being busy: 0.79 (=1-0.21)

6
Simulation of Queuing Systems

Example (Cont.)
 The average service time : 3.4 minutes
total service time 68
average service time    3.4 (min)
total numbers of customers 20

This result can be compared with the expected service time by finding
the mean of the service-time distribution using the equation in table 2.7.

E (S )   sp ( s )
s0

E ( S )  1(0.10)  2(0.20)  3(0.30)  4(0.25)  5(0.10)  6(0.05)  3.2 (min)

The expected service time is slightly lower than the average service
time in the simulation. The longer the simulation, the closer the
average will be to E(S)
7
Simulation of Queuing Systems

Example (Cont.)
 The average time between arrivals : 4.3 minutes

sum of all times between arrivals 82


average time between arrivals    4.3 (min)
numbers of arrivals  1 19

 This result can be compared to the expected time between arrivals


by finding the mean of the discrete uniform distribution whose
endpoints are a=1 and b=8.
a  b 1 8
E ( A)    4.5 (min)
2 2
The longer the simulation, the closer the average will be to E (A)

 The average waiting time of those who actually wait in the queue
total time customers wait in queue 56
average waiting time of those who wait    4.3 (min)
total numbers of customers who wiat 13
8
Simulation of Queuing Systems

Example (Cont.)
 The average time a customer spends in the system : 6.2 minutes
total time customers spend in system 124
average time customer spends in the system    6.2 (min)
total numbers of customers 20

average time average time average time


customer spends = customer spends + customer spends
in the system waiting in the queue in service

 average time customer spends in the system = 2.8 + 3.4 = 6.2 (min)

9
End for Today
Simulation of Queuing Systems

Example: The Able Baker Carhop Problem

A b le

B a ke r

 A drive-in restaurant where carhops take orders and bring food to the car.
 Assumptions
• Cars arrive in the manner shown in Table 2.11.
• Two carhops Able and Baker - Able is better able to do the job and
works a bit faster than Baker.
• The distribution of their service times is shown in Tables 2.12 and 2.13.
10
Simulation of Queuing Systems

Example: (Cont.)
 A simplifying rule is that
Able gets the customer if
both carhops are idle.
 If both are busy, the
customer begins service with
the first server to become
free.
 To estimate the system
measures of performance, a
simulation of 1 hour of
operation is made.
 The problem is to find how
well the current arrangement
is working.
11
12
Simulation of Queuing Systems

Example 2.2 (cont.)


 The row for the first customer is filled in manually, with the
random-number function RAND() in case of Excel or another
random function replacing the random digits.

 After the first customer, the cells for the other customers must be
based on logic and formulas. For example, the “Clock Time of
Arrival” (column D) in the row for the second customer is
computed as follows:
D2 = D1 + C2

 The logic to computer who gets a given customer can use the
Excel macro function IF(), which returns one of two values
depending on whether a condition is true or false.
IF( condition, value if true, value if false)
13
14
Simulation of Queuing Systems

The analysis of Table 2.14 results in the following:


 Over the 62-minute period Able was busy 90% of the time.
 Baker was busy only 69% of the time. The seniority rule keeps
Baker less busy (and gives Able more tips).
 Nine of the 26 arrivals (about 35%) had to wait. The average
waiting time for all customers was only about 0.42 minute (25
seconds), which is very small.
 Those nine who did have to wait only waited an average of 1.22
minutes, which is quite low.
 In summary, this system seems well balanced. One server cannot
handle all the diners, and three servers would probably be too
many. Adding an additional server would surely reduce the waiting
time to nearly zero. However, the cost of waiting would have to be
quite high to justify an additional server.

15

You might also like