You are on page 1of 45

A Guided Tour

Through Arena

Chapter 3: Enhanced
analysis of the
simplest simulation
model using Arena

Kang

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena
Announcement

• Quiz 2 held on Wednesday (25th).


 Vote: Quiz on Sep. 25th or Oct. 2nd?
• Simulation lab 3 held this week
 Enhancing the simplest model
• Simulation lab 4 held next week
 Serial vs. parallel processes

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena
Agenda

• Comparison of the outputs from simulation model vs.


queuing theory
 Running a single short replication
 Running a single long replication
 Running multiple replications (explained more later)

• Enhanced analysis of the simplest simulation model.


 Checking the validity of the outputs obtained from queueing theory
using simulation.
 Creating plots of the system performance measures.

• Conduct enhanced analysis of the simplest simulation


model (Lab 3 materials)
 Detailed explanation of creating the plots is provided in the textbook
(pp. 53-90; sixth edition).

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 1
Comparison of the outputs from
queueing theory vs. simulation.

Slide 2
Comparison of the outputs from queueing theory
vs. simulation
• Does queueing theory really work?
 Let’s find out!

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 3
Settings for interarrival times and service times

• In Ch 3-4, we assumed:
 Interarrival times follow an exponential distribution:
– Interarrival times: Mean of 5 min.
– Same meanings:
Number of arrivals follow a Poisson distribution having a mean of 12 parts/hr.
Arrivals follow a Poisson distribution with arrival rate of 12 parts/hr.

 Service times follow an exponential distribution:


– Service times: Mean of 4 minutes
– Same meanings:
Number of served follows a Poisson distribution having a mean of 15 parts/hr.
Services follow a Poisson distribution with service rate of 15 parts/hr.

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 4
System performance outputs using the queueing
theory (cont’d)
• In Ch 3-4, the results using the queueing theory were:
 (Average) Utilization: 0.8
 (Average) WIP: 4 parts
 (Average) Number of parts in queue: 3.2 parts
 (Average) Cycle time: 20 minutes (per part)
 (Average) Wait time of a part in queue: 16 minutes (per part)

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 5
Settings for the simulation model

• Use model 3-1 (the simplest model):


 In the Create module, Modify the interarrival time to EXPO(5)
 In the Process module, Modify the service time to EXPO(4)

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 6
Demonstration

• Run setup:
 [Option 1]
Set replication length* to 100 minutes.

 [Option 2]
Set replication length to 1000 minutes.

*Replication length = simulation run time

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 7
Results

Queueing Simulation Simulation


theory model: model:
1 replication 1 replication
(Average) 100 minutes 1000 minutes

Utilization 0.8 0.70 0.81

WIP 4 1.48 3.97


Number of
Parts in queue 3.2 0.78 3.16

Cycle time 20 9.25 20.49


Wait time of
a part in queue 16 4.9 16.23

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 8
Discussion: What are the implications?

• Regarding the single server model, results are similar if:


 The interarrival times and service times follow an exponential distribution.
 The replication length (i.e. simulation run time) is sufficiently long.

System performance
output (e.g. utilization) System performance
outputs will converge
to certain values:
Can be estimated using
queueing theory only
under limited conditions
(e.g. M/M/1: Expo dist.
and single server)
Time
Sufficient replication length
(= sufficient simulation run time)

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 9
Discussion: How should we determine the
replication length (i.e. simulation run time)?
• Dependent on system process and configuration.

• Accumulated experience.

• Trials and errors.

• Run simulation as long as possible.

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 10
Notes

• Steady-state simulation.
 Setting a very long replication length (i.e. running the simulation for a
very long time) to obtain possibly converging system performance
outputs is called “steady-state simulation.” (more explained later)
 Terminating simulation vs. steady-state simulation (more explained later)

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 11
Notes

• Handling Arena error.


 Entity limit exceeded error
