Lecture 39 - Simulation Modeling V
Lecture 39 - Simulation Modeling V
SIMULATION MODELING V
1
SIMULATION MODELING V
Example 1 (Continued)
For the purpose of this example, we use R from Table 1, starting with column 1.
We further assume that the first customer arrives at T = 0 and that the facility starts empty.
Because the simulation computations are typically voluminous, the simulation is limited to the
first 5 arrivals only.
The example is designed to cover all possible situations that could arise in the course of the
simulation.
2
Arrival of customer 1 at T = 0.
Generate the arrival of customer 2 at:
3
Departure of customer 1 at T = 13.37.
Because the queue is empty, the facility is declared idle.
At the same time, we record that the facility has been busy between T = 0 and T = 13.37 min.
4
Arrival of customer 2 at T = 42.48.
Customer 3 will arrive at:
Because the facility is idle, customer 2 starts service, and the facility is declared busy.
5
Arrival of customer 3 at T = 53.49.
Customer 4 will arrive at:
Because the facility is currently busy (until T = 57.22), customer 3 is placed in queue at T = 53.49.
6
Departure of customer 2 at T = 57.22.
Customer 3 is taken out of the queue to start service.
7
Arrival of customer 4 at T = 60.81.
Customer 5 will arrive at:
Because the facility is busy until T = 70.19, customer 4 is placed in the queue.
8
Arrival of customer 5 at T = 61.83.
The simulation is limited to 5 arrivals, hence customer 6 arrival is not generated.
The facility is still busy, hence the customer is placed in queue at T = 61.83.
9
Departure of customer 3 at T = 70.19.
Customer 4 is taken out of the queue to start service.
10
Departure of customer 4 at T = 81.08.
Customer 5 is taken out of the queue to start service.
11
Departure of customer 5 at T = 92.82.
There are no more customers in the system (queue and facility) and the simulation ends.
Figure 4 summarizes the changes in the length of the queue and the utilization of the facility as a
function of the simulation time.
Figure 4: Changes in queue length and facility utilization as a function of simulation time, T.
12
The queue length and the facility utilization are known as time-based variables because their
variation is a function of time.
13
The average waiting time in the queue is an observation-based variable whose value is computed
as:
Examination of Figure 5 reveals that the area under the queue-length curve actually equals the
sum of the waiting time for the three customers who joined the queue, namely:
The average waiting time in the queue for all customers is thus computed as:
14