[go: up one dir, main page]

0% found this document useful (0 votes)
8 views89 pages

Simulation

Information simulation

Uploaded by

Mutasem abadleh
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)
8 views89 pages

Simulation

Information simulation

Uploaded by

Mutasem abadleh
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/ 89

What is

Simulation?

Chapter 1

Last revision December 21, 2013

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 1 of 23

Simulation Is …
• Simulation – very broad term – methods and
applications to imitate or mimic real systems,
usually via computer
• Applies in many fields, industries
• Very popular, powerful
• Book covers simulation in general,
Arena simulation software in particular
• This chapter – general ideas, terminology,
examples of applications, good/bad things, kinds
of simulation, software options, how/when
simulation is used
Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 2 of 23
Systems
• System – facility or process, actual or planned
Examples abound …
– Manufacturing facility
– Bank operation
– Airport operations (passengers, security, planes, crews, baggage)
– Transportation/logistics/distribution operation
– Hospital facilities (emergency room, operating room, admissions)
– Computer network
– Freeway system
– Business process (insurance office)
– Criminal justice system
– Chemical plant
– Fast-food restaurant
– Supermarket
– Theme park
– Emergency-response system
– Shipping ports, berths
– Military combat, logistics
Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 3 of 23

Work With the System?


• Study system – measure, improve, design,
control
Maybe just play with actual system
– Advantage — unquestionably looking at the right thing
But often impossible in reality with actual system
– System doesn’t exist
– Would be disruptive, expensive, dangerous

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 4 of 23


Models
• Model – set of assumptions/approximations
about how system works
Study model instead of real system … usually much easier,
faster, cheaper, safer
Can try wide-ranging ideas with model
– Make your mistakes on the computer where they don’t count, rather
than for real where they do count
Often, just building model is instructive – regardless of
results
Model validity (any kind of model … not just simulation)
– Care in building to mimic reality faithfully
– Level of detail
– Get same conclusions from model as you would from system
– More in Chapter 13

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 5 of 23

Types of Models
• Physical (iconic) models
Tabletop material-handling models
Mock-ups of fast-food restaurants
Flight simulators
• Logical (mathematical) models
Approximations, assumptions about system’s operation
Often represented via computer program in appropriate
software
Exercise program to try things, get results, learn about
model behavior

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 6 of 23


Studying Logical Models
• If model is simple enough, use traditional
mathematical analysis … get exact results, lots of
insight into model
Queueing theory
Differential equations
Linear programming
• But complex systems can seldom be validly
represented by simple analytic model
Danger of over-simplifying assumptions … model validity?
Type III error – working on the wrong problem
• Often, complex system requires complex model,
analytical methods don’t apply … what to do?

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 7 of 23

Computer Simulation
• Methods for studying wide variety of models of
systems
Numerically evaluate on computer
Use software to imitate system’s operations,
characteristics, often over time
• Can use to study simple models, but should not
use if an analytical solution is available
• Real power of simulation – studying complex
models
• Simulation can tolerate complex models since we
don’t even aspire to an analytical solution

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 8 of 23


Popularity of Simulation
• Has been consistently ranked as the most useful,
popular tool in broader area of operations
research / management science
1978: M.S. graduates of CWRU O.R. Department … after
graduation
1. Statistical analysis
2. Forecasting
3. Systems Analysis
4. Information systems
5. Simulation
1979: Survey 137 large firms, which methods used?
1. Statistical analysis (93% used it)
2. Simulation (84%)
3. Followed by LP, PERT/CPM, inventory theory, NLP, …

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 9 of 23

Popularity of Simulation (cont’d.)


1980: (A)IIE O.R. division members
– First in utility and interest — simulation
– First in familiarity — LP (simulation was second)
1983, 1989, 1993: Longitudinal study of corporate practice
1. Statistical analysis
2. Simulation
1989: Survey of surveys
– Heavy use of simulation consistently reported
2012 (Powers thesis): Literally exponential growth in
number of simulation papers
• Since most of these surveys, hardware/software
have improved, making simulation even more
attractive
Historical impediment to simulation – computer speed
Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 10 of 23
Advantages of Simulation
• Flexibility to model things as they are (even if
messy and complicated)
Avoid looking where the light is (a morality play):
You’re walking along in the dark and see someone on hands and knees
searching the ground under a street light.
You: “What’s wrong? Can I help you?”
Other person: “I dropped my car keys and can’t find them.”
You: “Oh, so you dropped them around here, huh?”
Other person: “No, I dropped them over there.” (Points into the darkness.)
You: “Then why are you looking here?”
Other person: “Because this is where the light is.”

• Allows uncertainty, nonstationarity in modeling


The only thing that’s for sure: nothing is for sure
Danger of ignoring system variability
Model validity
Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 11 of 23

Advantages of Simulation (cont’d.)


• Advances in computing/cost ratios
Estimated that 75% of computing power is used for various
kinds of simulations
Dedicated machines (e.g., real-time shop-floor control)
• Advances in simulation software
Far easier to use (GUIs)
No longer as restrictive in modeling constructs
(hierarchical, down to C)
Statistical design & analysis capabilities

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 12 of 23


The Bad News
• Don’t get exact answers, only approximations,
estimates
Also true of many other modern methods
Can bound errors by machine roundoff
• Get random output (RIRO) from stochastic
simulations
Statistical design, analysis of simulation experiments
Exploit: noise control, replicability, sequential sampling,
variance-reduction techniques
Catch: “standard” statistical methods seldom work

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 13 of 23

Different Kinds of Simulation


• Static vs. Dynamic
Does time have a role in model?
• Continuous-change vs. Discrete-change
Can “state” change continuously, or only at discrete points
in time?
• Deterministic vs. Stochastic
Is everything for sure or is there uncertainty?
• Most operational models:
Dynamic, Discrete-change, Stochastic
– But Chapter 2 discusses one static model
– And Chapter 11 discusses continuous and combined discrete-
continuous models
Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 14 of 23
Simulation by Hand:
The Buffon Needle Problem

• Estimate π (George Louis Leclerc, c. 1733)


• Toss needle of length l onto table with stripes d
(>l) apart
• P (needle crosses a line) =
• Repeat; tally = proportion of times a line is
crossed
• Estimate π by Just for fun:
http://www.mste.uiuc.edu/reese/buffon/bufjava.html
http://www.angelfire.com/wa/hurben/buff.html

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 15 of 23

Why Toss Needles?


• Buffon needle problem seems silly now, but has
important simulation features:
Experiment to estimate something hard to compute exactly
(in 1733)
Randomness, so estimate will not be exact; estimate the
error in the estimate
Replication (the more the better) to reduce error
Sequential sampling to control error — keep tossing until
probable error in estimate is “small enough”
Variance reduction (Buffon Cross)

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 16 of 23


Using Computers to Simulate
• General-purpose languages (C, C++, C#, Java,
Matlab, FORTRAN, others)
Tedious, low-level, error-prone
But, almost complete flexibility
• Support packages for general-purpose languages
Subroutines for list processing, bookkeeping, time advance
Widely distributed, widely modified
• Spreadsheets
Usually static models (only very simple dynamic models)
Financial scenarios, distribution sampling, SQC
Examples in Chapter 2 (one static, one dynamic)
Add-ins are available (@RISK, Crystal Ball)
Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 17 of 23

Using Computers to Simulate (cont’d.)


• Simulation languages
GPSS, SLX, SIMAN (on which Arena is based, included in
Arena)
Popular, some still in use
Learning curve for features, effective use, syntax
• High-level simulators
Very easy, graphical interface
Domain-restricted (manufacturing, communications)
Limited flexibility — model validity?

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 18 of 23


Where Arena Fits In
• Hierarchical structure
Multiple levels of modeling
Mix different modeling levels
together in same model
Often, start high then go lower
as needed
• Get ease-of-use advantage
of simulators without
sacrificing modeling
flexibility

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 19 of 23

When Simulations are Used


• Use of simulation has evolved with hardware,
software
• Early years (1950s – 1960s)
Very expensive, specialized tool
Required big computers, special training
Mostly in FORTRAN (or even Assembler)
Processing cost as high as $1000/hour for a sub-PC level
machine

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 20 of 23


When Simulations are Used (cont’d.)
• Formative years (1970s – early 1980s)
Computers got faster, cheaper
Value of simulation more widely recognized
Simulation software improved, but still languages to be
learned, typed, batch processed
Often used to clean up “disasters” in auto, aerospace
industries
– Car plant; heavy demand for certain model
– Line underperforming
– Simulated, problem identified
– But demand had dried up — simulation was too late

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 21 of 23

When Simulations are Used (cont’d.)


• Recent past (late 1980s – mid 2000s)
Microcomputer power
Software expanded into GUIs, animation
Wider acceptance across more areas
– Traditional manufacturing applications
– Services
– Health care
– “Business processes”
Still mostly in large firms
Simulation is often part of “specs”

Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 22 of 23


When Simulations are Used (cont’d.)
• Present
Proliferating into smaller firms
Becoming a standard tool
Being used earlier in design phase
Real-time control
3D graphics, business dashboards
• Future
Integration with other applications for visualization, analysis
Networked sharing of data in real time
Internet-enabled distributed model building, execution
Specialized vertical “templates” for specific industries, firms
Better model re-usability, operational decision making
Automated statistical design, analysis
Simulation with Arena, 6th ed. Chapter 1 – What Is Simulation? Slide 23 of 23
Fundamental
Simulation
Concepts

Chapter 2

Last revision March 9, 2014

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 1 of 57

What We’ll Do ...


• Underlying ideas, methods, and issues in
simulation
• Software-independent (setting up for Arena)
• Example of a simple processing system
Decompose problem
Terminology
Simulation by hand
Some basic statistical issues
• Spreadsheet simulation
Simple static, dynamic models
• Overview of a simulation study
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 2 of 57
The System:
A Simple Processing System
Machine
(Server)
Arriving Departing
7 6 5 4
Blank Parts Finished Parts
Queue (FIFO) Part in Service
• General intent:
Estimate expected production
Waiting time in queue, queue length, proportion of time
machine is busy
• Time units
Can use different units in different places … must declare
Be careful to check units when specifying inputs
Declare base time units for internal calculations, outputs
Be reasonable (interpretation, roundoff error)
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 3 of 57

Model Specifics
• Initially (time 0) empty and idle
• Base time units: minutes
• Input data (assume given for now …), in minutes:
Part Number Arrival Time Interarrival Time Service Time
1 0.00 1.73 2.90
2 1.73 1.35 1.76
3 3.08 0.71 3.39
4 3.79 0.62 4.52
5 4.41 14.28 4.46
6 18.69 0.70 4.36
7 19.39 15.52 2.07
8 34.91 3.15 3.36
9 38.06 1.76 2.37
10 39.82 1.00 5.38
11 40.82 . .
. . . .
. . . .
• Stop when 20 minutes of (simulated) time have
passed
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 4 of 57
Goals of Study:
Output Performance Measures
• Total production of parts over run (P)
• Average waiting time of parts in queue:
N N = no. of parts completing queue wait
∑ WQi WQi = waiting time in queue of ith part
i =1
Know: WQ1 = 0 (why?)
N
N > 1 (why?)
• Maximum waiting time of parts in queue:
max WQi
i =1,...,N

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 5 of 57

Goals of Study:
Output Performance Measures (cont’d.)
• Time-average number of parts in queue:
20
∫0 Q (t ) dt Q(t) = number of parts in queue
20 at time t
• Maximum number of parts in queue: max Q (t )
0≤t ≤20
• Average and maximum total time in system of
parts (a.k.a. cycle time):
P
∑TSi
i =1 , TSi = time in system of part i
max TSi
P i =1,...,P

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 6 of 57
Goals of Study:
Output Performance Measures (cont’d.)
• Utilization of machine (proportion of time busy)