– Arena training/evaluation version (i.e. student version) creates an error if
more than 100 generated entities exist at the same time during the
simulation run. We will receive an “entity limit exceed” error. Activating
the Arena license will resolve the issue. See instructions of how to
activate and de-activate the license in Canvas (Arena installation help >
Arena installation instructions). Labs will not require the activation of the
license.

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 12
Plotting system output measures:
1. Number of parts (or customers) in queue.
2. Utilization
3. Work in process (WIP)

Slide 13
Interarrival times and service times

• Assume the interarrival times follow an exponential


distribution having a mean of 5 minutes.
 Assume the first three values generated are 2, 1, and 12.

Note: As we generate more values, the mean of those values will converge to 5 min.

• Assume the service times follow an exponential


distribution having a mean of 4 minutes.
 Assume the first four values generated are 4, 4, 4, and 5.

Note: As we generate more values, the mean of those values will converge to 4 min.

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 14
Review of previous materials:
Transformation of relative time to absolute time
First part arrives at time 0.

Relative time:
Part Number Interarrival time of next part Service time
1 2 4
2 1 4
3 12 4
4 - 5
Simulation software transforms the data into
absolute times. Otherwise, we would need to
transform the data by hand, using Excel/
Database software, or through developing a
Absolute time: software program such as C, JAVA, R, or Matlab.
Part Number Time of arrival Time of service started Time of service ended
1 0 0 4
2 2 4 8
3 3 8 12
4 15 15 20

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 15
Review of previous materials:
Expression of absolute time
First part arrives at time 0 = First part arrives at time 00:00
Absolute time:
Part Number Time of arrival Time of service started Time of service ended
1 0 0 4
2 2 4 8
3 3 8 12
4 15 15 20

Same meanings, different format


Absolute time:
Part Number Time of arrival Time of service started Time of service ended
1 00:00 00:00 00:04
2 00:02 00:04 00:08
3 00:03 00:08 00:12
4 00:15 00:15 00:20

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 16
Review of previous materials:
Relative time vs. Absolute time
First part arrives at time 0.

Relative time: Next part arrives in 2 minutes Service duration is 4 minutes


Part Number Interarrival time of next part Service time
1 2 4
2 1 4
3 12 4
4 - 5
Same meanings
Absolute time:
Part Number Time of arrival Time of service started Time of service ended
1 00:00 00:00 00:04
2 00:02 00:04 00:08
3 00:03 00:08 00:12
4 00:15 00:15 00:20

Next part arrives at time 00:02 Service held from 00:00 to 00:04

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 17
Review of previous materials:
Interarrival time vs. Time of arrival
First part arrives at time 0.

Relative time:
Part Number Interarrival time of next part
1 2
2+1=3
2 1 2+1+12=15
3 12
4 -

Absolute time:
Part Number Time of arrival
1 0 :Part 1 arrived at 00:00
2 2 :Part 2 arrived at 00:02
3 3 :Part 3 arrived at 00:03
4 15 :Part 4 arrived at 00:15

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 18
Review of previous materials:
Service time vs. Time of service started and ended
First part arrives at time 0.
Relative time:
Part Number Interarrival time of next part Service time
1 2 4
2 1 4
3 12 4
4 - 5
Absolute time:
Part Number Time of arrival Time of service started Time of service ended
1 0 0 4
Service time of 4 minutes
Need to wait until
2 2 Part 1 is served
4 8
Service time of 4 minutes
Need to wait until
3 3 Part 2 is served 8 12
Service time of 4 minutes

4 15 15 20
Service time of 5 minutes

Served immediately since


no parts are waiting in the queue

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 18
Review of previous materials: How do we plot the
status of the entities in the system at time t?
Part Number Time of arrival Time of service started Time of service ended
1 0 0 4
2 2 4 8
3 3 8 12
4 15 15 20
Part 2 (Blue) waits from 00:02 to 00:04, then
drops into the server to receive service.

Part 3 (Yellow) waits from 00:03 to 00:08, then


