Lecture 4 - Single Channel Queue 2 (Edited)
Lecture 4 - Single Channel Queue 2 (Edited)
Chapter-02
Discrete-Event System Simulation
-Jerry Banks
1
Simulation of Queuing Systems
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
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
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 )
s0
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
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 customer spends in the system = 2.8 + 3.4 = 6.2 (min)
9
End for Today
Simulation of Queuing Systems
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
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
15