{
20
∫ 0
B(t ) dt
, B(t ) = 10 ifif machine is busy at time t
20 machine is idle at time t
• Many others possible (information overload?)

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 7 of 57

Analysis Options
• Educated guessing
Average interarrival time = 4.08 minutes
Average service time = 3.46 minutes
So (on average) parts are being processed faster than they
arrive
– System has a chance of operating in a stable way in long run, i.e.,
might not “explode”
– If all interarrivals and service times were exactly at their mean, there
would never be a queue
– But data clearly exhibit variability, so a queue could form
If we’d had average interarrival < average service time, and
this persisted, then queue would explode
Truth — between these extremes
Guessing has its limits …
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 8 of 57
Analysis Options (cont’d.)
• Queueing theory
Requires additional assumptions about model
Popular, simple model: M/M/1 queue
– Interarrival times ~ exponential
– Service times ~ exponential, indep. of interarrivals
– Must have E(service) < E(interarrival)
– Steady-state (long-run, forever)
– Exact analytic results; e.g., average waiting time in queue is
µS2 µ A = E(interarrival time)
,
µ A − µS µS = E(service time)
Problems: validity, estimating means, time frame
Often useful as first-cut approximation

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 9 of 57

Mechanistic Simulation
• Individual operations (arrivals, service times) will
occur exactly as in reality
• Movements, changes occur at right “times,” in
right order
• Different pieces interact
• Install “observers” to get output performance
measures
• Concrete, “brute-force” analysis approach
• Nothing mysterious or subtle
But a lot of details, bookkeeping
Simulation software keeps track of things for you
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 10 of 57
Pieces of a Simulation Model
• Entities
“Players” that move around, change status, affect and are
affected by other entities
Dynamic objects — get created, move around, leave
(maybe)
Usually represent “real” things
– Our model: entities are parts
Can have “fake” entities for modeling “tricks”
– Breakdown demon, break angel
Though Arena has built-in ways to model these examples directly
Usually have multiple realizations floating around
Can have different types of entities concurrently
Usually, identifying types of entities is first thing to do in
building model
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 11 of 57

Pieces of a Simulation Model (cont’d.)


• Attributes
Characteristic of all entities: describe, differentiate
All entities have same attribute “slots” but different values
for different entities, for example:
– Time of arrival
– Due date
– Priority
– Color
Attribute value tied to a specific entity
Like “local” (to entities) variables
Some automatic in Arena, some you define

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 12 of 57
Pieces of a Simulation Model (cont’d.)
• (Global) Variables
Reflects a characteristic of whole model, not of specific
entities
Used for many different kinds of things
– Travel time between all station pairs
– Number of parts in system
– Simulation clock (built-in Arena variable)
Name, value of which there’s only one copy for whole
model
Not tied to entities
Entities can access, change variables
Writing on wall (rewriteable)
Some built-in by Arena, you can define others

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 13 of 57

Pieces of a Simulation Model (cont’d.)


• Resources
What entities compete for
– People
– Equipment
– Space
Entity seizes a resource, uses it, releases it
Think of a resource being assigned to an entity, rather than
an entity “belonging to” a resource
“A” resource can have several units of capacity
– Seats at a table in a restaurant
– Identical ticketing agents at an airline counter
Number of units of resource can be changed during
simulation

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 14 of 57
Pieces of a Simulation Model (cont’d.)
• Queues
Place for entities to wait when they can’t move on (maybe
since resource they want to seize is not available)
Have names, often tied to a corresponding resource
Can have a finite capacity to model limited space — have
to model what to do if an entity shows up to a queue that’s
already full
Usually watch length of a queue, waiting time in it

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 15 of 57

Pieces of a Simulation Model (cont’d.)


• Statistical accumulators
Variables that “watch” what’s happening
Depend on output performance measures desired
“Passive” in model — don’t participate, just watch
Many are automatic in Arena, but some you may have to
set up and maintain during simulation
At end of simulation, used to compute final output
performance measures

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 16 of 57
Pieces of a Simulation Model (cont’d.)
• Statistical accumulators for simple processing
system
Number of parts produced so far
Total of waiting times spent in queue so far
No. of parts that have gone through queue
Max time in queue we’ve seen so far
Total of times spent in system
Max time in system we’ve seen so far
Area so far under queue-length curve Q(t)
Max of Q(t) so far
Area so far under server-busy curve B(t)

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 17 of 57

Simulation Dynamics:
Event-Scheduling “World View”
• Identify characteristic events
• Decide on logic for each type of event to:
Effect state changes for each event type
Observe statistics
Update times of future events (maybe of this type, other
types)
• Keep a simulation clock, future event calendar
• Jump from one event to the next, process,
observe statistics, update event calendar
• Must specify an appropriate stopping rule
• Usually done with general-purpose programming
language (C++, Java, Matlab, FORTRAN, etc.)
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 18 of 57
Events for the
Simple Processing System
• Arrival of a new part to system
Update time-persistent statistical accumulators (from last
event to now)
– Area under Q(t)
– Max of Q(t)
– Area under B(t)
“Mark” arriving part with current time (use later)
If machine is idle:
– Start processing (schedule departure), Make machine busy, Tally
waiting time in queue (0)
Else (machine is busy):
– Put part at end of queue, increase queue-length variable
Schedule next arrival event
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 19 of 57

Events for the


Simple Processing System (cont’d.)
• Departure (when a service is completed)
Increment number-produced stat accumulator
Compute & tally time in system (now – time of arrival)
Update time-persistent statistics (as in arrival event)
If queue is non-empty:
– Take first part out of queue, compute & tally its waiting time in
queue, begin service (schedule departure event)
Else (queue is empty):
– Make machine idle (Note: there will be no departure event
scheduled on future events calendar, which is as desired)

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 20 of 57
Events for the
Simple Processing System (cont’d.)
• The End
Update time-persistent statistics (to end of simulation)
Compute final output performance measures using current
(= final) values of statistical accumulators
• After each event, event calendar’s top record is
removed to see what time it is, what to do
• Also must initialize everything

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 21 of 57

Some Additional Specifics for the


Simple Processing System
• Simulation clock variable (internal in Arena)
• Event calendar: list of event records:
[Entity No., Event Time, Event Type]
Keep ranked in increasing order on Event Time
Next event always in top record
Initially, schedule first Arrival, The End (Dep.?)
• State variables: describe current status
Server status B(t) = 1 for busy, 0 for idle
Number of customers in queue Q(t)
Times of arrival of each customer now in queue (a list of
random length)

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 22 of 57
Simulation by Hand
• Manually track state variables, statistical
accumulators
• Use “given” interarrival, service times
• Keep track of event calendar
• “Lurch” clock from one event to next
• Will omit times in system, “max” computations
here (see text for complete details)

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 23 of 57

Simulation by Hand:
Setup
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 24 of 57
Simulation by Hand:
t = 0.00, Initialize
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [1, 0.00, Arr]
0.00 0 0 <empty> [–, 20.00, End]

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue
0 0.00 0.00 0.00

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 25 of 57

Simulation by Hand:
t = 0.00, Arrival of Part 1
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [2, 1.73, Arr]
1 0.00 1 0 <empty> [1, 2.90, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
1 0.00 0.00 0.00

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 26 of 57
Simulation by Hand:
t = 1.73, Arrival of Part 2
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [1, 2.90, Dep]
2 1 1.73 1 1 (1.73) [3, 3.08, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
1 0.00 0.00 1.73

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 27 of 57

Simulation by Hand:
t = 2.90, Departure of Part 1
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [3, 3.08, Arr]
2 2.90 1 0 <empty> [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.17 2.90

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 28 of 57
Simulation by Hand:
t = 3.08, Arrival of Part 3
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [4, 3.79, Arr]
3 2 3.08 1 1 (3.08) [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.17 3.08

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 29 of 57

Simulation by Hand:
t = 3.79, Arrival of Part 4
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [5, 4.41, Arr]
4 3 2 3.79 1 2 (3.79, 3.08) [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.88 3.79

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 30 of 57
Simulation by Hand:
t = 4.41, Arrival of Part 5
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [2, 4.66, Dep]
5 4 3 2 4.41 1 3 (4.41, 3.79, 3.08) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 3.12 4.41

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 31 of 57

Simulation by Hand:
t = 4.66, Departure of Part 2
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [3, 8.05, Dep]
5 4 3 4.66 1 2 (4.41, 3.79) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
3 2.75 3.87 4.66

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 32 of 57
Simulation by Hand:
t = 8.05, Departure of Part 3
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [4, 12.57, Dep]
5 4 8.05 1 1 (4.41) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
4 7.01 10.65 8.05

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 33 of 57

Simulation by Hand:
t = 12.57, Departure of Part 4
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [5, 17.03, Dep]
5 12.57 1 0 () [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
5 15.17 15.17 12.57

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 34 of 57
Simulation by Hand:
t = 17.03, Departure of Part 5
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [6, 18.69, Arr]
17.03 0 0 () [–, 20.00, End]

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue
5 15.17 15.17 17.03

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 35 of 57

Simulation by Hand:
t = 18.69, Arrival of Part 6
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [7, 19.39, Arr]
6 18.69 1 0 () [–, 20.00, End]
[6, 23.05, Dep]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.17 17.03

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 36 of 57
Simulation by Hand:
t = 19.39, Arrival of Part 7
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [–, 20.00, End]
7 6 19.39 1 1 (19.39) [6, 23.05, Dep]
[8, 34.91, Arr]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.17 17.73

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 37 of 57

Simulation by Hand:
t = 20.00, The End
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [6, 23.05, Dep]
7 6 20.00 1 1 (19.39) [8, 34.91, Arr]

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.78 18.34

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 38 of 57
Simulation by Hand:
Finishing Up
• Average waiting time in queue:
Total of times in queue 15.17
= = 2.53 minutes per part
No. of times in queue 6
• Time-average number in queue:
Area under Q(t ) curve 15.78
= = 0.79 part
Final clock value 20
• Utilization of drill press:
Area under B(t ) curve 18.34
= = 0.92 (dimension less)
Final clock value 20

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 39 of 57

Complete Record of the


Hand Simulation

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 40 of 57
Event-Scheduling Logic via
Programming
• Clearly well suited to standard programming
language (C, C++, Java, etc.)
• Often use “utility” libraries for:
List processing
Random-number generation
Random-variate generation
Statistics collection
Event-list and clock management
Summary and output
• Main program ties it together, executes events in
order
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 41 of 57

Simulation Dynamics:
Process-Interaction World View
• Identify characteristic entities in system
• Multiple copies of entities co-exist, interact,
compete
• “Code” is non-procedural
• Tell a “story” about what happens to a “typical”
entity
• May have many types of entities, “fake” entities
for things like machine breakdowns
• Usually requires special simulation software
Underneath, still executed as event-scheduling
• View normally taken by Arena
Arena translates your model description into a program in
SIMAN simulation language for execution

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 42 of 57
Randomness in Simulation
• Above was just one “replication” — a sample of
size one (not worth much)
• Made a total of five replications (IID):

Substantial variability
across replications

• Confidence intervals for expected values:


In general, X ± tn −1,1−α / 2s / n (normality assumption?)
For expected total production, 3.80 ± (2.776)(1.64 / 5 )
3.80 ± 2.04 Precision?
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 43 of 57

Comparing Alternatives
• Usually, simulation is used for more than just a
single model “configuration”
• Often want to compare alternatives, select or
search for best (via some criterion)
• Simple processing system: What would happen
if arrival rate doubled?
Cut interarrival times in half
Rerun model for double-time arrivals
Make five replications

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 44 of 57
Results: Original vs. Double-Time
Arrivals
• Original – circles
• Double-time – triangles
• Replication 1 – filled in
• Replications 2-5 – hollow
• Note variability
• Danger of making decisions
based on one (first)
replication
• Hard to see if there are
really differences
• Need: Statistical analysis
of simulation output data
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 45 of 57

Simulating with Spreadsheets:


Introduction
• Popular, ubiquitous tool
• Can use for simple simulation models
Typically, only static models
– Risk analysis, financial/investment scenarios
Only (very) simplest of dynamic models
• Two examples
Newsvendor problem (static)
Waiting times in single-server queue (dynamic)
– Special recursion valid only in this case

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 46 of 57
Simulating with Spreadsheets:
Newsvendor Problem – Setup
• Rupert sells daily newspapers on street
Rupert buys for c = $0.55 each, sells for r = $1.00 each
• Each morning, Rupert buys q copies
q is a fixed number, same every day
• Demand during a day: D = max (X, 0)
X ~ normal (µ = 135.7, σ = 27.1), from historical data
X rounds X to nearest integer
• If D ≤ q, satisfy all demand, and q – D ≥ 0 left over,
sell for scrap at s = $0.03 each
• If D > q, sells out (sells all q copies), no scrap
But missed out on D – q > 0 sales
• What should q be?
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 47 of 57

Simulating with Spreadsheets:


Newsvendor Problem – Formulation
• Choose q to maximize expected profit per day
q too small – sell out, miss $0.45 profit per paper
q too big – have left over, scrap at a loss of $0.52 per paper
• Classic operations-research problem
Many versions, variants, extensions, applications
Much research on exact solution in certain cases
But easy to simulate, even in a spreadsheet
• Profit in a day, as a function of q:
W(q) = r min (D, q) + s max (q – D, 0) – cq
Sales revenue Scrap revenue Cost
W(q) is a random variable – profit varies from day to day
• Maximize E(W(q)) over nonnegative integers q
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 48 of 57
Simulating with Spreadsheets:
Newsvendor Problem – Simulation
• Set trial value of q, generate demand D, compute
profit for that day
Then repeat this for many days independently, average to
estimate E(W(q))
– Also get confidence interval, estimate of P(loss), histogram of W(q)
Try for a range of values of q
• Need to generate demand D = max (X, 0)
So need to generate X ~ normal (µ = 135.7, σ = 27.1)
(Much) ahead – Sec. 12.2, generating random variates
In this case, generate X = Φµ-1,σ(U)
U is a random number distributed uniformly on [0, 1] (Sec. 12.1)
Φµ,σ is cumulative distribution function of normal (µ, σ) distribution

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 49 of 57

Simulating with Spreadsheets:


Newsvendor Problem – Excel
• File Newsvendor.xls All files in book: www.mhhe.com/kelton,
Student Edition, BookExamples.zip

• Input parameters in cells B4 – B8 (blue)


• Trial values for q in row 2 (pink)
• Day number (1, 2, ..., 30) in column D
• Demands in column E for each day:
= MAX(ROUND(NORMINV(RAND(), $B$7, $B$8), 0), 0)
Rounding Φ -1 U(0, 1) µ σ
function random number

RAND() is “volatile” X ~ normal (µ, σ)


so regenerates on Round to
any edit, or F9 key $ pins down following nearest
MAX 2nd
column or row when integer
argument
copying formula
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 50 of 57
Simulating with Spreadsheets:
Newsvendor Problem – Excel (cont’d.)
• For each q:
“Sold” column: number of papers sold that day
“Scrap” column: number of papers scrapped that day
“Profit” column: profit (+, –, 0) that day
Placement of “$” in formulas to facilitate copying
• At bottom of “Profit” columns (green):
Average profit over 30 days
Half-width of 95% confidence interval on E(W(q))
– Value 2.045 is upper 0.975 critical point of t distribution with 29 d.f.
– Plot confidence intervals as “I-beams” on left edge
Estimate of P(W(q) < 0)
– Uses COUNTIF function
• Histograms of W(q) at bottom
Vertical red line at 0, separates profits, losses
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 51 of 57

Simulating with Spreadsheets:


Newsvendor Problem – Results
• Fine point – used same daily demands (column E)
for each day, across all trial values of q
Would have been valid to generate them independently
Why is it better to use same demands for all q?
• Results
Best q is about 140, maybe a little less
Randomness in all results (tap F9 key)
– All demands, profits, graphics change
– Confidence-interval, histogram plots change
– Reminder that these are random outputs, random plots
Higher q ⇒ more variability in profit
– Histograms at bottom are wider for larger q
– Higher chance of both large profits, but higher chance of loss, too
– Risk/return tradeoff can be quantified – risk taker vs. risk-averse
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 52 of 57
Simulating with Spreadsheets:
Single-Server Queue – Setup
• Like hand simulation, but:
Interarrival times ~ exponential with mean 1/λ = 1.6 min.
Service times ~ uniform on [a, b] = [0.27, 2.29] min.
Stop when 50th waiting time in queue is observed
– i.e., when 50th customer begins service, not exits system
• Watch waiting times in queue WQ1, WQ2, ..., WQ50
Important – not watching anything else, unlike before
• Si = service time of customer i,
Ai = interarrival time between custs. i – 1 and i
• Lindley’s recursion (1952): Initialize WQ1 = 0,
WQi = max (WQi – 1 + Si – 1 – Ai, 0), i = 2, 3, ...
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 53 of 57

Simulating with Spreadsheets:


Single-Server Queue – Simulation
• Need to generate random variates: let U ~ U[0, 1]
Exponential (mean 1/λ): Ai = –(1/λ) ln(1 – U)
Uniform on [a, b]: Si = a + (b – a) U
• File MU1.xls All files in book: www.mhhe.com/kelton,
Student Edition, BookExamples.zip

• Input parameters in cells B4 – B6 (blue)


Some theoretical outputs in cells B8 – B10
• Customer number (i = 1, 2, ..., 50) in column D
• Five IID replications (three columns for each)
IA = interarrival times, S = service times
WQ = waiting times in queue (plot, thin curves)
– First one initialized to 0, remainder use Lindley’s recursion
Curves rise from 0, variation increases toward right
– Creates positive autocorrelation down WQ columns
Curves have less abrupt jumps than if WQi’s were independent
Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 54 of 57
Simulating with Spreadsheets:
Single-Server Queue – Results
• Column averages (green)
Average interarrival, service times close to expectations
Average WQi within each replication
– Not too far from steady-state expectation
– Considerable variation
– Many are below it (why?)
• Cross-replication (by customer) averages (green)
Column T, thick line in plot to dampen noise
• Why no sample variance, histograms of WQi’s?
Could have computed both, as in newsvendor; two issues:
– Nonstationarity – what is a “typical” WQi here?
– Autocorrelation – biases variance estimate, may bias histogram if
run is not “long enough”

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 55 of 57

Simulating with Spreadsheets:


Recap
• Popular for static models
Add-ins – @RISK, Crystal Ball
• Inadequate tool for dynamic simulations if there’s
any complexity
Extremely easy to simulate single-server queue in Arena –
Chapter 3 main example
Can build very complex dynamic models with Arena – most
of rest of book

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 56 of 57
Overview of a Simulation Study
• Understand system
• Be clear about goals
• Formulate model representation
• Translate into modeling software
• Verify “program”
• Validate model
• Design experiments
• Make runs
• Analyze, get insight, document results
More: Chapter 13

Simulation with Arena, 6th ed. Chapter 2 – Fundamental Simulation Concepts Slide 57 of 57
What We’ll Do ...
A Guided Tour
Through Arena • Start Arena
• Load, explore, run an existing model
Basically same as hand simulation in Chapter 2
Browse dialogs and menus
Run model
Chapter 3 Look at results
• Construct same model from scratch
• Use just these basic building blocks in case
study to address real operational question
• Tour menus, toolbars, drawing, printing
• Help system
• Options for running and control
Last revision March 9, 2014

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 1 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 2 of 70

Behavior of Arena Starting Up


• Arena is a true Windows application • Installing Arena – Appendix D
Appearance, operation, functions, are standard • Locate icon or shortcut; double-click
Interoperability with other software (MS Office, CAD) Or, Start > All Programs > Rockwell Software > Arena > Arena
Interact, communicate with other software (Chapter 10) Licensed Mode vs. Training/Evaluation Mode (STUDENT)
• Assume you already know basics of Windows: • See File, View, Tools, Help menus
Other menus present if a model file is open
Disks, files, folders, paths
Mousing, keyboarding
• Toolbars with buttons
Unless a model file is open, only New model file, Open
Resizing, moving, maximizing, minimizing windows model file, Template Attach/Detach, Context Help (click it,
Menu operations then click on buttons or menu items)
Ctrl, Alt, Shift keys • Tooltips – roll over toolbar buttons for names
Cut, copy, paste • Quitting Arena: File > Exit, Alt+F4, or top right
Filling out dialog fields

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 3 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 4 of 70
Opening an Existing Model Flowchart and Spreadsheet Views
• File > Open … or button Why the .doe default filename • Model window split into two views
Navigate to desired disk/directory extension for Arena models? Flowchart view
Click > Open or double-click Model 03-01.doe – Graphics
– Process flowchart
Book example models: www.mhhe.com/kelton,
– Animation, drawing
Student Edition, BookExamples.zip, put where you want
– Edit things by double-clicking on them, get into a dialog
More examples (typical location on Windows 7): Spreadsheet view
C:\Users\Public\Public Documents\Rockwell Software\Arena\Examples
– Displays model data directly
• Model window (right side of Arena window) – Can edit, add, delete data in spreadsheet view
Where model is built – Displays all similar kinds of modeling elements at once
Resize, maximize, minimize, scroll/pan, zoom Many model parameters can be edited in either view
Can have multiple model windows open at once Horizontal splitter bar to apportion two views
• Cut, Copy, Paste within Arena, and between View > Split Screen (or push ) to see both flowchart and
spreadsheet views (otherwise, only get view for active
Arena and other applications (when sensible) module type)
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 5 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 6 of 70

Project Bar Status Bar


• Usually down left edge of Arena window • At very bottom of Arena window
• Hosts panels with modeling building blocks: • Displays various information sensitive to status
modules Coordinates of cursor in “worldspace”
Both flowchart and spreadsheet modules
When simulation is running:
• Displays one panel at a time – Simulation clock value
Switch to different panels via horizontal buttons – Replication number being executed
Panels for Basic Process, Reports (after running), Navigate – Number of replications to be done
(to different views within a model or to different hierarchical
submodels, thumbnail), … others can be attached
• Hide by clearing (unchecking) View > Status Bar
(Template Attach button ) for different modeling levels,
specialties
• Usually docked to left edge but can move, float
• Hide it via View > Project Bar or its own small
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 7 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 8 of 70
Moving Around, Up, Down
Modules
in Flowchart View of Model Window
• Underlying world space for model • Basic building blocks of simulation model
(x, y) coordinates, arbitrary units (±32K in all directions) • Two basic types: flowchart and data
• Pan with scroll bars, arrow keys, thumbnail • Different types of modules for different actions,
• Zoom in (down): or + key or thumbnail specifications
• Zoom out (up): or – key or thumbnail • “Blank” modules: on Project Bar
• See all at min altitude: or * key To navigate via keyboard, Add a flowchart module to model: drag it from Project Bar
into flowchart view of model window
• Named views flowchart view of model window
must be active ... click in it. – Can have many instances of same kind of flowchart module in
Save a pan/zoom view for different parts of model model
Assign a Hot key (case-sensitive) Use a data module: select it (single-click) in Project Bar,
Access via View > Named Views … or ? key or edit in spreadsheet view of model window
– Only one instance of each kind of data module in model, but it can
• Display grid ( ), snap to grid ( ) toggles have many entries (rows) in spreadsheet view
• Rulers, alignment, guides, glue – see text – Can edit via dialog – double-click on number in leftmost column
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 9 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 10 of 70

Flowchart Modules Data Modules


• Describe dynamic processes • Set values, conditions, etc. for whole model
Nodes/places through which entities flow No entity flow, no connections
Typically connected to each other in some way • Basic Process panel data module types:
Attribute, Entity, Queue, Resource, Variable, Schedule, Set
• Basic Process panel flowchart module types: • Other panels – many other kinds
Create, Dispose, Process, Decide, Batch, Separate,
Assign, Record
• Icons in Project Bar look like little spreadsheets
• Other panels – many other kinds • To use a data module, select it (single-click) in
Project Bar, edit in spreadsheet view
• Shape like flowcharting (later, colors for hints) Can edit via dialog – double-click in leftmost column, or
right-click and select Edit via Dialog
• Two ways to edit Double-click where indicated to add new row
Double-click to open up, then fill out dialogs Right-click on row, column to do different things
Select (single-click) a module type in model or Project Bar, • At most one instance of each kind of data module
get all modules of that type in spreadsheet view in a model
But each one can have many entries (rows)
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 11 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 12 of 70
Relations Among Modules Internal Model Documentation
• Flowchart, data modules related via names for • Data Tips on modules, graphics – hover mouse
objects over object to see
Queues, Resources, Entity types, Variables, Expressions, Default part – generic info on object (name, type)
Sets, … many others User-specified part – right-click on object, select Properties,
enter text under Description
• Arena keeps internal lists of different kinds of
Toggle display of Data tips via View > Data Tips
names
Presents existing lists to you where appropriate • Project Description – Run > Setup > Project
Helps you remember names, protects you from typos
Parameters, enter text under Project Description
• All names you make up in a model must be • Model Documentation Report – Tools > Model
Documentation Report
unique across model, even across different types
Generates HTML file with model details (can choose which
of modules kinds of details to include)
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 13 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 14 of 70

Browsing Through Model 3-1 Create Flowchart Module


• Open Model 03-01.doe, Book Examples folder • “Birth” node for entities
www.mhhe.com/kelton, Student Edition, BookExamples.zip, • Gave this instance of Create-type module the
unzip and put folder where you want on your system Name Part Arrives to System
• Three flowchart modules If we had other Create modules (we don’t) they’d all have
Create, Process, Dispose different Names
• Entries in three data modules • Double-click on module to open property dialog:
Entity, Queue, Resource
• Animation objects
Resource animation
Two plots
Some (passive) labels, “art” work

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 15 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 16 of 70
Editing Flowchart Modules in
Create Flowchart Module (cont’d.)
Spreadsheet View
• Name – for module (type it in, overriding default) • Alternative to dialog for each instance of a
• Entity Type – enter descriptive name module type
Can have multiple Entity Types with distinct names • See all instances of a module type at once
• Time Between Arrivals area Convenient for seeing, editing many things at once
Specify nature of time separating consecutive arrivals
Type – pull-down list, several options
• Selecting a module in either flowchart or
Value – depends on Type … for Random (Expo) is mean
spreadsheet view also selects it in the other view
Units – time units for Value • Click, double-click fields to view, edit
• Entities per Arrival – constant, random variable, • Right-click in row to Edit via Dialog, define user
very general “Expression” (more later …) Data Tip (via Properties)
• Max Arrivals – choke off arrivals (from here) after • Right-click in expression fields to get Expression
this many arrivals (batches, not entities) Builder for help in constructing complex
• First Creation – time of first arrival (need not be 0) expressions with Arena variables (more later …)
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 17 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 18 of 70

Entity Data Module Process Flowchart Module


• A data module, so edit in spreadsheet view only • Represents machine, including:
• View, edit aspects of different entity Types in Resource
your model (we have just one entity Type, Part) Queue
• Pull-down lists activated as you select fields Entity delay time (processing)

• Our only edit – Initial Picture for animation • Enter Name – Drilling Center
Picked Picture.Blue Ball from default list • Type – picked Standard to define logic here
Menu option Edit > Entity Pictures ... to see, modify rather than in a submodel (more later …)
• Report Statistics check box at bottom
To get utilizations, queue lengths, queue waiting times, etc.

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 19 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 20 of 70
Process Flowchart Module (cont’d.) Process Flowchart Module (cont’d.)
• Logic area – what happens to entities here • Delay Type – choice of probability distributions,
Action constant or general Expression (more later …)
– Seize Delay Release – entity Seizes some number of units of a Resource
(maybe after a wait in queue), Delay itself there for processing time, then
• Units – time units for delay (don’t ignore)
Release units of Resource it had Seized – chose this option
Delay entity (red traffic light) – no Resources or queueing, just sit here for a time duration
• Allocation – how to “charge” delay in costing
Seize Delay (no Release … presumably Release downstream) (more later …)
Delay Release (if Resource had been Seized upstream)
– Priority for seizing – lower numbers ⇒ higher priority • Prompts on next line – change depending on
– Different Action choices could allow stringing together several Process choice of Delay Type – specify numerical
modules for modeling flexibility
parameters involved
Resources – define Resource(s) to be seized, released
– Double-click on row to open subdialog • Can also edit in spreadsheet view
– Define Resource Name, Quantity of units to be Seized/Released here Subdialogs (e.g., Resource here) become secondary
Not where you say there are multiple Resource units ... do that in Resource data module
spreadsheets that pop up, must be closed
– Several Resources present (Add) – entities must first Seize all
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 21 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 22 of 70

Resource Data Module Queue Data Module


• Defining Drill Press Resource in Process • Specify aspects of queues in model
module automatically creates entry (row) for it in We only have one, named Drilling Center.Queue
Resource data module (default name, given Process module name)
• Can edit it here for more options • Type – specifies queue discipline or ranking rule
Type – could vary capacity Based on Schedule instead of If Lowest or Highest Attribute Value, then another field
having a Fixed Capacity appears where you specify which attribute to use
– Would define Schedule in Schedule data module … later • Shared – if this queue will be shared among
Capacity (if Type = Capacity) is number of units of this several resources (later …)
resource that exist
Failures – cause resource to fail according to some pattern
• Report Statistics – check for automatic collection
– Define this pattern via Failure data module (Advanced Process
and reporting of queue length, time in queue
panel) … later

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 23 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 24 of 70
Animating Resources and Queues Dispose Flowchart Module
• Got queue animation automatically by • Represents entities leaving model boundaries
specifying a Seize in Process module • Name the module
Entity pictures (blue balls) line up here in animation • Decide on Record Entity Statistics (average,
• Don’t get Resource animation automatically maximum time in system of entities exiting here,
To add it, use Resource button in Animate toolbar … get costing information)
Resource Picture Placement dialog Check boxes for statistics collection and reporting:
– Identifier – link to Resource name in pull-down list Most are checked (turned on) by default
– Specify different pictures for Idle, Busy states Little or no modeling effort to say yes to these
For pre-defined “art” work, Open a picture library (.plb filename extension) But in some models can slow execution markedly
Moral – if you have speed problems, clear these if you don’t care
Scroll up/down on right, select (single-click) a picture on right, select Idle or Busy
state on left, then to copy picture

To edit later, double-click on picture in flowchart view

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 25 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 26 of 70

Connecting Flowchart Modules Connecting Flowchart Modules (cont’d.)


• Establish (fixed) sequence of flowchart modules • Object menu toggles
through which entities flow Auto-Connect – automatically connect entry point of newly
• To make a connection placed module from exit point of selected module
Connect (Object > Connect), cursor becomes cross hairs Smart Connect – force segments to horizontal/vertical
Click on exit point from source module, then entry point – Makes for a tidy-looking flowchart, but has the disadvantage that it
can cause connection lines to be directly on top of each other,
on destination module
making it impossible to tell them apart
– Green, red boxes light up to aid in hitting exit, entry points
Animate Connectors – show entity moves along connectors
Intermediate clicks for non-straight line in segments
(zero time for statistics collection), for verification
• To make many connections • Move entry/exit points relative to their module
After each connection, right-click in blank space, select
Repeat Last Action from pop-up menu Right-click on entry/exit point
Or, double-click on , place multiple connections (no right- Select Allow Move from pop-up
click needed), right-click or Esc to end Drag entry/exit point around
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 27 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 28 of 70
Dynamic Plots Dynamic Plots (cont’d.)
• Trace variables (e.g., queue lengths) as Axes tab – choose Time (X) Axis on left
simulation runs – “data animation” – X axis is always simulated time
• Disappear after run ends – Scale area on right (“+” to open it) – specify Min/Max,
MajorIncrement, AutoScroll (“windows” axis during simulation)
To keep, save data, postprocess in Output Analyzer ... later – Title on right – type in Text (mention units!), set Visible to True
• Plot button from Animate toolbar Axes tab – choose Left Value (Y) Axis on left
Six tabs across top; many options (best just to explore) – Note possibility for a different right Y axis scale for multiple curves
Data Series tab – click Add button for each curve to be – Scale area on right – specify Min/Max, MajorIncrement, usually
leave AutoScaleMaximum at True so Y axis scale will automatically
plotted on same set of axes adjust to contain whole plot during run
– In right “Properties” area, enter Name, define Expression – Title on right
Pull down Build Expression, “+” Basic Process Variables, “+” Queue, Current
Number in Queue, select Drilling Center.Queue in Queue Name field pull- Legend tab – clear Show Legend box since we have only
down, note Current Expression NQ(Drilling Center.Queue) automatically one curve, and Y axis is labeled
filled in at bottom, OK button to copy this expression back out
– DrawMode – Stairs or PointToPoint Note automatic context-sensitive
Other tabs – Titles, Areas, 3-D View ... just explore
– Line/fill color, vertical-axis on left/right mini Help window on right • Drop plot in via crosshairs (resize, move later)
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 29 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 30 of 70

Dressing Things Up Setting Run Conditions


• Add drawing objects from Draw toolbar • Run > Setup menu dialog – seven tabs
Project Parameters – Title, Name, Project Description, stats
Similar to other drawing, CAD packages
Replication Parameters
Object-oriented drawing tools (layers, etc.), not just a paint – Number of Replications
tool – Initialization options Between Replications
Start Date/Time to associate with start of simulation
• Add Text to annotate –
– Warm-up Period (when statistics are cleared)
Control font, size, color, orientation – Replication Length (and Time Units)
– Hours per “Day” (convenience for 16-hour days, etc.)
– Base Time Units (output measures, internal computations, units
where not specified in dialog, e.g. Plot X Axis time units)
– Terminating Condition (complex stopping rules)
Tabs for run speed, run control, reports, array sizes, visuals
Terminating your simulation:
You must specify – part of modeling
Arena has no default termination
If you don’t specify termination, Arena will usually keep running forever

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 31 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 32 of 70
Running It Viewing Reports
• Plain-vanilla run: Click from Standard toolbar • Click Yes in Arena box at end of run
(like audio/video players) Opens new reports window (separate from model window)
First time or after changes: Check inside Arena window
Enters run mode — can move around but not edit Project Bar shows Reports panel, different reports (each
Speed up or slow down animation display via slider bar one would be a new window)
– Or tap > on keyboard to speed up, < to slow down Remember to close all reports windows before future runs
When done, asked if you want to see summary reports • Default installation shows Category Overview
Click to get out of run mode (can’t edit until you do) report – summarizes many things about run
Can pause run with or Esc key Reports have “pages” to browse ( and )
• Other run control, viewing, checking options Also, “table contents” tree at left for quick jumps via ,
• Times are in Base Time Units for model
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 33 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 34 of 70

Viewing Reports – Examples Types of Statistics Reported


• Entity → Time → Total Time → Part: • Many output statistics are one of three types:
Avg. time in system was 6.4397 min., max was 12.6185
• Resource → Usage → Instantaneous Utilization → Tally – avg., max, min of a discrete list of numbers
Drill Press: – Used for discrete-time output processes like waiting times in queue,
Utilization was 0.9171 (busy 91.71% of the time) total times in system
• Process → Other → Number In → Drilling Center: Time-persistent – time-average, max, min of a plot of
During run, 7 parts entered Drilling Center something where x-axis is continuous time
• Process → Other → Number Out → Drilling Center: – Used for continuous-time output processes like queue lengths, WIP,
5 entities left Drilling Center (so were produced) server-busy functions (for utilizations)
• Entity → Time → Wait Time → Part: Counter – accumulated sums of something, usually just
Avg. wait time in all queues was 3.0340 min. (counts only nose counts of how many times something happened
entities that left the system, but Queue → Time → Waiting
Time → Drilling Center.Queue counts all entities that left – Often used to count entities passing through a point in model
this queue, so these results can differ)
• Entity → Other → Wip → Part:
Average Work in Process was 1.7060, max WIP was 4
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 35 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 36 of 70
More on Reports and their Files Build It Yourself
• Reports we just saw – based on MS Access .mdb • Build same model from scratch – details in text
database that Arena actually writes as it runs • Handy user-interface tricks:
.mdb file is saved and can be viewed later
Right-click in an empty spot in flowchart view – small box of
Viewing within Arena via SAP Crystal Reports to query
options, including Repeat Last Action … useful in repetitive
Access database, produce reports like Category Overview
editing like placing lots of same module type
• Arena also produces a plain-text summary report Ctrl+D or Ins key – duplicates whatever’s selected in
(.out filename extension)
flowchart view, offsetting it a bit … drag elsewhere, edit
Previous versions of Arena, underlying SIMAN language
Fairly cryptic, but gives quick view of lots of output data • Open new (blank) model window – name it, save
– Also contains a few things not in Access/Crystal Reports it, maybe maximize it
Multiple reports for multiple replications • Attach modeling panels you’ll need to Project Bar
• “Half Width” columns – 95% confidence intervals if not there
on outputs in long-run simulations … later
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 37 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 38 of 70

“Displays” for Create, Process, Dispose


Build It Yourself (cont’d.)
Modules
• Place, connect flowchart modules
• Edit flowchart, data modules as needed
Experiment with Expression Builder – right-click in
expression field
• Add plots, animation, artwork
• Add named views (? key or View > Named Views
or ), with hot key (case-sensitive)
• Edit Run > Setup dialog
• “Displays” in text
Compact way of saying what needs to be done in a dialog
Omits Arena defaults
Shows completed dialogs, table of actions needed
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 39 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 40 of 70
Case Study: Specialized Serial vs.
“Display” for Queue-Length Plot
Generalized Parallel Processing
• Loan applications go through four steps
Check credit, prepare covenant, price loan, disburse funds
Each step takes expo (1 hour)
Applications arrive with expo (1.25 hour) interarrival times
– First application arrives at time 0
Run for 160 hours
Watch avg, max no. applications in process (WIP);
avg, max total time in system of applications
Four employees, each can do any process step
• Serial specialized processing or generalized
Axes tab showing here ...
Figure 3-14 in book shows Data Series tab parallel processing?
What’s the effect of service-time variability on decision?
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 41 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 42 of 70

Case Study: Model 3-2, Case Study: Model 3-2,


Specialized Serial Processing Specialized Serial Processing (cont’d.)
• Four Process modules – similar to Model 3-1
Betty’s now idle but Chuck
Four separate Resources
and Doris are overloaded – Expo process time: Expression (via Expression Builder)
wasted capacity?
• Dispose module similar to Model 3-1
• Default entity picture (report) is OK
• Default Resource animations almost OK
Make Idle picture same as Busy
• File Model 03-02.doe All files in book: www.mhhe.com/kelton,
Student Edition, BookExamples.zip Select correct Resource name in Identifier field
• Create module – similar to Model 3-1 except expo • Queue, Resource data modules OK
mean, time units • Plot WIP – use Expression builder to find
Set Entity Type to Application EntitiesWIP(Application)
Fixed Y axis max = 25 to compare with next three models
• Fill in Run > Setup, lengthen queue animations
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 43 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 44 of 70
Case Study: Model 3-3, Case Study: Model 3-3,
Generalized Parallel Processing Generalized Parallel Processing (cont’d.)
• Replace four earlier Process modules with just a
single Process module
One Resource (Loan Officer), but four units of it
Only one place to queue, Still set Quantity to 1 since application just needs 1 officer
but processing times are
longer – sum of four IID Delay type – Expression
expo (1 hour) times EXPO(1) + EXPO(1) + EXPO(1) + EXPO(1)
– Why not 4*EXPO(1)?
• File Model 03-03.doe • Modify Resource Animation for four units
• Create, Dispose, plot, Run > Setup almost same Open Model 3-2 Resource Animation to get Resource
Just change some labels, etc. Picture Placement window, open Idle picture
Duplicate white square three times, realign; copy to Busy
In model window, double-click Seize Area, then Add three
Still not completely accurate animation (order) – need Sets
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 45 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 46 of 70

Case Study: Case Study:


Compare Model 3-2 vs. 3-3 Effect of Task-Time Variability
• Is parallel always better than serial under any
conditions?
Many aspects could matter
Focus on task-time variability
• Now, each task time ~ expo (1 hour)
Highly variable distribution
• Caution: This is from only one replication of each P(task time < 10 minutes) = 0.15
configuration, so there’s output variability See text
P(task time > 2 hours) = 0.14
Are differences statistically significant? (Exercise 6-19) In serial config., just one large task time congests greatly
– In parallel config. it would also congest, but probably not by as
much since other three tasks are probably not all large too
• Other extreme – each task time is exactly 1 hour
Leave interarrival times as expo (1.25 hours)
Models 3-4 (serial), 3-5 (parallel) – alter Process modules
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 47 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 48 of 70
Case Study:
More on Menus – File Menu
Effect of Task-Time Variability (cont’d.)
• Model-file management
• Template attach/detach
• DXF import (from CAD packages), Visio import
• Color palettes
• For constant service, parallel improvement • Printing
appears minor • Send (e-mail) open model file
Maybe not even statistically significant (Exercise 6-19)
• Some further questions • Recent models
In parallel, work is integrated/generalized, so would it be • Exit from Arena
slower per task? (Exercises 3-13, 6-20)
Effect of worker breaks? (Chapters 4, 5)
Differences statistically significant? (Exercises 6-19, 6-20)
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 49 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 50 of 70

Edit Menu Edit Menu (cont’d.)


• Undo/Redo • Replace – replaces all instances of a text string
• Cut/Copy/Paste with another text string
• Properties – display internal Arena object
• Paste Link (create OLE link) properties
• Duplicate, Delete selection • Links – to link to other files (spreadsheets,
• Select/Deselect All sounds, etc.)
• Insert New Object/Control – from other
• Entity Pictures – change content, definition of applications (e.g., graphics, VBA, ActiveX)
pictures presented in Entity data module • Object – edit object imported from another
• Find – searches all modules, animation objects application
for a text string … useful for finding wrong
names, typos after an error message from Arena

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 51 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 52 of 70
View Menu View Menu (cont’d.)
• Zooming – discussed before • Split Screen – if checked, shows both flowchart,
Zoom Factor – step size when zooming spreadsheet views
• Views – canned Arena views of flowchart view • Runtime Elements Bar – if checked, displays
• Named Views – define, change, use views window allowing choice of what is displayed
during execution
• Rulers, Grid, Guides, Snap, Glue – align objects
Page breaks – shows page breaks if printed • Toolbars – decide which toolbars show up
• Data Tips – toggles display of Data Tips • Project/Status Bar – toggle to show up or not
• Connector Arrows – show entity-flow direction • Debug Bar – if checked, displays window of
debugging tools during run
• Layers – which objects show up in which mode

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 53 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 54 of 70

Tools Menu Tools Menu (cont’d.)


• Arena NewsFlash – internet feed for updates, etc. • Import/Export model to/from Database – bring in,
• Arena Symbol Factory – make animation symbols save model details to Excel or Access
• Separate applications for modeling, analysis • OptQuest for Arena – separate application that
Input Analyzer – fit probability distributions for input, using “takes over” running of model to search for an
field-collected data … more in Chapt. 4 optimal scenario … more in Chapt. 6
Process Analyzer – run, compare many “scenarios” at once
… more in Chapt. 6
• AVI Capture – record actions (editing, animation)
– Also Output Analyzer … not on menus ... start from Start menu to .avi file for playback
Visual Designer for 3D animation, etc. • Macro – create Visual Basic macros (mini
Expression Builder – very useful tool (described earlier) programs), VB editor ... more in Chapter 10
• ReportDatabase – export results to CSV file • Module count – reports module instances
• Model Documentation Report – generate HTML • Options – control many aspects of how Arena
file with many details of this model works, looks
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 55 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 56 of 70
Arrange Menu Object Menu
• For modeling, graphics objects – first select • Connect tool – changes cursor to cross hairs
object(s) Hit twice for repeated connections, right-click or Esc to exit
• Bring object to Front, Send to Back – “stacking” • Auto-Connect new module to selected module
• Group, Ungroup objects (move together, etc.) • Smart Connect – new connections in
• Flip around Vertical, Horizontal line horizontal/vertical segments only
• Rotate object (90° clockwise) • Animate Connectors – show entities moving (at
• Align objects on top, bottom, left, or right edges infinite speed for statistics collection)
• Distribute objects evenly (horizontally, vertically) • Animate At Desktop Color Depth – use desktop
• Flowchart Alignment – arrange flowchart modules color depth (could slow run)
(horizontally, vertically) If not checked, color is 8-bit (256 colors), runs faster
• Snap Object to Grid – for selected object(s) • Submodel – define, manage hierarchical
• Change Object Snap Point on snapped object submodels, useful for large, complex models
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 57 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 58 of 70

Run Menu Window Menu


• Setup – control model run conditions • Cascade, Tile multiple open model windows
• Entries to run, check, pause, step through • Arrange Icons for any minimized model windows
• Alternatives to watch execution, view results (or • Use system Background Color – use Windows
errors) colors rather than Arena settings
• Control how run goes and is displayed • List of open model windows
• Most capabilities on Run Interaction Toolbar –
details later
• Access “code” in underlying SIMAN simulation
language

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 59 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 60 of 70
Help Menu Help Menu (cont’d.)
• One of several ways to get into Help system • Arena Product Manuals – detailed PDF reference
• Arena Help – TOC, Index, Search documents on Arena components
• What’s This? – adds ? to cursor, then click on • Activation – for licensing
things for brief description • Copy protection information for commercial,
• Release notes – recent changes, requirements research, and lab versions
• Arena Smart Files – subject-based index to many • About Arena... – version number, licensing
small but complete models that illustrate specific information, etc.
modeling techniques (very useful)
• List of attached modeling panels – select to get
Help on that one

Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 61 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 62 of 70

More on Toolbars More on Drawing


• Collections of buttons for “frequent” operations • Draw via toolbar buttons only (no menus):
Most are duplication of menu entries
Standard, Draw, Animate, Integration, View, Arrange, Run
Interaction, Record Macro, AVI Capture, Animate Transfer,
Dialog Design, Project/Status/Debug Bars
• Line, Polyline (Shift for 45 ), Arc, Bézier Curve
0

• View > Toolbars (or right-click in a toolbar area) • Box, Polygon, Ellipse (fill, line, shade)
to decide which ones show up, which to hide • Text (font, size, style)
• Toolbars can be torn off (“floating” palettes), or • Colors for Lines, Fill, Text, Window Background
“docked” to an edge of screen
• Arena remembers Toolbars for next time • Line Width, Style, Arrow Style, Pattern
• View > Toolbars > Customize to alter how • Show Dimensions – shows sizes, lengths for
toolbars and buttons are displayed precise drawing
• See text for run-through description of toolbars • Best way to learn: play around on scratch model
and buttons (or, just experiment)
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 63 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 64 of 70
Printing Help!
• Print all or parts of flowchart view of active model • Extensive, comprehensive online system –
window – supports color including complete (electronic) manuals
• Usual Print, Print Preview, Print Setup (File menu) • Interlinked via hypertext for cross referencing
• Could consume many pages … also prints named
views separately • Multiple entry points, including Help menu
Print Preview, select only what you want for printing (described above), links to websites
• View > Page Breaks to show how pages will break • button for context-sensitive help
• Alternative to printing from Arena: Windows Click it, then click what you’re curious about
Snipping Tool or PrintScreen key – sends screen • button in most dialogs
to clipboard, paste into another application
Alt+PrintScreen – sends only active window to clipboard • button (What’s This?) in dialogs for info on
Could first pass through a paint application to crop, etc. things in that dialog
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 65 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 66 of 70

Help! (cont’d.) More on Running Models


• Tooltips – roll over something, get sticky note • Run Menu; Standard & Run Interaction toolbars
• Run > Setup – many options to control run
• SMART library – small models illustrating points These are attached to model, and are not global
– subject index via Help > Arena Smart Files • Run > Go – run simulation “normally”
See the Help entry for location of files on your system (depends on selections from Run > Run Control
and Tools > Options > Run Control)
– Typical location on Windows 7:
C:\Users\Public\Public Documents\Rockwell Software\Arena\Smarts • Run > Step – one “step” at a time (verify,
debug)
• Online Help – • Run > Fast-Forward – disable animation
http://www.rockwellautomation.com/support (faster)
• Examples folder – several detailed, complete • Run > Pause (or Esc key) – freeze run, resume
examples, some fairly complex with Go
Typical location on Windows 7:
• Run > Start Over – go back to beginning of
C:\Users\Public\Public Documents\Rockwell Software\Arena\Examples simulation
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 67 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 68 of 70
More on Running Models (cont’d.) More on Running Models (cont’d.)
• Run > End – get out of run mode • Run > Run Control > Break on Module –
• Run > Check Model – like compiling set/clear break when an entity enters or resumes
activity on a module
• Run > Review Errors – for most recent Check
• Run > Run Control > Highlight Active Module –
• Run > Run Control > Command – bring up highlight flowchart module being executed
interactive command-line window to control run
• Run > Run Control > Batch Run (No Animation) –
• Run > Run Control > Breakpoints – set times, run model with no animation … this is even faster
conditions to interrupt for checks, illustration than Fast-Forward … usually used for
• Run > Run Control > Watch – bring up a “production runs” for statistical analysis
window to watch a variable or expression during • Run > SIMAN – view or write model (.mod) and
run experiment (.exp) files for underlying SIMAN
model
Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 69 of 70 Simulation with Arena, 6th ed. Chapter 3 – A Guided Tour Through Arena Slide 70 of 70
What We’ll Do ...
Modeling Basic
Operations and • Model 4-1: Electronic assembly/test system
Modeling approaches
Inputs New Arena modules (Decide, Record)
• Model 4-2: Enhanced electronic assembly/test
Resource Schedules, States, and Failures
Chapter 4
Frequency outputs
More on utilizations
• Model 4-3: Enhancing the animation
Queues, Entity Pictures, Resource Pictures
Adding Plots and Variables

Last revision December 22, 2013

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 1 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 2 of 68

Electronic Assembly/Test System


What We’ll Do ... (cont’d.)
(Model 4-1)
• Model 4-4: Adding entity travel times
Stations, Transfers, Routes, animation of entity movement
• Finding and fixing model errors
• Input analysis
Specifying input distributions, parameters
• Produce two different sealed elect. units (A, B)
Deterministic vs. random input
• Arriving parts: cast metal cases machined to
Collecting and using data
accept electronic parts
Fitting input distributions via Arena Input Analyzer
• Part A, Part B – separate prep areas
No data?
• Both go to Sealer for assembly, testing – then to
Nonstationary arrival processes
Shipping (out) if OK, or else to Rework
Multivariate and correlated input data
• Rework – Salvaged (and Shipped), or Scrapped
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 3 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 4 of 68
Part A Part B
• Interarrivals: expo (5) min. • Interarrivals: batches of 4, expo (30) min.
• From arrival point, go immediately to Part A Prep • Upon arrival, batch breaks into 4 individual parts
Process = (machine + deburr + clean) ~ tria (1, 4, 8) min. • Proceed immediately to Part B Prep area
• Go immediately to Sealer Process = (machine + deburr +clean) ~ tria (3, 5, 10)
Process = (assemble + test) ~ tria (1, 3, 4) min. • Go to Sealer
91% pass (i.e, 0.91 probability independently for each part), Process = (assemble + test) ~ weib (2.5, 5.3) min. ,
go to Shipped; Else go to Rework different from Part A, though at same station
• Rework: (re-process + testing) ~ expo (45) min. 91% pass, go to Shipped; Else go to Rework
80% pass (i.e, 0.80 probability independently for each part), • Rework: (re-process + test) = expo (45) min.
go to Salvaged; Else go to Scrapped 80% pass (i.e, 0.80 probability independently for each part),
go to Salvaged; Else go to Scrapped

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 5 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 6 of 68

Run Conditions, Output Developing a Modeling Approach


• Start empty & idle, run for 32 hours • Define pieces of model, modules, data structures,
control logic
• Collect statistics for each work area on • Appropriate level of detail – judgment call
Resource utilization • Often multiple ways to model, represent logic
Number in queue • This model:
Time in queue Entities are individual parts (two types)
• For each exit point (Shipped, Salvaged, Separate Create modules for two part types
Scrapped), collect total time in system (a.k.a. Separate Process modules for each Prep area
Process modules for Sealer and Rework, each followed by
cycle time) a Decide module (2-way by Chance)
Depart modules for Shipped, Salvaged, Scrapped
Attribute Sealer Time assigned after Creates in Assign
modules (parts have different times at the Sealer)
Record modules just before Departs for time in system
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 7 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 8 of 68
Building Model Part A Create Module
• New model window • Name: Part A Arrive
• Attach Basic Process panel (if needed) • Entity Type: Part A Once these entries are made,
they are placed on list for
• Place modules • Time Between Arrivals names of that type (Module
Name, Entity Type, etc.) and
× 2)
Create (× Alternate strategy –
Type: Random (Expo) will appear on future pull-down
lists for that type of name.
× 2)
Assign (× place one module at a – Pull-down list with options
time, fill it out completely
Process (×× 4) Value: 5
× 2)
Decide (× Units: Minutes
Pull-down list with options
× 3)
Record (× –

Dispose (×× 3) • Default what’s not mentioned above


• Right click — repeat last action (place module)
• Auto-Connect, or manually connect via
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 9 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 10 of 68

Part B Create Module Part A Attributes Assign Module


• Name: Part B Arrive • Name: Assign Part A Sealer and Arrive Time
• Entity Type: Part B • Add button:
• Time Between Arrivals Type: Attribute
Type: Random (Expo) Attribute Name: Sealer Time
– Pull-down list with options New Value: TRIA(1, 3, 4)
Value: 30 • Add button:
Units: Minutes Type: Attribute
– Pull-down list with options Attribute Name: Arrive Time
• Entities per Arrival: 4 New Value: TNOW (to compute time in system on exit)
TNOW is internal Arena variable name for simulation clock; see
Help > Arena Help > Contents > Variables, Functions, and Distributions > Variables >
Date and Time Variables

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 11 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 12 of 68
Part B Attributes Assign Module Prep A Process Module
• Name: Assign Part B Sealer and Arrive Time • Name: Prep A Process
• Add button: • Action: Seize Delay Release
Type: Attribute • Resources subdialog (Add button):
Attribute Name: Sealer Time Type: Resource (a pull-down option) If several Resources
were named (Add
New Value: WEIB(2.5, 5.3) Resource Name: Prep A button), entity would
have to Seize them all
• Add button: Quantity: 1 (default) before Delay could start.

Type: Attribute • Delay Type: Triangular


Attribute Name: Arrive Time • Units: Minutes
New Value: TNOW • Minimum: 1
Names for things in Arena
– Default names usually suggested
• Value (Most Likely): 4
– Names placed on appropriate pull-down lists for future reference
– All names in a model must be unique (even across different kinds of objects)
• Maximum: 8
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 13 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 14 of 68

Prep B Process Module Sealer Process Module


• Name: Prep B Process • Name: Sealer Process
• Action: Seize Delay Release • Action: Seize Delay Release
• Resources subdialog (Add button): • Resources subdialog (Add button):
Type: Resource (a pull-down option) Type: Resource (a pull-down option)
Resource Name: Prep B Resource Name: Sealer
Quantity: 1 (default) Quantity: 1 (default)
• Delay Type: Triangular • Delay Type: Expression
• Units: Minutes • Units: Minutes
• Minimum: 3
• Expression: Sealer Time
Recall – Sealer Time attribute
was defined upstream for both
• Value (Most Likely): 5 Parts A and B … now its value is
being used … allows for different
• Maximum: 10 distributions for A and B.

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 15 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 16 of 68
Sealer Inspection-Result Decide Module Rework Process Module
• Decide module provides branch points • Name: Rework Process
By Condition (entity Attributes, global Variables) • Action: Seize Delay Release
By Chance (multi-sided, possibly-biased hypercoin flip) • Resources subdialog (Add button):
• Name: Failed Sealer Inspection Type: Resource (a pull-down option)
• Type: 2-way by Chance (default) Resource Name: Rework
• Percent True: 9 Quantity: 1 (default)
• Different exit points for True, False results – • Delay Type: Expression
connect appropriately downstream • Units: Minutes
− Note it’s percent true, not probability of true … so “9” means probability of 0.09 • Expression: EXPO(45) Had to use general Expression choice for
− We arbitrarily decided “true” meant part failed inspection … could have reversed (but would Delay Type since what we want (EXPO) is
change numerical results ... why? ... does this upset you? ... why?) not directly on Delay Type pull-down list.
− This is a rich, deep, versatile module … explore its Help button

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 17 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 18 of 68

Rework Inspection-Result Decide


Record Modules
Module
• Name: Failed Rework Inspection • Arena collects and reports many output statistics
• Type: 2-way by Chance (default) by default, but sometimes not all you want
• Percent True: 20 • Want time in system (avg, max) of parts sorted by
We arbitrarily decided “true” their exit point (Shipped, Salvaged, Scrapped)
meant part failed inspection
It’s this sorting that Arena doesn’t do by default ... it would
automatically sort by Entity Type if we had Entities checked
in Run > Setup > Project Parameters (which we don’t)
• Record module can be placed in flowchart to
collect and report various kinds of statistics from
within model run as entities pass through it
• For Tally-type output performance measures

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 19 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 20 of 68
Shipped Parts Record Module Dispose Modules
• Name: Record Shipped Parts • Three separate exit points for three separate part
• Type: Time Interval disposition (Shipped, Salvaged, Scrapped)
Records time elapsed up to now (TNOW) from when an • Could have directed all three exit types to a
entity attribute was marked with a time “stamp” upstream ...
Attribute Name is below ... single Dispose module
There are several other options for Type … explore via Separate ones gets animation counts of three dispositions
Record module’s Help button! Separate Dispose modules allows for differentially checking
• Attribute Name: Arrive Time boxes to Record Entity Statistics
Was defined upstream as clock value in Assign modules – Produces flow statistics separated by entity type (if Entities
Statistics Collection is checked in Run > Setup > Project
instantly after each entity was Created
Parameters), not by final disposition of part … so we did need our
• Tally Name: Record Shipped Parts Record modules and Arrive Time attribute
Determines label in reports Other two Record modules –
just like this except for Name
and Tally Name.
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 21 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 22 of 68

Run > Setup for Run Control Different Part A, B Entity Pictures
• Without this, model would run forever – no • Entity data module (just single-click on it in
defaults for termination rule Project Bar, edit via spreadsheet only)
That’s part of modeling, and generally affects results!
• Row for each Entity Type (Part A, Part B)
• Project Parameters tab:
Fill in Project Title, Analyst Name
• Pull down Initial Picture pull-down menu, select
Defaults for Statistics Collection, but we cleared check box
different pictures for each Entity Type
for Entities Edit > Entity Pictures to see, change list of pictures that’s
– Not needed for what we want (we installed our own Record presented here … more later
modules), and would slow execution
• Replication Parameters tab:
Replication length: 32, accept Hours default for Time Units
Base Time Units: Minutes for inputs without Time Units
option, internal arithmetic, and units on output reports
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 23 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 24 of 68
Running Model Viewing Results
• Check (if desired) • Counters during animation for modules
Find button to help find errors Create, Dispose, Decide – incremented when entity leaves
• Go (will automatically pre-Check if needed) Process – number of entities currently in module
Some graphics don’t show during run … will return when • Asked at end if you want to see reports
you End your run … control via View > Layers What you get depends on Run > Setup > Project Parameters
Status Bar shows run progress – replication number, – Looks like Rework area is bottleneck ... more later
simulation time, simulation status
Navigate through report with browsing arrows, tree at left
• Animation speed Tally, Time-Persistent, and Counter statistics
Slider bar at top, or increase (> key), decrease (< key) Avg, Min, Max, and 95% Confidence Interval half-widths
• Pause ( ) or Esc key; to resume – Confidence intervals are for steady-state expectations … Chapter 7
• Run > Step ( ) to debug – May not be produced if run is not long enough for reliable stats
• Run > Fast-Forward ( ) to turn off animation • Generally difficult/unreliable to draw conclusions
Run > Run Control > Batch Run (No Animation) is fastest from just one run … more later
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 25 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 26 of 68

Model 4-2: Enhanced Electronic


Run Conditions
Assembly and Test System
• Original model shown to production manager • Redefine a “day” to be 16 hours – Run > Setup >
Pointed out that this is only first shift of a two-shift day — on Replication Parameters
second shift there are two operators at Rework (bottleneck
station) … 16-hour days
• Change Replication Length to 10 (of these) days
Pointed out that Sealer fails sometimes
– Uptimes ~ expo (2) hours
– Repair times ~ expo (4) min.
Wants to buy racks to hold rework queue
– A rack holds 10 parts
– How many racks should be bought?
Run for 10 days (16-hour days)
• Need: Resource Schedules, Resource States,
Resource Failures
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 27 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 28 of 68
Schedules Schedules (cont’d.)
• Vary Capacity (no. units) of a resource over time • Define actual Schedule that Resource will follow
• In Resource Data module (spreadsheet view) – Schedule data module
For Rework Resource, change Type from Fixed Row already there since we defined Rework Schedule
Capacity to Based on Schedule Format Type is Duration for entries based on elapsed time
past simulation start time
Two new columns – Schedule Name and Schedule Rule
Type is Capacity, for Resource schedule (more later on
Type in a Schedule Name (Rework Schedule)
Arrival Type)
Select a Schedule Rule – details of capacity decrease if Click in Durations column, get Graphical Schedule Editor
Resource is allocated to an entity – X-axis is time, Y-axis is Resource Capacity
– Wait – Capacity decrease waits until entity releases Resource, and – Click and drag to define graph
“break” will be full but maybe start/end late
– Options button to control axis scaling, time slots in editor, whether
– Ignore – Capacity goes down immediately for stat collection, but schedule loops or stays at a final level forever
work goes on until finished … “break” could be shorter or gone – Can use Graphical Schedule Editor only if time durations are
– Preempt – Processing is interrupted, resumed at end of “break” integers, with no Variables or Expressions involved
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 29 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 30 of 68

Schedules (cont’d.) Resource Failures


Alternatively, right-click in row, select Edit via Dialog • Usually for unplanned, random downtimes
– Enter schedule Name
– Enter pairs for Capacity, Duration … as many pairs as needed
• Can start definition in Resource or Failure module
If all durations are specified, schedule repeats forever (Advanced Process panel) … we’ll start in Failure
If any duration is empty, it defaults to infinity • Attach Advanced Process panel if needed, single-
– Can involve Variables, Expressions
click on Failure, get spreadsheet view
Another alternative – right-click in row, select Edit via
Spreadsheet • To create new Failure, double-click – add new row
– Enter capacity Value, Duration pairs • Name the Failure
• Type – Time-based, Count-based (we’ll do Time)
• Specify Up Time, Down Time, with Units for both

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 31 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 32 of 68
Resource Failures (cont’d.) Frequencies
• Attach this Failure to correct Resource • Record time-persistent occurrence frequency of
Resource module, Failures column, Sealer row – click variable, expression, or resource state
Get pop-up Failures window, pick Failure Name Sealer Use here to record % of time rework queue is of length 0,
Failure from pull-down list (0, 10], (10, 20], … for info on number of racks needed
Choose Failure Rule from Wait, Ignore, Preempt (as in • Statistic data module (Advanced Process panel)
Schedules)
Five Types of statistics, of which Frequencies is one
• Can have multiple Failures (separate names) Specify Name (Rework Queue Stats),
acting on a resource Frequency Type (Value)
• Can re-use defined Failures for multiple Specify Expression to track and categorize
Resources (operate independently if they involve – Right-click in field to get to Expression Builder

random variables) Report Label (Rework Queue Stats)


Pop-up secondary spreadsheet for Categories (browse file)
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 33 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 34 of 68

Frequencies (cont’d.) Results of Model 4-2


• Add another Frequency (in Statistic module) to • Differ from those of Model 4-1 since this is a
give a finer description of Sealer states longer run, modeling assumptions are different
Produces statistics on proportion of time Sealer is in each All of which causes underlying random-number stream to
be used differently (Chapter 12)
of its three possible states – Busy, Idle, and Failed
• Frequencies are not part of default Category
• Prep A/B didn’t change (other than run length and
random variation) … need statistical analysis of
Overview report simulation output (Chapters 6, 7, 12)
Open Frequencies report from Project Bar (get separate
window)
• Sealer is more congested (it now fails)
• Rework is less congested (50% higher staffing)
• Frequencies report suggests one rack suffices
about 95% of the time, two racks all the time
Standard vs. Restricted Percents – see text

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 35 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 36 of 68
Utilizations – Fine Points Model 4-3: Enhancing the Animation
• Two utilizations reported for each Resource • Get “Spartan” generic default animation for some
Instantaneous Utilization is time-average of ratio of number things (queues, connector-animation movement)
of units that are busy to number of units that are scheduled
– By definition, counts periods when zero units are scheduled as Usually sufficient for verification, validation
zero-utilization periods
• Often want to customize, enhance it a bit
Scheduled Utilization is average number busy divided by
average number available More realism, impact
– No division-by-zero problem, assuming there were ever any units of
Resource scheduled at all (if not, it shouldn’t be in model)
• Pull animation away from logic in model window
Useful for big models, complex animation
• Identical for fixed-capacity Resource
Named Views for model logic, animation, or close-ups
• Can differ for Resources on a variable Schedule
If Resource capacity varies among several different positive • Default animation objects are connected to model
values, it’s better to use Scheduled Utilization logic and move with the module
More issues, even finer points – see text Identifiers, physical location (Shift-drag to decouple)
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 37 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 38 of 68

Changing Animation Queues Changing Entity Pictures


• Lengthen (click, drag, maybe hold shift) to “hold” • Earlier – used Entity data module to assign
more entities different Initial Pictures to different Entity Types
Simulation logic, results OK if animated queue overflows • Can customize list, alter pictures in it
• Rotate to re-orient for realism Edit > Entity Pictures
• Change “form” of queue from Line (default) to Left column – names, pictures currently on list
Point — fixed places for entities Right column –picture libraries (.plb filename extension)
Double-click on queue Add a hand-drawn picture – Add button on left, name it in
Select Type to be Point Value field at top, double-click on blank depressed button,
Click Points… button then artwork (or paste in a copied graphics image)
Successively click Add for points, then OK – New name won’t appear in Entity data module until you type it there
Drag them around on screen Edit an existing picture – double-click, artwork
Check Rotate box to show entities turning Copy a picture over from picture library
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 39 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 40 of 68
Adding Resource Pictures Adding Variables and Plots
• Animate a Resource – Resource button in • Variable animation – just show a value of
animate toolbar – get Resource Picture something as a number, watch it change
Placement window
• Left column – default pictures for different Variable object from Animate toolbar
Resource states Double-click, specify Expression to be shown (Expression
Attach logically to a Resource by Identifier pull-down list Builder), and cosmetics
Double-click to edit artwork by hand, or paste in previously Resize, reposition later
copied graphics images
Seize area – where seizing entity will “reside” • Dynamic animated plots – Chapter 3
Multiple seize areas for multi-capacity Resources • Other animation objects from Animate toolbar
• Right column – picture libraries (.plb files) – can Clock (TNOW), variety of formats
copy over to selected (depressed) state pictures Level (thermometer) animation
• Accept window, cross hairs, click to place Others discussed later
Resize, reposition later
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 41 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 42 of 68

Model 4-4: Electronic Assembly and


New Arena Constructs
Test System with Part Transfers
• Generalize Model 4-3 • Station – location where some process occurs
• All part transfers now take 2 minutes (not instant) Arrivals, manufacturing cells, departures
Model, animate this Each Station given a unique name
Materially changes model logic, results Can serve as an entry point for a section of model logic
Two-minute transfer times for: Station marker represents a logical station in
– Arriving parts to prep areas flowchart/animation
– Departing parts to appropriate exit • Station Transfer – entities move between Stations
– All internal part transfers without direct connection
Transfers take two minutes regardless of distance Several different types – we’ll use Routes here, which allow
– Fix this (unrealistic) assumption in Chapter 8 for positive transfer time, but no other delays like “room” on
transitway or transporters
Route paths represent Routes in flowchart/animation
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 43 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 44 of 68
Adding Route Logic – From Arrival Adding Remaining Route Logic
• Stations and Station Transfers affect both model • Add Station modules for entry to each Prep area
logic and animation Station names are Prep A Station, Prep B Station,
and are destination stations for Routes after arrivals
• Start with Model 4-3 … change to Model 4-4 • Process modules for Prep A, Prep B unchanged
• For incoming parts (A and B) delete connection • After prep, entities connected to Route module to
from Assign modules to “Prep” Process modules send to next station (sealer)
Don’t need a separate Station module for outgoing side
Replace with Station/Route module pairs
– Station module (Advanced Transfer panel) – define entity’s location • Similar changes for rest of model
Module Name vs. Station Name Station modules for incoming parts into sealer, rework,
– Route module (Advanced Transfer panel) – send entity out each of three Record modules (entity exit points)
Route Time, Destination Station Route modules for outgoing parts out of sealer inspection,
No direct connections exiting from Route modules – Route rework inspection (two for each Decide module – pass/fail)
module’s Destination Station Name defines that • Could run model now, get correct results … but
no animation of transfers …
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 45 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 46 of 68

Why Not Just Add Delays? Altering Animation – Stations


• Simpler way to get two-minute transfer times: • Add animation for Stations and Routes
Insert a Process module with Action = Delay for 2 minutes • Station button , Animate Transfer toolbar
on each relevant connection Attach Identifier to it from pull-down list of station names
Or, use Delay module from Advanced Process panel Get cross hairs, place (click) marker in animation
• This would work from modeling, numerical-output Can place several station markers for same logical station
viewpoints (e.g., to represent incoming, outgoing sides)
• But would not allow animation of part transfers, Can drag station markers around later
so we’ll proceed with Stations and Routes

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 47 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 48 of 68
Altering Animation – Routes Altering Animation – Entity Pictures
• Route button from Animate Transfer toolbar • Part B arrivals are in batches of four parts/batch
Options for appearance of entities as they travel route But constant travel time to Prep B implies they travel “on
Get cross hairs; click in origin, destination Station Markers top of each other” so it looks like just one part B
– Intermediate clicks for corners along route Try – change Route time from 2 to EXPO(2), see
Can drag around endpoints, corners later separation along route
Alternatively, use Route animation to create both Station • Create a dishonest illusion to animate batch
markers and Route animation Assign module just after Part B Arrive
– Click for beginning Station marker Add assignment of Entity Picture to Picture.Batch B
– Intermediate clicks for route corners
Edit > Entity Pictures to draw new picture
– Double-click for ending Station marker
– Copy Picture.Part B and rename it Picture.Batch B
– Then go back and double-click on the two Station markers to define
their logical Identifiers – Double-click on picture, use Picture Editor to get four circles
When batch arrives to Prep B, change to single circle
– Add Assign module after Prep B Arrival Station
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 49 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 50 of 68

Finding and Fixing Model Errors Finding and Fixing Model Errors (cont’d.)
• If error prevents model from running, Arena will • Module Break – stop when entity reaches module
try to detect and lead you to it in Check or Run • Debug Bar
Undefined (or inconsistently spelled) Variables, Attributes, View > Debug Bar
Resources
Breakpoints, Calendar, Active Entity, Watch
Unconnected modules
Run Controller
Duplicate names
Examples – see text
Examples – see text
• Highlight Active Module – selects active module
during run animation
• View > Layers while running – change what
shows during run animation

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 51 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 52 of 68
Input Analysis: Specifying Model
Deterministic vs. Random Inputs
Parameters, Distributions
• Structural modeling: what we’ve done so far • Deterministic: nonrandom, fixed values
Logical aspects – entities, resources, paths, etc. Number of units of a resource
• Quantitative modeling Entity transfer time (?)
Numerical, distributional specifications Interarrival, processing times (?)
Like structural modeling, need to observe system’s • Random (a.k.a. stochastic): model as a
operation, take data if possible distribution, “draw” or “generate” values from to
drive simulation
Transfer, Interarrival, Processing times
What distribution? What distributional parameters?
Causes simulation output to be random, too
• Don’t just assume randomness away – validity
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 53 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 54 of 68

Using Data:
Collecting Data
Alternatives and Issues
• Generally hard, expensive, frustrating, boring • Use data “directly” in simulation
System might not exist Read actual observed values to drive model inputs
(interarrivals, service times, part types, …)
Data available on wrong things – might have to change – Arena ReadWrite module ... see Model 10-2
model according to what’s available All values will be “legal” and realistic
Incomplete, “dirty” data But can never go outside your observed data
Too much data (!) May not have enough data for long or many runs
• Sensitivity of outputs to uncertainty in inputs Computationally slow (reading disk files)

• Match model detail to quality of data


• Or, fit probability distribution to data
“Draw” or “generate” synthetic observations from this
• Cost – should be budgeted in project distribution to drive model inputs
• Capture variability in data – model validity We’ve done it this way so far
Can go beyond observed data (good and bad)
• Garbage In, Garbage Out (GIGO) May not get a good “fit” to data – validity?
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 55 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 56 of 68
Fitting Distributions to Data Fitting Distributions to Data
with Arena Input Analyzer with Arena Input Analyzer (cont’d.)
• Assume: • Fitting = deciding on distribution form
Have sample data: Independent and Identically Distributed (exponential, gamma, empirical, etc.) and
(IID) list of observed values from actual physical system estimating its parameters
Want to select or fit a probability distribution for use in Several different methods (Maximum likelihood, moment
generating inputs for simulation model matching, least squares, …)
• Arena Input Analyzer Assess goodness of fit via hypothesis tests
Separate application, also via Tools menu in Arena – H0: fitted distribution adequately represents data
– Get p value for test (small = poor fit)
Fits distributions, gives valid Arena expression for
generation to paste directly into simulation model • Fitted “theoretical” vs. empirical distribution
• Continuous vs. discrete data, distribution
• “Best” fit from among several distributions

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 57 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 58 of 68

Data Files for Arena Input Analyzer Fit Menu


• Create data file • Fits distributions, does goodness-of-fit tests
Editor, word processor, spreadsheet, ... • Fit a specific distribution form
Plain ASCII text – save as text or export) Plots density over histogram for visual “test”
Values separated by white space – blanks, tabs, linefeeds Gives exact expression to Copy and Paste (Ctrl+C, Ctrl+V)
Otherwise free format over into simulation model
• Open data file from within Input Analyzer May include “offset” depending on distribution
File > New or Gives results of goodness-of-fit tests
File > Data File > Use Existing or – Chi square, Kolmogorov-Smirnov tests
Get histogram, basic summary of data – Most important part: p-value, always between 0 and 1:
Probability of getting a data set that’s more inconsistent with fitted distribution than
To see data file: Window > Input Data data set you actually have, if fitted distribution is truly “the truth”
• Generate “fake” data file to play around “Small” p (< 0.05 or so): poor fit (try again or give up)

File > Data File > Generate New


Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 59 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 60 of 68
Fit Menu (cont’d.) Fit Menu (cont’d.)
• Fit all of Arena’s (theoretical) distributions at • “Fit” Empirical distribution (continuous or
once discrete): Fit > Empirical
Fit > Fit All or Used when “theoretical” distributions fit poorly, or used
Returns minimum square-error distribution intentionally
– Square error = sum of squared discrepancies between histogram Can interpret results as Discrete or Continuous distribution
frequencies and fitted-distribution frequencies – Discrete: get pairs (Cumulative Probability, Value)
– Can depend on histogram intervals chosen: different intervals can – Continuous: Arena will linearly interpolate within data range
lead to different “best” distribution according to these pairs (so you can never generate values outside
Could still be a poor fit, though (check p value) range, which might be good or bad)
– Edit > Copy Expression to paste the (sometimes-lengthy)
To see all distributions, ranked: Window > Fit All Summary
expression to Windows clipboard, then paste this copied expression
or into destination field in Arena model
• Need to edit end of expression slightly by adding an extra pair at the end still
inside the parentheses, “, 1.000, xmax” where xmax is the largest value
you ever want to generate
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 61 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 62 of 68

Issues in Fitting Input Distributions No Data?


• Not an exact science – no “right” answer • Happens more often than you’d like
• Consider theoretical vs. empirical • No good solution; some (bad) options:
• Consider range of distribution Interview “experts”
Infinite both ways (e.g., normal) – Min, Max: Uniform
Positive (e.g., exponential, gamma) – Avg., % error or absolute error: Uniform
Bounded (e.g., beta, uniform) – Min, Mode, Max: Triangular
Mode can be different from Mean – allows asymmetry
• Consider ease of parameter manipulation to
Interarrivals – independent, stationary
affect means, variances
– Exponential – still need some value for mean
• Simulation model sensitivity analysis Number of “random” events in an interval: Poisson
• Outliers, multimodal data Sum of independent “pieces”: normal (heed left tail ...)
Maybe split data set (details in text)
Product of independent “pieces”: lognormal

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 63 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 64 of 68
Cautions on Using Normal Distributions Nonstationary Arrival Processes
• Probably most familiar distribution – normal “bell • Events (often arrivals), rate varies over time
curve” used widely in statistical inference Lunchtime at fast-food restaurants
• But it has infinite tails in both directions … in Rush-hour traffic in cities
particular, has an infinite left tail so can always Telephone call centers
(theoretically) generate negative values
Seasonal demands for a manufactured product
Many simulation input quantities (e.g., time durations) must
be positive to make sense – Arena truncates negatives to 0 • It can be critical to model nonstationarity for
• If mean µ is big relative to standard deviation σ, model validity
then P(negative) value is small … one in a million Ignoring peaks, valleys can mask important behavior
But in simulation, one in a million can happen Can miss rush hours, etc.
See text, Model 4-5 • Good model: Nonstationary Poisson process
• Moral – avoid normal as input distribution

Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 65 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 66 of 68

Nonstationary Arrival Processes (cont’d.) Multivariate and Correlated Input Data


• Two issues: • Usually assume all generated random
How to specify/estimate rate function observations in a simulation are independent
How to generate from it properly during simulation (though from possibly different distributions)
• Several ways to estimate rate function – we’ll just • Sometimes not true:
do piecewise-constant A “difficult” part requires long processing in both Prep and
Divide time frame of simulation into subintervals of time Sealer operations
over which you think rate is fairly flat This is positive correlation
Compute observed rate within each subinterval • Ignoring such relations can invalidate model
In Arena, must convert to expected number of arrivals per • See text for ideas, references
hour on subintervals that need not be of one-hour length
– Want expected 45 arrivals in a half hour; specify rate = 90 per hour
• Example: Model 5-2 in Chapter 5
Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 67 of 68 Simulation with Arena, 6th ed. Chapter 4 – Modeling Basic Operations and Inputs Slide 68 of 68
What We’ll Do ...
Modeling
Detailed • Model 5-1: Simple call center
Lower-level modeling, Advanced Process panel
Operations Three-way decisions, Variables, Expressions, Storages
Blocks panel
Terminating vs. steady-state operation
Chapter 5 Logical (“fake”) entities
Terminating Condition in Run > Setup
• Model 5-2: Enhanced call center
Nonstationary Poisson arrival process
Sets – Resource, Counter
New Statistic data module Types
Last revision December 22, 2013
– Counter, Time Persistent
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 1 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 2 of 51

Model 5-1: Simple Call Center


What We’ll Do ... (cont’d.)
Setup
• Model 5-3: Enhanced call center with more • One phone number for customers to call in to
output performance measures 26 trunk lines, one needed for each call (incoming or
New Statistic data module Type outgoing, either talking or on hold)
– Output Arriving call finding no free trunk lines gets busy signal,
Additional variable resources – look at staffing levels goes away
– Count number of such rejected calls
• Model 5-4: (s, S) inventory
Not queueing • Calls arrive with interarrivals ~ EXPO (0.857) min.
Choose to use low-level Blocks, Elements panels (SIMAN) First call arrives at time 0
– Can be done with higher-level panels • Three incoming call types
Initial recording to decide ~ UNIF (0.1, 0.6) min.
Tech support (76%, i.e., 0.76 probability independently for
each call), sales (16%), order status (8%)
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 3 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 4 of 51
Model 5-1: Simple Call Center Model 5-1: Simple Call Center
Setup (cont’d.) Setup (cont’d.)
• Tech-support calls • Order-status calls
For product type 1 (25%), 2 (34%), or 3 (41%) All the same
– Recording/select time ~ UNIF (0.1, 0.5)
Needs qualified tech-support person Handled automatically by phone system
– Two for type 1, three for type 2, three for type 3 – No limit on number in process at a time, except for trunk-line limit
No crossover to another type ... will allow this in Model 5-2 “Conversation” time ~ TRIA (2, 3, 4)
– Separate FIFO queues for each type
– Conversation time ~ TRIA (3, 6, 18) min. for all types After “conversation,” 15% of callers opt to talk to a person
Then leaves system – Routed to sales staff, conversation lasts an additional TRIA (2, 3, 4)
• Sales calls – Sales calls have higher priority (non-preemptive)
All the same • Center receives calls 8am – 6pm
Four sales staff, all the same Must terminate arrival process at 6pm
– One FIFO queue feeding all sales staff
Operate past 6pm if necessary to “flush out” all calls
Conversation time ~ TRIA (4, 15, 45)
Then leaves system
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 5 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 6 of 51

Model 5-1: Simple Call Center Model 5-1: Simple Call Center
Setup (cont’d.) Modeling Panels
• Output performance measures • Basic Process
Number of calls attempted, rejected, completed Highest, fastest modeling level, usually the place to start
By call type – total time in system • Advanced Process
By resource – time on hold, number of calls on hold Smaller building elements, other functions, more detail
Resource utilization – of personnel, trunk lines • Advanced Transfer
• Terminating or steady-state Entity movement, material handling
Time frame of interest for each replication • Blocks, Elements
– Terminating – specific starting, stopping conditions (this model) Lowest modeling level, SIMAN simulation language
Stopping conditions could be of several forms – fixed time, count, condition (here) Repeats some capabilities of higher-level panels
– Steady-state – output performance measures are a limit as Some functions available only here
simulated time → ∞
– Choice usually depends on intent of study, not on model logic
• Other special-purpose panels
License-dependent
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 7 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 8 of 51
Model 5-1: Simple Call Center Model 5-1: Simple Call Center
Data Structure Arrivals, Direct to Service
• Re-use data in several places • Create attempted calls
Define once, global to whole model Entity type Incoming Call, change later
Redefine once – modeling generality, user efficiency Max Arrivals = MaxCalls, Variable initialized to 999999
At 6pm (time 600 minutes) change this to 1 to stop arrivals ... later
• Arena (global) Variables –
Entities per Arrival = CallsPerArrival, Variable
Store numbers (not formulas) initialized to 1
Define, initialize in Variable data module (Basic Process) – At 6pm (time 600 minutes) change this to 0 to kill arrivals ... later
Can change during run (Assign module, other ways) • Entity data module
Scalar, 1-d array (vector), 2-d array (matrix) Incoming Call Entity Type already there
• Arena (global) Expressions For Initial Picture, select Picture.Black Ball
Store formulas (as well as numbers, but can’t change) • Record module for an attempted call
– Use math ops, numbers, random variates, Attributes, Variables, ... Add 1 to Counter Name Attempted Calls
Define in Expression data module (Advanced Process) Results – Category Overview report, User Specified
Scalar, 1-d array (vector), 2-d array (matrix) More detailed description – mouse over modules, read Data Tips that pop up
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 9 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 10 of 51

Model 5-1: Simple Call Center Model 5-1: Simple Call Center
Arrivals, Direct to Service (cont’d.) Arrivals, Direct to Service (cont’d.)
• Decide module – Trunk Line Available? • Decide module – Determine Call Type
Type = 2-way by Condition Alternate strategy –
Queue module from
Three-sided coin flip – Type = N-way by Chance
– Select (logical) Expression for “If”
NR() is number of units of that resource that are busy now Blocks panel ... – Add button for more sides of coin
details in text
MR() is number of units of that resource that exist now – Get new exit point for each Add, plus one for Else
False – Record rejected call counter, Dispose – Note that probabilities are entered as percentages (0-100, not 0-1)
True:
– Last entry is “else”
– Seize a unit of Trunk Line Resource – Release later
Resources data module for Trunk Line and other Resource levels • Direct call to one of tech support, sales, or order-
– Increment Variable Total WIP for number of active calls
Used in stopping rule at or after 6pm to sense if system is empty
status areas
– Store module to animate entity during next Delay module Backed each area with colored box
Alternative way to organize – Submodels
Add Storage animation separately, identify with this logical storage by name
Storage data module – entry made there by Store module
– Delay module to listen to initial recording, make selection
Could have used Process module, but this is simpler, faster
– Unstore module to make entity animation disappear
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 11 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 12 of 51
Model 5-1: Simple Call Center Model 5-1: Simple Call Center
Tech-Support Calls Sales Calls
• Assign module • Assign module – change Entity Type, Picture
Change Entity Type for separating out in results • Process module
Change Entity Picture for animation
Seize-Delay-Release
• Store – Delay – Unstore for recording, product
type selection Seize a unit of Sales Resource
• Decide module for product type • Sales calls priority over order-status calls that
Different three-sided coin flip seek a person?
Direct to appropriate Process module for that product type Queue data module, Process Sales Call.Queue
• Process modules for tech-support service – Type = Lowest Attribute Value Not the only
Attribute Name = Sales Call Priority way to do this
Seize-Delay-Release Undefined for sales calls, so has value 0 ... will set to 1 for order-status calls that
Seize a unit from appropriate multi-unit Resource seek a person, putting sales calls ahead in the queue
Use Tech Time defined in Expression data module – Shared queue (with order-status calls seeking a person)
• Proceed to system exit logic ... later • Proceed to system-exit logic
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 13 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 14 of 51

Model 5-1: Simple Call Center Model 5-1: Simple Call Center
Order-Status Calls System Exit
• Assign module – change Entity Type, Picture • All calls of all types come here when finished
• Delay block (Blocks panel) for robo-chat • Release module – release the unit of Trunk Line
Includes Store/Unstore logic – alternative to earlier method
– No automatic entry in Storage data module, so must enter manually
resource seized upstream
• Decide module • Assign module – decrement Total WIP variable
No sales person required – go directly to system-exit logic • Record module – increment Completed Calls
Sales person required: counter
– Assign module – set Sales Call Priority Attribute to 1 so
these will have lower priority than real sales calls • Dispose of call
– Seize module for a unit of Sales resource
Define Queue Name = Process Sales Call.Queue – shared with sales calls
Process module does not allow for specifying a shared queue, so can’t use here
– Delay for conversation with sales person
– Release the unit of Sales resource
• Proceed to system-exit logic
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 15 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 16 of 51
Model 5-1: Simple Call Center Model 5-1: Simple Call Center
Arrival-Cutoff Logic Run > Setup
• Used to “choke off” arrival stream at 6pm • Replication Parameters tab (other tabs as usual)
• Create a single logical (or “fake”) entity at time • Base Time Units = Minutes
600 min. (6pm) • Replication Length = Infinite (the default)
Overkill on making sure just one is created
– Time Between Arrivals = 999999 min., Max Arrivals = 1 • Terminating Condition field:
• Assign module to set Variable MaxCalls to 1 TNOW >= 600.0 && Total WIP == 0
Recall use of MaxCalls for Max Arrivals in Create module Arena Greater than Logical Variable we Equality
for attempted calls Creative use of such clock or equal to 600 “and” maintained test for
Variable minutes, (6pm) in model zero
• Also in this Assign module, set “logical” (a.k.a. “fake”)
entities enhances modeling Base Time Units

CallsPerArrival to 0 flexibility, power, detail It’s 6pm or later and there are no calls in the system.
Since Create module will always schedule next arrival, and
Could have used NR(Trunk Line)
this makes the “size” of the next illegal arrival zero instead of Total WIP
• Dispose of this single logical entity
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 17 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 18 of 51

Model 5-1: Simple Call Center Model 5-1: Simple Call Center
Animation Animation (cont’d.)
• Place three Storage animations • Variable animations for WIP at tech calls, sales
Initial Recording Delay, Tech Call Recording Delay, Order For tech calls, Arena variable to animate is
Status Delay Process Product Type 1 Tech Call.WIP, etc. –
Select proper Identifier in each from pull-down list pull-down list
Graphic behaves like Queue animations For sales calls, must include order-status calls seeking a
real person:
• Four Queue animations
NR(Sales) + NQ(Process Sales Call.Queue)
Three tech-support call product types, sales
Came with four Process modules specifying Seize
• Plot number of trunk lines busy,
NR(Trunk Line)
• Resource animations for three tech-support
types, sales Resources • Labeling, background boxes as in model logic
Multi-unit Resource animations, as in Models 4-3, 4-4

Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 19 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 20 of 51
Model 5-1: Simple Call Center Model 5-2: Enhanced Call Center
Results (one replication ... sample of size only one!!) Changes
• Trunk-lines-busy plot • Incoming calls’ arrival rate varies over day
Starts, ends at 0 – startup, termination logic Probabilistic model – Nonstationary Poisson process
Capped at 26 during run – More in Section 12.3

• 734 attempted calls (User Specified section) Instead of a constant rate (= 1 / mean interarrival time),
specify a rate function
643 of them completed, the other 91 rejected
– Arena supports piecewise-constant rate function – “step” functions
• Sometimes see mixture of sales (green), order- Easy to specify, strong theoretical support In Arena, rates MUST be
entered in arrivals per
status (blue) entities in sales queue – Rate-function specification:
HOUR, regardless of
model’s Base Time Units or
• Other “usual” outputs Caution – it’s
easy to time intervals
generate this
Times in system – separated out by call type incorrectly ...
Queue lengths, times in queue – separated out by resource see text for
details
Resource utilizations – normalized to [0, 1] by capacity
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 21 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 22 of 51

Model 5-2: Enhanced Call Center Model 5-2: Enhanced Call Center
Changes (cont’d.) Changes (cont’d.)
• Sales-staff size varies over day • 4% of tech-support calls cannot be handled
Data in text, Schedule data module, Sales Schedule during the call, need offline back-office research
• Tech-support staff are partially cross-trained, Original call ends, same original talk-time distribution, gives
work complicated schedule: up its trunk line, but not counted (yet) as completed
Case sent to back office (outside model boundaries), takes
EXPO (60) minutes to resolve
– Offline research may be carried over night, completed on a later day
Will use Arena Answer goes back to same tech-support person who took
Sets concept to
implement this
original call, with higher priority than incoming calls, but still
cross training might have to queue for this person
This tech-support person requests a trunk line for outgoing
call, higher priority than incoming calls, but still might have
to queue, talks for TRIA (2 ,4 ,9) min., call is now completed
Track number of each product type after research is done
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 23 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 24 of 51
Model 5-2: Enhanced Call Center Model 5-2: Enhanced Call Center
Data Structure Data Structure (cont’d.)
• Resources, Schedules • Sets – collect same-type items together
Resource, Schedule data modules Set, Advanced Set data modules (Basic, Advanced
Trunk Line – fixed capacity at 26 Process panels, resp.)
– Refer to items in set by original name, or index (subscript) in set
Sales – on Schedule Sales Schedule
Resource set for each tech-support product type
11 individual tech-support people on individual schedules – Members are those tech-support resources qualified
– Caution – must fill out each schedule to all 22 half-hour periods, – Individual resources already defined – Resource data module
with leading/trailing 0’s if necessary ... use Edit via Dialog or
– Overlapping membership – some resources in multiple sets
Spreadsheet, not graphical schedule editor
– Sets are ordered – here, put most versatile tech-support people at
– Ignore option to avoid shifting back schedule over multiple days bottom, to “save” them for other calls ... Preferred Order in Seize
– Include costing data for people in Resource data module – Will Seize from a set in model
Define nonstationary arrival-rate function in Schedule Counter set – one for each hour
module – Arrival Schedule – Count number of rejected calls in each hour
– Enter trailing 0’s in Edit via Dialog or Spreadsheet, not graphical – Individual counters already defined – Statistic data module
schedule editor – Use results later to decide when to increase staffing
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 25 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 26 of 51

Model 5-2: Enhanced Call Center Model 5-2: Enhanced Call Center
Modifying the Model Modifying the Model (cont’d.)
• Call-arrivals, termination, Run > Setup • Tech-support calls
Create module Same through Determine Product Type Decide
– Type = Schedule, Schedule Name = Arrival Schedule
Add Assign modules for each product type thereafter
Delete the entire arrival-cutoff section from Model 5-1 – Entity Type to distinguish product type in reports
– Arrival Schedule cuts off arrivals at 6pm, via 0 rate – Entity Picture to distinguish product type in animation
Delete Total WIP variable used to terminate Model 5-1 – Attribute Tech Call Type (1, 2, or 3 by product type) for routing
– Use built-in NR(Trunk Line) instead in Terminating Condition Process modules, Resources subdialogs
– Delete Assign modules used to manage Total WIP
– Type = Set
Record module for rejected calls – Set Name = Product 1, etc.
– Index into Counter Set Rejected Calls with index – Selection Rule = Preferred Order, to select earlier entries in set first
AINT((TNOW/60) + 1) Recall – we put more versatile tech-support people lower in the set list
which is 1 for first hour, 2 for second hour, etc. (AINT truncates – Save Attribute = Tech Agent Index
decimals toward zero) Entity attribute, carried along, in case of back-office research to send back to this
same tech-support person for return call

Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 27 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 28 of 51
Model 5-2: Enhanced Call Center Model 5-2: Enhanced Call Center
Modifying the Model (cont’d.) Modifying the Model (cont’d.)
• Back office, returned tech-support calls – all new • Statistic data module
Entry via True branch (4%) in Decide module Ten Counter-type statistics, discussed earlier
Backoffice Research and Return Call?
Release this call’s trunk line – going offline now Four Time-Persistent statistics to track expressions
– Backoffice Research WIP to track total number of cases in
Delay (with storage) for EXPO (60) back-office research research, via NSTO(Backoffice Research Storage)
Increment Tech Return WIP(Tech Call Type) – Tech 1 Total Online WIP Stat, etc., to track number of that
– 1-dim. Variable array – defined in Variable data module product type in back office via Expression Tech 1 Total Online
– Tech Call Type is 1, 2, or 3, assigned in earlier Assign module WIP, etc., defined in Expression data module as
Decide module Product Type? based on Entity Type Process Product Type 1 Tech Call.WIP + Tech Return WIP(1), etc.
Seize the same tech-support person – higher priority
• No changes needed in sales-calls or order-status-
Then seize a trunk line (higher priority), make return call
calls section of Model 5-1
Then release this trunk line, tech-support person
Decrement Tech Return WIP(Tech Call Type)
Send entity to final Record, after trunk-line release there
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 29 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 30 of 51

Model 5-2: Enhanced Call Center Model 5-3: Overall Call-Center Stats
Modifying the Model (cont’d.) Setup
• Animation • Develop overall operational-cost measure
Delete Tech 1, Tech 2, and Tech 3 resource animations Two cost categories – staffing/resource, and poor service
Change variables in three tech-support WIP displays to • Develop overall measure of service, % of calls
track total number of tech-support calls of that type present
rejected
New back-office storage animation, variable animation for
number present • Add options for increased staffing, improvement
A new queue for each tech-support product type for return • Make 5 replications, focus on weekly costs
calls waiting for service IID replications, so will not carry over back-office research
Added a resource animation (from a .plb library) for each
individual tech-support person
– Grouped by product type, colors for capabilities
• Results
Most rejected calls in hours 5-8 ... increase staff then ... ?
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 31 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 32 of 51
Model 5-3: Overall Call-Center Stats Model 5-3: Overall Call-Center Stats
Staffing/Resource Costs Staffing/Resource Costs (cont’d.)
• Resource data module – hourly costs for people • Increase sales, tech-support staff noon-4pm
$20/hr. for each sales staffer Variable New Sales = number of new sales staff
$18/hr. – $20/hr. for each tech-support, depending on skill – $17/hr., 4 hrs./day, 5 days/week, so $340/week for each add’l. staff
– Schedule data module to add capacity – edit via dialog or
These salary costs paid when on duty, busy or idle
spreadsheet, not graphical editor
Summing, get $12,820/week (details in text) – Resource (Sales) already exists in Resource data module
View all this existing staff as fixed Variables New Tech 1, etc., and New Tech All for
number of new tech-support people qualified as named
– $16/hr. for each one-product staff, $18/hr. for each all-product staff
$320/week for each single-product staff, $360/week for each all-product staff
– New entries in Resource data module
Larry, Moe, Curly, Hermann for 1, 2, 3, All, resp.
– Schedule data module to add capacity – dialog or spreadsheet edit

Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 33 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 34 of 51

Model 5-3: Overall Call-Center Stats Model 5-3: Overall Call-Center Stats
Staffing/Resource Costs (cont’d.) Customer-Dissatisfaction Costs
• Maybe increase number of trunk lines beyond 26 • Incur cost for caller wait on hold, past a threshold
$98/week flat fee for each trunk line 3 min. for tech, 1 min. for sales, 2 min. for order-status
• Define Expression New Res Cost for all resource Beyond threshold, incur per-min. costs of
$0.368 for tech, $0.818 for sales, $0.346 for order-status
costs: – In practice, such costs are difficult to estimate
New Sales*340 Three new Assign modules (orange backing) accumulate
+ (New Tech 1 + New Tech 2 + New Tech 3)*320 “excess” (beyond threshold) wait times on hold
+ New Tech All*360 – Tech support (other two are similar): Variable
+ 98*MR(Trunk Line) Excess Tech Wait Time increased by
MAX(ENTITY.WAITTIME - 3, 0)
This does not depend on simulation results, only on setup ENTITY.WAITTIME is built-in Arena attribute holding all wait times (including in
queues) so far ... luckily, there were none before the preceding Process module
At end, multiply excess wait times by per-min. costs,
multiplied by 5 (to put on a weekly basis)
5 × $0.368 = $1.84 for tech, 5 × $0.818 = $4.09 for sales,
5 × $0.346 = $1.73 for order-status
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 35 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 36 of 51
Model 5-3: Overall Call-Center Stats Model 5-3: Overall Call-Center Stats
Overall Output Performance Measures Replication Conditions
• Statistic data module, Total Cost entry • Run > Setup > Replication Parameters,
Type = Output, computed only at end of replication Initialize Between Replications
New Res Cost Statistics? System? Details in text
+ Excess Sales Wait Time * 4.09
+ Excess Status Wait Time * 1.73 Default is both – only way to get truly IID replications
+ Excess Tech Wait Time * 1.84 – Destroys overnight tech-support research jobs, but to do otherwise
would complicate model – so accept
+ 12820
• Statistic data module, Percent Rejected entry • Run > Setup > Project Parameters
Counter Total Rejected Calls accumulated in new Turned off all but Costing Statistics Collection, for speed
Record module in call-arrival area (orange backing) – Costing required to get ENTITY.WAITTIME
– Already accumulating hour by hour, but this is total over the day
Type = Output
100 * NC(Total Rejected Calls) / NC(Attempted Calls)
– NC is Arena function that returns the value of that counter
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 37 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 38 of 51

Model 5-3: Overall Call-Center Stats Model 5-4: (s, S) Inventory Simulation
Results Setup
• Results from five replications • Different kind of model – not queueing
Base Case – no additional staff, still 26 trunk lines • Use Blocks and Elements panels exclusively –
Total Cost = $22,242.55 ± $1,439.47 Avg. over 5 replications SIMAN simulation language
95% Conf. int. half-widths
Percent Rejected = 11.96% ± 1.39% Mostly just to demonstrate this capability
Add 3 of each of five staff types, 3 more trunk lines Could be done with higher-level panels we’ve been using
Total Cost = $23,683.35 ± $616.00 Is this “better?” (Exercise 5-17)
Percent Rejected = 1.61% ± 1.52% • Company carries a single discrete item (widgets)
• Use in Chapt. 6 for statistically valid experiments in inventory
Statistical precision • I(t) = inventory level (an integer) at time t days
Compare several alternatives, select best past the beginning of the simulation; I(0) = 60
Search for configuration that minimizes cost, subject to
upper limit on percent rejected • Run simulation for 120 round-the-clock days
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 39 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 40 of 51
Model 5-4: (s, S) Inventory Simulation Model 5-4: (s, S) Inventory Simulation
Customer Demands Against Inventory Inventory Review, Replenishment
• Customer interarrival times ~ EXPO (0.1) day • “Take inventory” just past midnight each day
(round the clock) So at exactly times 0, 1, 2, ..., 119 (not 120 ... see below)
First arrival not at time 0 but after an interarrival time past 0
Two managerially-chosen constant integers s = 20 and
• Demand size is discrete random variable S = 40 (must have s < S if we change these values)
1, 2, 3, 4 with respective probabilities If I(t) ≥ s, do nothing until next inventory evaluation exactly
0.167, 0.333, 0.333, 0.167
24 hours later
• If enough items are physically on hand in If I(t) < s, order S – I(t) items from supplier (order “up to” S)
inventory to satisfy a demand, customer gets
demand and leaves Order does not arrive instantly from supplier, but after a
delivery lag (a.k.a. lead time) ~ UNIF(0.5, 1.0) day, so
• If demand > number of items on hand, customer sometime during the last half of the day of ordering
gets whatever is there and the rest of the demand – In the meantime, inventory level could fall further from additional
is backlogged (I(t) becomes negative) demands, so inventory level will not necessarily pop up to S when
If I(t) was already negative, it just goes more negative the order arrives, but to something less than S
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 41 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 42 of 51

Model 5-4: (s, S) Inventory Simulation Model 5-4: (s, S) Inventory Simulation
Cost Structure Cost Structure (cont’d.)
• Average ordering cost per day • During periods when I(t) = 0 there’s neither
When an order is placed, incur a fixed cost of $32, plus an holding nor shortage cost incurred
incremental cost of $3 per item ordered
If no order is placed at the beginning of a day, there’s no
• Overall performance measure
ordering cost, not even the fixed cost = Average total cost per day
At end of simulation, divide total of ordering costs by 120 = sum of average ordering, holding, and
• Average holding cost per day shortage costs per day
Whenever I(t) > 0, incur $1 per day per item on hand • Don’t evaluate inventory at time 120
Average holding cost = We might order and incur an ordering cost then, but order
will never arrive
• Average shortage cost per day
We’ll fudge this, but an Exercise asks you to do it right
Whenever I(t) < 0, incur $5 per day per item in backlog
Average shortage cost =
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 43 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 44 of 51
Model 5-4: (s, S) Inventory Simulation Model 5-4: (s, S) Inventory Simulation
Data Structure Data Structure (cont’d.)
• Use Blocks, Elements panels exclusively • Expressions element
Even for Variables, Expressions, Attributes, Entities,
statistics collection, and run control Define Interdemand Time, Demand Size, Evaluation
• Variables Element (initialized, or default to 0 Interval, Delivery Lag
initially) – Cumulative probabilities in DISC function for Demand Size
Inventory Level = I(t), changes during run, initialized
to 60
• Attributes, Entities elements
Little s = s = 20 Just to define these objects
Big S = S = 40 • Project, Replicate elements
Total Ordering Cost accumulator
Similar to Run > Setup
Setup Cost = 32
Incremental Cost = 3 • DStats element
Unit Holding Cost = 1 Request accumulation of integrals for total holding,
Unit Shortage Cost = 5 shortage costs
Days to Run = 119.9999 (The Fudge)
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 45 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 46 of 51

Model 5-4: (s, S) Inventory Simulation Model 5-4: (s, S) Inventory Simulation
Data Structure (cont’d.) Logic for Customer Demands
• Outputs element • Create block for arrival
Two entries, both of Data type “Output” so that they’re Entity Type is Customer
executed only at end of run, and reported Uses Interdemand Time Expression
Avg Ordering Cost computed First Creation after an Interdemand Time
Avg Total Cost added up • Assign block to decrement Inventory Level by
– OVALUE returns most recent value
a Demand Size
– DAVG returns time-persistent average
Demand Size was defined as an Expression
Backlogging naturally happens
• Dispose block for customer exit
If backlogged, is accounted for automatically in the (simple)
definition and tracking of Inventory Level

Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 47 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 48 of 51
Model 5-4: (s, S) Inventory Simulation Model 5-4: (s, S) Inventory Simulation
Inventory Evaluation Placing an Order
• Create block for Inventory Evaluator entities • If we exit the Branch block via the top “If” branch,
First Creation at time 0 – evaluate inventory at start of run it must be that I(t) < s so we want to order up to S
Interval is Evaluation Interval, defined as Expression • Assign block
• Branch block – somewhat like Decide module Define Order Quantity Attribute
To determine whether to place an order now – Could have made this a Variable in this model with these
Add “branches,” each evaluated as true or false parameters, but it’s more general for it to be an Attribute ... why?

Clone of incoming entity sent out along each “true” branch, Increment Total Ordering Cost Variable
but at most Max Number of Branches will be sent out • Delay block for Delivery Lag
– So we set Max Number of Branches to 1 (default is ∞)
• Assign block to increment Inventory Level by
First branch of type “If” – if “true” we want to order the Order Quantity
Second branch of type “Else” – if “true” it means that the
first branch was “false” so we don’t order – just Dispose • Dispose block
Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 49 of 51 Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 50 of 51

Model 5-4: (s, S) Inventory Simulation


Animation
• Plot separate “in the black” and “in the red”
curves
If in backlog, red curve will be plotted in negative direction
due to its Expression
• Pair of Level (“thermometer”) animations
Fill Direction for “in the red” is Down

Simulation with Arena, 6th ed. Chapter 5 – Modeling Detailed Operations Slide 51 of 51

You might also like