Parts stacking drops into the server to receive service.
in queue at
time t
0 2 3 4 8 12 15 20
Part being
served by a
single server
at time t
0 4 8 12 15 20
Part 2 (Blue) is served from 00:04 to 00:08.
After, it leaves the system.

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 19
1. Plotting the number of parts in queue at time t

Time (min.)
0 2 3 4 8 20
Number of parts

Same meanings
in queue

2
1
Time (min.)
0 2 3 4 8 20

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 20
2. Plotting the utilization at time t

Server was idle from 00:12 to 00:15

Being served

0 4 8 12 15 20

Same meanings
Utilization

0 12 15 20
Time (min.)

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 21
3. Plotting the WIP at time t
WIP = number in queue + number being served
Utilization Number of parts
in queue

2
1
Time (min.)
0 2 3 4 8 20
+
1 Time (min.)
0
12 15 20
||
3
WIP

2 (Why?)
1
Time (min.)
0 2 3 4 8 12 15 20

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 23
3. Plotting the WIP at time t (cont’d)

WIP = number in queue + number being served

For the simplest model, we only defined 1 resource (e.g. 1 Drill press).
If utilization is currently 1, then the current number of parts being served is 1.
If utilization is currently 0, then the current number of parts being served is 0.
Therefore, the utilization plot (i.e. utilization at time t)is the same as the plot
of number of parts being served (i.e. number being served at time t).

Therefore, the sum of the two plots (i.e. number in queue and utilization) will
be the WIP plot.

Note that the above logic should be modified if we have multiple resources
and/or multiple processes involved.

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 24
Summary

• Three plots that can be plotted in real-time (i.e. at time t)


using the time as the x-axis
 Number of parts in queue at time t
 Utilization at time t (whether the server wat busy or idle at time t)
 WIP at time t

Note: Utilization is either 0 or 1 at time t. When we investigate the


utilization of a server, we are actually investigating the average utilization
over the time period.

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 25
Review questions

 What is “replication length”?


 For a simple model such as a single server model, does the queueing
theory provide accurate results? What condition(s) should be met?
 How do we determine the replication length of a simulation model to
obtain accurate results?
 What is “steady-state” simulation?
 Which system performance measures can we plot in real time (i.e. at time
t) by defining the time as the X-axis?
 What is WIP?
 For a single server model that has only one resource (e.g. one drill press)
defined, what is the easiest way to plot the WIP?

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 26
Details on creating the simplest model - Phase 2
Textbook (pp. 53-90; sixth edition)
Note: Refer to the below slides for Lab 3 and future Labs/Mini-projects.

Note: Lab 3 builds upon Lab 2.

Note: Technical details on creating the plots are not included in quizzes nor
exams.
Problem description (details)

• Approximation of the Chipotle service system.


 Simplest service system
– Simulation model is created using a single Process module.
 Similar to the simplest manufacturing model (model 3-1).

• Assumptions for the simplest service system.


 Customers arriving to the system: One customer at a time.
 Interarrival times follow an exponential distribution.
 Service times follow an exponential distribution.
End result

• What we want is the model provided below, the resulting


system performance outputs, and the three plots (i.e.
number of parts in queue at time t, utilization at time t, and
WIP at time t).

Note: “Number of parts in queue” is referred as “queue length” in textbook.


Note: Plotted values are not lab 3 results.
Step 1. Create the model

• Create from scratch.


 Errors can be encountered if previously created models are used.

• Follow all the steps provided in Ch 3-3 (Phase 1) to create


the simplest Chipotle food service model.
 Entity should be defined as “customer”
 Single resource (defined in the Process module) should be given a
name such as “Jamie” instead of “Drill Press” (that we defined
previously).
 In this example, interarrival time ~ EXPO(5).
 In this example, service time ~ EXPO(5.5)
– See next slide to define the expression of EXPO(5.5.) in the Process
module.
Step 1. Create the model (cont’d)

• Defining the service time ~ EXPO(5.5)

Select Expression Write EXPO(5.5)


Step 1. Create the model

• Run setup
 Set run time to 100 minutes. (1 replication)

• Before running the model, check the units.


 Be sure to check whether the units defined in the Create module,
Process module, and the Run Setup are set to “minutes.”
Step 2. Plot: Number of parts in queue

• Arena simulation software defines it as “queue length.”

• Step 2-1. Click on Plot button from Animate toolbar


Step 2. Plot: Number of parts in queue (cont’d)

• Step 2-2. Click on Data Series, then, select Add.


 Data Series tab: Add > Data Series > Source Data > Expression

This is the
selection sequence.
(i.e. click on Add, then click
on Data Series, then find
Source Data, then click on
Expression).

Once we go through
the whole procedure, only
the selection sequence
information will be provided
for other plots.
Step 2. Plot: Number of parts in queue (cont’d)

• Step 2-3. Click on Data Series, then Expression.


 Build Expression > Basic Process Variables > Queue > Current Number in Queue

Select Current Number In Queue

Check whether expression is


automatically generated.

Then, select OK.


Step 2. Plot: Number of parts in queue (cont’d)

• Step 2-4. Click on Data Series, then Expression.


 Data Series tab: Line > Draw mode (Stairs)

Set DrawMode to
Stairs.
Step 2. Plot: Number of parts in queue (cont’d)

• Step 2-5. Select Axes tab, then Time (X) Axis.


 Axis tab: Time (X) Axis
Scale: Maximum (100), Major increment (5)
Title: Text (Time in minutes), Visible (True)

(Modify)
Maximum: 100
Major increment: 5

Scroll down

(Modify)
Title: Time in minutes
Visible: True
Step 2. Plot: Number of parts in queue (cont’d)

• Step 2-6. Select Axes tab, then Left Value (Y) Axis.
 Axis tab: Left Value (Y) Axis
Scale: Maximum (100), Major increment (1)
Title: Text (Queue length), Visible (True)

(Modify)
Maximum: 100
Major increment: 1

(Modify)
Title: Queue length
Visible: True
Step 2. Plot: Number of parts in queue (cont’d)

• Step 2-7. Select the Legend tab.


 Legend tab: Uncheck Show legend.

Uncheck it.
Step 2. Plot: Number of parts in queue (cont’d)

• Step 2-8. Select OK and place the figure within the


flowchart view.
 Can change the size and location of the figure as needed.
Step 3. Plot: Utilization

• Utilization plot: Select Plot button from Animate toolbar


 Data Series tab: Add > Expression > Build Expression >
Basic Process Variables > Resource > Usage >
Current Number Busy
Auto generated: “NR(Drill Press)”
 Data Series tab: Line > Draw mode (Stairs)
 Axis tab: Time (X) Axis
Scale: Maximum (100), Major increment (5)
Title: Text (Time in minutes), Visible (True)
 Axis tab: Left Value (Y) Axis
Scale: Maximum (2), Major increment (1)
Scale: AutoScaleMinimum (False), AutoScaleMaximum (False)
Title: Text (Utilization) > Visible (True)
 Legend tab: Uncheck Show legend.
 Click OK and place the figure on the Flowchart view.
Step 3. Plot: WIP

• WIP plot: Select Plot button from Animate toolbar


 Data Series tab: Add > Expression > Build Expression >
Basic Process Variables > Entity > Number In Process
Auto generated: “EntitiesWIP(Customer)”
 Data Series tab: Line > Draw mode (Stairs)
 Axis tab: Time (X) Axis
Scale: Maximum (100), Major increment (5)
Title: Text (Time in minutes), Visible (True)
 Axis tab: Left Value (Y) Axis
Scale: Maximum (100), Major increment (1)
Title: Text (WIP) > Visible (True)
 Legend tab: Uncheck Show legend.
 Click OK and place the figure on the Flowchart view.
Step 4. Set the replication length to 100 minutes and
run the simulation.
• Location of WIP output in reports:
 Category Overview > Entity > Other > WIP > Customer

• Refer to Ch 3-3 (Phase 1) to locate other system


performance outputs.

You might also like