Simio and Simulation 6e
Simio and Simulation 6e
Simio and Simulation 6e
PDFelement
2
Remove Watermark Wondershare
PDFelement
Contents
Cover 8
Front Matter 9
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1 Introduction to Simulation 15
1.1 About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.2 Systems and Models . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.3 Randomness and the Simulation Process . . . . . . . . . . . . . . 21
1.4 When to Simulate (and When Not To) . . . . . . . . . . . . . . . 25
1.5 Simulation Success Skills . . . . . . . . . . . . . . . . . . . . . . . 27
3 Kinds of Simulation 57
3.1 Classifying Simulations . . . . . . . . . . . . . . . . . . . . . . . . 57
3.2 Static Stochastic Monte Carlo . . . . . . . . . . . . . . . . . . . . 62
3.3 Dynamic Simulation Without Special Software . . . . . . . . . . 77
3.4 Software Options for Dynamic Simulation . . . . . . . . . . . . . 90
3.5 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
4 First Model 99
4.1 The Basic Simio User Interface . . . . . . . . . . . . . . . . . . . 101
4.2 Model 4-1: First Project Using the Standard Library Objects . . 106
4.3 Model 4-2: First Model Using Processes . . . . . . . . . . . . . . 127
4.4 Model 4-3: Automated Teller Machine (ATM) . . . . . . . . . . . 132
3
Remove Watermark Wondershare
PDFelement
4 CONTENTS
CONTENTS 5
6 CONTENTS
7
Remove Watermark Wondershare
PDFelement
8 CONTENTS
Cover
Remove Watermark Wondershare
PDFelement
Front Matter
ISBN: 978-1-938207-03-7
Copyright (C) 2021 by Simio LLC. All rights reserved. Except as permitted
under the United States Copyright Act of 1976, no parts of this publication may
be reproduced or distributed in any form or by any means, or stored in a data
base retrieval system, without prior written permission of the publisher.
We welcome feedback and other contributions from instructors and students to
[email protected]. This textbook was written for Simio 14 or later.
• See Appendix Section C.3 for important information about obtaining Simio
software.
• See Appendix Section C.4.1 for obtaining the model and data files referenced
in the book.
Simio is a registered trademark of Simio LLC. Microsoft, Windows, Excel,
Word, PowerPoint, Visio, and Visual Studio are either trademarks or registered
trademarks of Microsoft Corporation. OptQuest is a registered trademark of
OptTek Systems, Inc. Stat::Fit is a registered trademark of Geer Mountain
Software Corporation. @RISK and StatTools are registered trademarks of
Palisade Corporation. Minitab is a registered trademark of Minitab, Inc. Flexsim
is a trademark of Flexsim software products. Arena is a trademark of Rockwell
Automation. ILOG is a trademark of IBM. APO-PP/DS is a trademark of SAP.
Wonderware is a trademark of Schneider Electric. All other trademarks and
registered trademarks are acknowledged as being the property of their respective
owners. The instructions in this book do not cover all the software aspects or
details of the Simio software. Consult the product documentation for the latest
and most complete descriptions.
Preface
This sixth edition explains how to use simulation to make better business decisions
in application domains from healthcare to mining, heavy manufacturing to supply
chains, and everything in between. It is written to help both technical and
non-technical users better understand the concepts and usefulness of simulation.
9
Remove Watermark Wondershare
PDFelement
10 CONTENTS
CONTENTS 11
12 CONTENTS
David began his career at Inland Steel Company as a plant industrial engi-
neer. During a time of industry consolidation, he built an innovative simu-
lation/scheduling group to improve company-wide effectiveness and efficiency.
This effort was so successful that it was expanded to also assist the steelmaker’s
suppliers and customers. He subsequently joined Systems Modeling as a devel-
opment lead for SIMAN and Arena products, then joined Rockwell Automation
as the Product Manager for Rockwell’s entire suite of simulation and emulation
products. He is an ardent promoter of simulation, having had speaking engage-
ments in over 40 countries across six continents. David is an active member of
the Institute of Industrial and Systems Engineers (IISE), APICS/ASCM, IN-
FORMS, and other professional groups. He is also a co-author of four simulation
textbooks, and volunteers with Junior Achievement (JA), BPeace, ShelterBox,
and local organizations
Acknowledgements
We extend a huge thank you to Dr. W. David Kelton who made significant con-
tributions as co-author to the first five editions of this book and to Dr. Alexander
Verbraeck, who was co-author of the first edition. Dr. C. Dennis Pegden provided
significant contributions to the scheduling chapter and on the topic of AI and
simulation. Many other people helped us get to this point. The Simio LLC
technical staff — Cory Crooks, Glenn Drake, Glen Wirth, Dave Takus, Renee
Thiesing, Katie Prochaska, and Christine Watson — were great in helping us
understand the features, find the best way to describe and illustrate them, and
even provided proofreading and help with the case studies. Jan Burket and Alex
Molnar helped us with proofreading. Eric Howard, Erica Hedderick, and Molly
Arthur of Simio LLC provided great support in helping get the word out and
working with early adopters. Chris Havelka helped with the conversion to online
format in the sixth edition. From Auburn University, Chris Bevelle and Josh
Kendrick worked on the new introductory case studies, James Christakos and
Yingde Li worked on material for the first edition, Ashkan Negahban provided
much support during his years as a PhD student, and Grant Romine and Samira
Shirzaei provided assistance with the fifth edition. While we appreciate the
participation of all of the early adopters, we’d like to give special thanks to Jim
Grayson, Gary Kochenberger, Deb Medeiros, Barry Nelson, Leonard Perry, and
Laurel Travis (and her students at Virginia Tech) for providing feedback to help
Remove Watermark Wondershare
PDFelement
CONTENTS 13
us improve.
Remove Watermark Wondershare
PDFelement
14 CONTENTS
Remove Watermark Wondershare
PDFelement
Chapter 1
Introduction to Simulation
Simulation has been in use for over 50 years, but it’s just moving into its prime.
Gartner (https://www.gartner.com) is a leading provider of technical research
and advice for business. In 2010, Gartner (Gartner, 2009) identified Advanced
Analytics, including simulation, as number two of the top ten strategic technolo-
gies. In 2012 (Robb, 2012) and 2013 (Gartner, 2012) Gartner reemphasized the
value of analytics and simulation:
Because analytics is the ‘combustion engine of business,’ organizations
invest in business intelligence even when times are tough. Gartner
predicts the next big phase for business intelligence will be a move
toward more simulation and extrapolation to provide more informed
decisions.
With the improvement of performance and costs, IT leaders can afford
to perform analytics and simulation for every action taken in the
business. The mobile client linked to cloud-based analytic engines
and big data repositories potentially enables use of optimization
and simulation everywhere and every time. This new step provides
simulation, prediction, optimization and other analytics, to empower
even more decision flexibility at the time and place of every business
process action.
Advancements in simulation-related hardware and software over the last decade
have been dramatic. Computers now provide processing power unheard of even a
few years ago. Improved user interfaces and product design have made software
significantly easier to use, lowering the expertise required to use simulation
effectively. Breakthroughs in object-oriented technology continue to improve
modeling flexibility and allow accurate modeling of highly complex systems.
Hardware, software, and publicly available symbols make it possible for even
novices to produce simulations with compelling 3D animation to support com-
munication between people of all backgrounds. These innovations and others are
15
Remove Watermark Wondershare
PDFelement
Decision Logic. It also introduces the Flow Library for flow processing, the
Extras Library for cranes, elevators and other devices, and the Shared Items
forum – a source for other valuable tools. This chapter ends by discussing
Experimentation and some of the options available to effectively execute many
replications and scenarios.
Chapter 11, Customizing and Extending Simio starts with some slightly more
advanced material — it builds on the prior experience using add-on processes to
provide guidance in building your own custom objects and libraries. It includes
examples of building objects hierarchically from base objects, and sub-classing
standard library objects. This chapter ends with an introduction to Simio’s
extendability through programming your own rules, components, and add-ons
to Simio.
In Chapter 12, Simulation-based Scheduling in Industry 4.0 we discuss the basic
concepts of Industry 4.0 and and explore the use of simulation as a planning
and scheduling tool. While simulation-based planning and scheduling has been
discussed and used for many years, recent advances in simulation software tools
have made these applications significantly easier to implement and use. In this
chapter we also discuss the use of simulation models as digital twins as part of
Industry 4.0 implementations. We conclude this chapter with a description of
Simio’s Risk-based Planning and Scheduling (RPS) technology.
Appendix A, Case Studies Using Simio includes four introductory and two
advanced case studies involving the development and use of Simio models to
analyze systems. These problems are larger in scope and are not as well-defined
as the homework problems in previous chapters and provide an opportunity to
use your skills on more realistic problems.
Appendix B, Simio Student Competition Problems provides summaries of recent
problems featured in what has quickly become the largest student simulation
competition. This is an ideal place to explore a challenging project or get ideas
for creating your own project.
Finally, Appendix C provides some tips on using the toolbar (especially Search),
understanding the meaning behind the formatting, and locating the files and
other resources referenced in this book.
careful observation. One drawback of this approach is that you may need to
watch the real system a long time in order to observe the particular conditions
of interest even once, let alone making enough observations to reach reliable
conclusions. And of course, for some systems (such as a worldwide distribution
network), it may not be possible to find a vantage point from which you can
observe the entire system at an adequate level of detail.
Additional problems arise when you want to study changes to the system. In
some cases it may be easy to make a change in the real system — for example,
add a temporary second person to a work shift to observe the impact. But
in many cases, this is just not practical: consider the investment required to
evaluate whether you should use a standard machine that costs $300,000 or a
high-performance machine that costs $400,000. Finally, if the real system doesn’t
yet exist, no observation is possible at all.
For these reasons among others, we use models to gain understanding. There are
many types of models, each with its own advantages and limitations. Physical
models, such as a model of a car or airplane, can provide both a sense of
reality as well as interaction with the physical environment, as in wind-tunnel
testing. Analytical models use mathematical representations which can be
quite useful in specific problem domains, but applicable domains are often limited.
Simulation is a modeling approach with much broader applicability.
Computer simulation imitates the operation of a system and its internal
processes, usually over time, and in appropriate detail to draw conclusions about
the system’s behavior. Simulation models are created using software designed to
represent common system components, and record how they behave over time.
Simulation is used for predicting both the effect of changes to existing systems,
and the performance of new systems. Simulations are frequently used in the
design, emulation, and operation of systems.
Simulations may be stochastic or deterministic. In a stochastic simulation (the
most common), randomness is introduced to represent the variation found in
most systems. Activities involving people always vary (for example in time taken
to complete a task or quality of performance); external inputs (such as customers
and materials) vary; and exceptions (failures) occur. Deterministic models
have no variation. These are rare in design applications, but more common in
model-based decision support such as scheduling and emulation applications.
Section 3.1.3 discusses this further.
There are two main types of simulation, discrete and continuous. The terms
discrete and continuous refer to the changing nature of the states within the
system. Some states (e.g., the length of a queue, status of a worker) can change
only at discrete points in time (called event times). Other states (e.g., pressure
in a tank or temperature in an oven) can change continuously over time. Some
systems are purely discrete or continuous, while others have both types of states
present. Section 3.1.2 discusses this further, and gives an example of a continuous
simulation.
Remove Watermark Wondershare
PDFelement
Continuous systems are defined by differential equations that specify the rate of
change. Simulation software uses numerical integration to generate a solution for
the differential equations over time. System dynamics is a graphical approach
for creating simple models using the same underlying concept, and is often used
to model population dynamics, market growth/decay, and other relationships
based on equations.
Four discrete modeling paradigms have evolved in simulation. Events model the
points in time when the system state changes (a customer arrives or departs).
Processes model a sequence of actions that take place over time (a part in a
manufacturing system seizes a worker, delays by a service time, then releases the
worker). Objects allow more intuitive modeling by representing complete objects
found in the facility. Agent-based modeling (ABM) is a special case of the
object paradigm in which the system behavior emerges from the interaction of
a large number of autonomous intelligent objects (such as soldiers, firms in a
market, or infected individuals in an epidemic). The distinction between these
paradigms is somewhat blurred because modern packages incorporate multiple
paradigms. Simio is a multi-paradigm modeling tool that incorporates all these
paradigms into a single framework. You can use a single paradigm, or combine
multiple paradigms in the same model. Simio combines the ease and rapid
modeling of objects with the flexibility of processes.
Simulation has been applied to a huge variety of settings. The following are
just a few samples of areas where simulation has been used to understand and
improve the system effectiveness:
• Airports: Parking-lot shuttles, ticketing, security, terminal transportation,
food court traffic, baggage handling, gate assignments, airplane de-icing.
• Hospitals: Emergency department operation, disaster planning, ambulance
dispatching, regional service strategies, resource allocation.
• Ports: Truck and train traffic, vessel traffic, port management, container
storage, capital investments, crane operations.
• Mining: Material transfer, labor transportation, equipment allocation,
bulk material mixing.
• Amusement parks: Guest transportation, ride design/startup, waiting line
management, ride staffing, crowd management.
• Call centers: Staffing, skill-level assessment, service improvement, training
plans, scheduling algorithms.
• Supply chains: Risk reduction, reorder points, production allocation, in-
ventory positioning, transportation, growth management, contingency
planning.
• Manufacturing: Capital-investment analysis, line optimization, product-
mix changes, productivity improvement, transportation, labor reduction.
Remove Watermark Wondershare
PDFelement
and analysis (see (Ross, 2010), (Nelson, 1995) to review). At its most basic,
a random variable is a function whose value is determined by the outcome of
an experiment; that is, we do not know the value until after we perform the
experiment. In the simulation context, an experiment involves running the
simulation model with a given set of inputs. The probabilistic behavior of a
random variable, X, is described by its distribution function (or cumulative
distribution function, CDF), F (x) = P r(X ≤ x), where the right hand side
represents the probability that the random variable X takes on a value less than
or equal to the value x. For discrete random variables, the probability mass
function, p(xi ) must be considered, and for continuous random variables, we
evaluate the probability density function, f (x):
Discrete Random Variables
p(xi ) = P r(X = xi )
P
F (x) = p(xi )
∀i3
xi ≤x
Figure 1.1: Sample patient treatment times and the corresponding empirical
CDF.
system, and the care-giver and space utilizations. The simulation model will
generate observations of these random variables. By controlling the execution of
the simulation model, we can use the generated observations to characterize the
outputs of interest. In the following section, we will discuss input and output
analysis in the context of the general simulation process.
Conceptual design can be done with pen and paper or on a whiteboard or similar
collaboration space that promotes free thinking. It helps to be outside of the
constraints of the simulation software package that you happen to be using.
Although a well-defined process or methodology for conceptual design would
be ideal, we do not know of one. Instead, planning the project is an informal
process involving thinking about and discussing the details of the problem and
the potential modeling approaches. Then the modelers can outline a systematic
detailing of the modeling approach and decide on the application of software-
specific details. Note that simulation models are developed for specific objectives
and an important aspect of conceptual design is ensuring that the model will
answer the questions being asked. In general, new simulationists (as well as new
model builders in other domains) spend far too little time in the conceptual
design phase. Instead, they tend to jump in and start the model development
process. Allocating too little time for conceptual design almost always increases
the overall time required to complete the project.
Input analysis (which is covered in detail in Chapter 6) involves characterizing
the system inputs, and then developing the algorithms and computer code to
generate observations on the input random variables and processes. Virtually
all commercial simulation software (including Simio) has built-in features for
generating the input observations. So the primary input-analysis task involves
characterizing the input random variables and specifying corresponding dis-
tributions and processes to the simulation software. Often we have sample
observations of the real-world data, and a common approach is is to fit standard
or empirical distributions to these data that can then be used to generate the
samples during the simulation (as show in Figure 1.1. Another approach is to
randomly sample from the actual observed data. If we don’t have real-world
data on inputs, we can use general rules-of-thumb and sensitivity analysis to
help with the input-analysis task. In any of these approaches it is important to
analyze the sensitivity of your model outputs to the selected inputs. Chapter 6
will also discuss the use of Input Parameters and how to use them to complete
that analysis.
Model development is the coding process by which the conceptual model is con-
verted into an executable simulation model. We don’t want to scare anybody
off with the term coding — most modern simulation packages provide sophisti-
cated graphical user interfaces to support modeling building/maintenance so the
coding generally involves dragging and dropping model components and filling
in dialog boxes and property windows. However, effective model development
does require a detailed understanding of simulation methodology in general and
how the specific software being used works in particular. The verification and
validation steps ensure that the model is correct. Verification is the process that
ensures that the model behaves as the developer intended, and the validation
component ensures that the model is accurate relative to the actual system being
modeled. Note that proving correctness in any but the simplest models will not
be possible. Instead, we focus on collecting evidence until we (or our customers)
are satisfied. Although this may disturb early simulationists, it is reality. Model
Remove Watermark Wondershare
PDFelement
In years gone by, simulation was sometimes dismissed as “the method of last
resort,” or an approach to be taken only “when all else fails” ((Wagner, 1969),
pp. 887, 890). As noted above, simulation should not be used if a valid
analytically-tractable model is available. But in many (perhaps most) cases, the
actual system is just too complicated, or does not obey the rules, to allow for an
analytically tractable model of any credible validity to be built and analyzed.
In our opinion, it’s better to simulate the right model and get an approximate
answer whose imprecision can be objectively measured and reduced, than to do
an exact analytical analysis of the wrong model and get an answer whose error
cannot be even be quantified, a situation that’s worse than imprecision.
While we’re talking about precise answers, the examples and figures in this text
edition were created with Simio Version 14 (If you are using a newer version of
Simio, look to the student area of the textbook web site where supplemental on-
line content will be posted as it becomes available.). Because each version of Simio
may contain changes that could affect low-level behavior (like the processing order
of simultaneous events), different versions could produce different numerical
output results for an interactive run. You may wonder “Which results are
correct?” Each one is as correct (or as incorrect) as the others! In this book
you’ll learn how to create statistically valid results, and how to recognize when
you have (or don’t have) them. With the possible exception of a rare bug fix
between versions, every version should generate statistically equivalent (and
valid) results for the same model, even though they may differ numerically across
single interactive runs.
Remove Watermark Wondershare
PDFelement
backwards to determine the appropriate level of detail and address other modeling
concerns. This process can also help bring out unrecognized modeling objectives.
Sometimes the necessary project clarity is not there. If so, and you go ahead
anyway to plan the entire project including deliverables, resources, and date,
you’re setting yourself up for failure. Lack of project clarity is a clear call to do
the project in phases. Starting with a small prototype will often help clarify the
big issues. Based on those prototype experiences, you might find that you can
do a detailed plan for subsequent phases. We’ll talk more about that next.
c. Animation: What are the animation deliverables and for what pur-
poses will the animations be used (model validation, stakeholder
buy-in, marketing)? 2D or 3D? Are existing layouts and symbols
available, and in what form? What will be provided, by whom, and
when?
6. Project phases: Describe each project phase (if more than one) and the
estimated effort, delivery date, and charge for each phase.
7. Signoffs: Signature section for primary stakeholders.
At the beginning of a project there’s a natural inclination just to start modeling.
There’s time pressure. Ideas are flowing. There’s excitement. It’s very hard to
stop and do a functional specification. But trust us on this — doing a functional
specification is worth the effort. Look back at those quotations at the beginning
of this section. Pausing to determine where you’re going and how you’re going
to get there can save misdirected effort and wasted time.
We recommend that approximately the first 10% of the total estimated project
time be spent on creating a prototype and a functional specification. Do not
consider this to be extra time. Rather, like in report design, you are just shifting
some specific tasks to early in the project — when they can have the most
planning benefit. Yes, that means if you expect the project may take 20 days,
you should spend about two days on this. As a result, you may well find that the
project will require 40 days to finish — certainly bad news, but much better to
find out up front while you still have time to consider alternatives (reprioritize
the objectives, reduce the scope, add resources, etc.).
as possible, that the entire section of the model matches the intended system
behavior. Keep repeating this iterative process until the model is complete. At
each step in the process, finding and fixing problems is much easier because it’s
very likely a problem in the small piece that was most recently added. And at
each step you can save under a different name (like MyModelV1, MyModelV2,
or with full dates and even times appended to the file names), to allow reverting
to an earlier version if necessary.
Another benefit of this iterative approach, especially for novices, is that
potentially-major problems can be eliminated early. Let’s say that you built an
entire model based on a faulty assumption of how entity grouping worked, and
only at the very end did you discover your misunderstanding. At that point it
might require extensive rework to change the basis of your model. However, if
you were building your model iteratively, you probably would have discovered
your misunderstanding the very first time you used the grouping construct, at
which time it would be relatively easy to take a better strategy.
A final, and extremely important benefit of the iterative approach is the ability
to prioritize. For each iteration, work on the most important small section of the
model that’s remaining. The one predictable thing about software development
of all types is that it almost always takes much longer than expected. Building
simulation models often shares that same problem. If you run out of project
time when following a non-iterative approach and your model is not yet even
working, let alone verified or validated, you essentially have nothing useful to
show for your efforts. But if you run out of time when following an iterative
approach, you have a portion of the model that’s completed, verified, validated,
and ready for use. And if you’ve been working on the highest-priority task at
each iteration, you may find that the portion completed is actually enough to
fulfill most of the project goals (look up the 80-20 rule or the Pareto principle to
see why).
Although it may vary somewhat by project and application, the general steps in
a simulation study are:
1. Define high-level objectives and identify stakeholders.
2. Define the functional specification, including detailed goals, model bound-
aries, level of detail, modeling approach, and output measures. Design the
final report.
3. Build a prototype. Update steps 1 and 2 as necessary.
4. Model or enhance a high-priority piece of the system. Document and verify
it. Iterate.
Chapter 2
Many (not all) simulation models are of queueing systems representing a wide
variety of real operations. For instance, patients arrive to an urgent-care clinic
(i.e., they just show up randomly without appointments), and they all must first
sign in, possibly after waiting in a line (or a queue) for a bit; see Figure 2.1.
After signing in, patients go either to registration or, if they’re seriously ill, go
to a trauma room, and could have to wait in queue at either of those places too
before being seen. Patients going to the Exam room then either exit the system,
or go to a treatment room (maybe queueing there first) and then exit. The
seriously ill patients that went to a trauma room then all go to a treatment room
(possibly after queueing there too), and then they exit. Questions for designing
and operating such a facility might include how many staff of which type to have
on duty during which time periods, how big the waiting room should be, how
patient waiting-room stays would be affected if the doctors and nurses decreased
37
Remove Watermark Wondershare
PDFelement
or increased the time they tend to spend with patients, what would happen if
10% more patients arrived, and what might be the impact of serving patients
in an order according to some measure of acuity of their presented condition
instead of first-come, first served.
This short chapter will cover just the basics of queueing theory (not queueing
simulation), since familiarity with this material and the terminology is important
for developing many simulation models. The relatively simple mathematical for-
mulas from elementary queueing theory can also prove valuable for verification of
simulation models of queueing systems (helping to determine that the simulations
are correct). Queueing-theory models can do that by providing a benchmark
against which simulation results can be compared, if the simulation model is
simplified (probably unrealistically) to match the more stringent assumptions
of queueing theory (e.g., assuming exponential probability distributions even
though such is not true for the real system we’re simulating). If the (simplified)
simulation model approximately agrees with the queueing-theoretic results, then
we have better confidence that the simulation model’s logic, at least, is correct.
As we develop our Simio simulation models in later chapters, we’ll do this re-
peatedly, which is helpful since simulation “code” can be quite complex and thus
quite difficult to verify.
Queueing theory is an enormous subject, and has been studied mathematically
since at least 1909, at first by A.K. Erlang in connection with how the recently-
invented “telephone” systems in Copenhagen, Denmark might be designed and
perform ((Erlang, 1909), (Erlang, 1917)). There are many entire books written
on it (e.g., (Gross et al., 2008), (Kleinrock, 1975)), as well as extensive chapters
in more general books on probability and stochastic processes (e.g. (Ross, 2010))
or on other application-oriented topics like manufacturing (e.g. (Askin and
Standridge, 1993)); a web search on “queueing theory” returned more than 1.4
million results. Thus, we make no attempt here to give any sort of complete
treatment of the subject; rather, we’re just trying to introduce some terminology,
give some basic results, contrast queueing theory with simulation via their
relative strengths and weaknesses, and provide some specific formulas that we’ll
use in later chapters to help verify our Simio simulation models.
In this chapter (and really, in the whole book), we assume that you’re already
familiar with basic probability, including:
• The foundational ideas of a probabilistic experiment, the sample space for
the experiment, and events.
• Random variables (RVs), both the discrete and continuous flavors.
• Distributions of RVs — probability mass functions (PMFs) for discrete, prob-
ability density functions (PDFs) for continuous, and cumulative distribution
functions (CDFs) for both flavors.
• Expected values of RVs and their distributions (a.k.a. expectations or just
means), variances, and how to use PMFs, PDFs, and CDFs to compute
Remove Watermark Wondershare
PDFelement
give the probabilities that patients will follow those arcs. When coming out of a
station where there’s a choice about where to go next (out of Sign In and Exam
Rooms) we need to know these probabilities; when coming out of a station where
all patients go to the same next station (out of Arrival, Registration, Trauma
Rooms, Treatment Rooms) the 1.0 probabilities noted in the arcs are obvious,
but we show them anyway for completeness. Though terminology varies, we’ll
say that an entity is in queue if it’s waiting in the line but not in service, so
right now at the Exam Rooms in Figure 2.1 there are four patients in queue and
seven patients in the Exam-Room system; there are three patients in service at
the Exam Rooms.
When a server finishes service on an entity and there are other entities in queue
for that queueing node, we need to decide which specific entity in queue will
be chosen to move into service next — this is called the queue discipline.
You’re no doubt familiar with first-come, first-served (better known in queueing
as first-in, first-out, or FIFO), which is common and might seem the “fairest.”
Other queue disciplines are possible, though, like last-in, first-out (LIFO), which
might represent the experience of chilled plates in a stack waiting to be used
at a salad bar; clean plates are loaded onto the top, and taken from the top
as well by customers. Some queue disciplines use priorities to pay attention to
differences among entities in the queue, like shortest-job-first (SJF), also called
shortest processing time (SPT). With an SJF queue discipline, the next entity
chosen from the queue is one whose processing time will be lowest among all
those then in queue (you’d have to know the processing times beforehand and
assign them to individual entities), in an attempt to serve quickly those jobs
needing only a little service, rather than making them wait behind jobs requiring
long service, thereby hopefully improving (reducing) the average time in queue
across all entities. Pity the poor big job, though, as it could be stuck near
the back of the queue for a very long time, so whether SJF is “better” than
FIFO might depend on whether you care more about average time in system or
maximum (worst) time in system. A kind of opposite of SJF would be to have
values assigned to each entity (maybe profit upon exiting service) and you’d like
to choose the next job from the queue as the one with the highest value (time is
money, you know). In a health-care system like that in Figure 2.1, patients might
be initially triaged into several acuity levels, and the next patient taken from a
queue would one in the most serious acuity-level queue that’s non-empty; within
each acuity-level queue a tie-breaking rule, such as FIFO, would be needed to
select among patients at the same acuity level.
Several performance measures (or output metrics) of queueing systems are often
of interest:
• The time in queue is, as you’d guess, the time that an entity spends
waiting in line (excluding service time). In a queueing network like Figure
2.1, we could speak of the time in queue at each station separately, or
added up for each patient over all the individual times in queue from arrival
to the system on the upper left, to exit on the far right.
Remove Watermark Wondershare
PDFelement
• The time in system is the time in queue plus the time in service. Again,
in a network, we could refer to time in system at each station separately,
or overall from arrival to exit.
• The number in queue (or queue length) is the number of entities in
queue (again, not counting any entities who might be in service), either
at each station separately or overall in the whole system. Right now in
Figure 2.1 there are two patients in queue at Sign In, one at Registration,
four at Exam Rooms, and none at both Trauma Rooms and Treatment
Rooms; there are seven patients in queue in the whole system.
• The number in system is the number of entities in queue plus in service,
either at each station separately or overall in the whole system. Right
now in Figure 2.1 there are four patients in system at Sign In, two at
Registration, seven at Exam Rooms, one at Trauma Rooms, and two at
Treatment Rooms; there are 16 patients in the whole system.
• The utilization of a server (or group of parallel identical servers) is the
time-average number of individual servers in the group who are busy,
divided by the total number of servers in the group. For instance, at Exam
Rooms there are three servers, and if we let BE (t) be the number of the
individual exam rooms that are busy (occupied) at any time t, then the
utilization is Rh
0
BE (t)dt
, (2.1)
3h
where h is the length (or horizon) of time for which we observe the system
in operation.
With but very few exceptions, the results available from queueing theory are
for steady-state (or long-run, or infinite-horizon) conditions, as time (real or
simulated) goes to infinity, and often just for steady-state averages (or means).
Here’s common (though not universal) notation for such metrics, which we’ll
use:
• Wq = the steady-state average time in queue (excluding service times) of
entities (at each station separately in a network, or overall across the whole
network).
• W = the steady-state average time in system (including service times) of
entities (again, at each station separately or overall).
• Lq = the steady-state average number of entities in queue (at each station
separately or overall). Note that this is a time average, not the usual average
of a discrete list of numbers, so might require a bit more explanation. Let
Lq (t) be the number of entities in queue at time instant t, so Lq (t) ∈
{0, 1, 2, . . .} for all values of continuous time t. Imagine a plot of Lq (t)
vs. t, which would be a piecewise-constant curve at levels 0, 1, 2, . . . ,
with jumps up and down at those time instants when entities enter and
leave the queue(s). Over a finite time horizon [0, h], the time-average
Remove Watermark Wondershare
PDFelement
and the Exam-Room service times were exponential. For an Erlang RV composed
of the sum of m IID exponential RVs, Em is common notation, so an M/E3 /2/10
system would have exponential interarrival times, 3-Erlang service times, two
parallel identical servers, and a limit of ten entities in the system at any one
time (so a maximum of eight in the queue). The notation G is usually used
for A or B when we want to allow a general interarrival-time or service-time
distribution, respectively.
The most important of these relationships is Little’s law, the first version of
which was derived in (Little, 1961), but it’s been generalized repeatedly, e.g.
(Stidham, 1974); recently it celebrated its 50th anniversary ((Little, 2011)).
Stated simply, Little’s law is just
L = λW
with our notation from above. In our application we’ll consider this just for
a single multiserver queueing station, but be aware that it does apply more
generally. The remarkable thing about Little’s law is that it relates a time
average (L on the left-hand side) to an entity-based observational average (W
on the right-hand side).
W = Wq + E(S),
where we assume that we know at least the expected value E(S) of the service-
time distribution, if not the whole distribution. This just says that your expected
time in system is your expected time in queue plus your expected service time.
This relationship, together with L = λW and Lq = λWq , allows you to get any
of Wq , W , Lq , and L if you know just one of them. For instance, if you know
(or can estimate) Wq , then just substituting yields L = λ(Wq + E(S)); likewise,
if you know L, then after a little algebra you get Wq = L/λ − E(S).
Remove Watermark Wondershare
PDFelement
2.3.1 M /M /1
Perhaps the simplest of all queueing systems, we have exponential interarrival
times, exponential service times, and just a single server.
The steady-state average number in system is L = ρ/(1 − ρ). Remember that ρ
is the mean arrival rate λ divided by the mean service rate µ if there’s just a
single server. Certainly, L can be expressed in different ways, like
λ
L= .
1/E(S) − λ
If we know L, we can then use the relations in Section 2.2 to compute the other
metrics Wq , W , and Lq .
2.3.2 M /M /c
Again, both interarrival times and services times follow exponential distributions,
but now we have c parallel identical servers being fed by a single queue.
First, let p(n) be the probability of having n entities in the system in steady
state. The only one of these we really need is the steady-state probability that
Remove Watermark Wondershare
PDFelement
1
p(0) = (cρ)c Pc−1 (cρ)n
,
c!(1−ρ) + n=0 n!
a little complicated but is just a formula that can be computed, maybe even in
a spreadsheet, since c is finite, and often fairly small. (For any positive integer
j, j! = j × (j − 1) × (j − 2) × · · · × 2 × 1, and is pronounced “j factorial” — not
by shouting “j.” Mostly for convenience, 0! is just defined to be 1.) Then,
ρ(cρ)c p(0)
Lq = ,
c!(1 − ρ)2
from which you could get, for example, L = Lq + λ/µ along with the other
metrics via the relationships in Section 2.2.
Though the formulas above for the M/M/c are all closed-form (i.e., you can
in principle plug numbers into them), they’re a little complicated, especially
the summation in the denominator in the expression for p(0) unless c is very
small. So we provide a small command-line program mmc.exe (see Appendix
Section C.4.2 for the download URL), to do this for values that you specify for
the arrival rate λ, the service rate µ, and the number of servers c. To invoke
mmc.exe you need to run the Microsoft Windows Command Prompt window
(usually via the Windows Start button, then Programs or All Programs, then
in the Accessories folder). It’s probably simplest to move the mmc.exe file to
the “root” drive (usually C:) on your system, and then in the Command Prompt
window, type cd .. repeatedly until the prompt reads just C:\ >. If you then
type just mmc at the prompt you’ll get a response telling you what the syntax is,
as shown at the top of Figure 2.2. Then, type mmc followed by the values you
want for λ, µ, and c, separated by any number of blank spaces. The program
responds with the steady-state queueing metrics for this system, assuming that
the values you specified result in a stable queue, i.e., values for which ρ < 1. The
resulting metrics are all for steady-state, using whatever time units you used for
your input parameters (of course, λ and µ must use the same time units, but
that time unit could be anything and is not needed by mmc.exe).
If you are a Python user, you can find a Python mmc module and examples at
https://github.com/auie86/mmc. In addition to solving single-server systems,
this module can be used to solve Jackson Network models discussed in Section
2.4.
2.3.3 M /G/1
This model once again has exponential interarrival times, but now the service-
time distribution can be anything; however, we’re back to just a single server.
This might be more realistic than the M/M/1 since exponential service times,
with a mode (most likely value) of zero, are usually far-fetched in reality.
Remove Watermark Wondershare
PDFelement
2.3.4 G/M /1
This final example is a kind of reverse of the preceding one, in that now interarrival
times can follow any distribution (of course, they have to be positive to make
sense), but service times are exponential. We just argued that exponential
service times are far-fetched, but this assumption, especially its memoryless
property, is needed to derive the results below. And, there’s just a single server.
This model is more complex to analyze since, unlike the prior three models,
knowing the number of entities present in the system is not enough to predict the
future probabilistically, because the non-exponential (and thus non-memoryless)
interarrival times imply that we also need to know how long it’s been since
the most recent arrival. As a result, the “formula” isn’t really a formula at all,
Remove Watermark Wondershare
PDFelement
Then
1
W = ,
µ(1 − z)
and from that, as usual, we can get the other metrics via the relations in Section
2.2.
So the question is: What’s the value of z that satisfies equation (2.2)? Unfortu-
nately, (2.2) generally needs to be solved for z by some sort of numerical method,
such as Newton-Raphson iterations or another root-finding algorithm. And the
task is complicated by the fact that the right-hand side of (2.2) involves an
integral, which itself has under it the variable z we’re seeking!
So in general, this is not exactly a “formula” for W , but in some particular cases
of the interarrival-time distribution, we might be able to manage something. For
instance, if interarrivals have a continuous uniform distribution on [a, b] (with
0 ≤ a < b), then their PDF is
1/(b − a) if a ≤ t ≤ b
g(t) = .
0 otherwise
Figure 2.3: Excel spreadsheet using Goal Seek to solve for stead-state queueing
metrics.
Remove Watermark Wondershare
PDFelement
Preface for the URL and login/password), we’ve set this up for this Uniform/M/1
queue; see Figure 2.3.
The formula in cell D10 (showing at the top of the figure) contains equation
(2.3), except written as its left-hand side minus its right-hand side, so we use
Goal Seek to find the value of z (in cell D9) that makes this difference in cell
D10 (approximately) 0. You need to supply an initial “guess” at the root-finding
value of z (which must be between 0 and 1) and enter your guess in cell D9;
based on experimentation with the shape of the curve in cell D10 as a function
of z in cell D9, it appears that initializing with z = 0 in cell D9 provides the
most robust and stable results. The completed Goal Seek dialog is shown, and
the results on the left are after it has run to completion. After approximating
the required solution for z and confirming that cell D10 is (close to) 0, the
spreadsheet also computes the standard steady-state queueing metrics. The text
box at the bottom contains more detailed instructions for use of this spreadsheet
model.
times are IID exponential with mean 1/λSignIn ). Remarkably, in stable M/M/c
queueing stations, the output is also a Poisson process with the same rate as the
input rate, λSignIn in this case. In other words, if you stand at the exit from the
Sign-In station, you’ll see the same probabilistic behavior that you see at the
entrance to it. Now in this case that output stream is split by an independent toss
of a (biased) coin, with each patient’s going to Registration with probability 0.9,
and to Trauma Rooms with probability 0.1. So we have two streams going out,
and it turns out that each is also an independent Poisson process (this is called
decomposition of a Poisson process), and at rate 0.9λSignIn into Registration
and 0.1λSignIn into Trauma Rooms. Thus Registration can be analyzed as an
M/M/1 queue with arrival rate 0.9λSignIn , and Trauma Rooms can be analyzed
as an M/M/2 queue with arrival rate 0.1λSignIn . Furthermore, all three of the
nodes we’ve discussed so far (Sign In, Registration, and Trauma Rooms) are
probabilistically independent of each other.
Proceeding in this way through the network, we can analyze all the nodes as
follows:
• Sign In: M/M/2 with arrival rate λSignIn .
• Registration: M/M/1 with arrival rate 0.9λSignIn .
• Trauma Rooms: M/M/2 with arrival rate 0.1λSignIn .
• Exam Rooms: M/M/3 with arrival rate 0.9λSignIn .
• Treatment Rooms: M/M/2 with arrival rate
As mentioned above, though our urgent-care-clinic example doesn’t have it, there
could be more Poisson input streams from outside the system arriving directly
into any of the nodes; the overall effective input rate to a node is just the sum
of the individual input rates coming into it. There could also be self-loops; for
example out of Treatment Rooms, it could be that only 80% of patients exit the
system, and the other 20% loop directly back to the input for Treatment Rooms
(presumably for further treatment); in such a case, it may be necessary to solve
a linear equation for, say, λTreatmentRooms . For the analysis of this section to
remain valid, though, we do need to ensure that the “local” traffic intensity at
each of the nodes stays strictly below 1. An example of a a generic network with
these characteristics is given next.
Consider the queueing network shown in Figure 2.4.
Figure 2.4: Queueing network example. Assume that c = 1 for all stations.
Our interest is in determining the steady-state values for the average number of
entities in the system (L), the average time that an entity spends in the system
(W ) and the server traffic intensities (ρi ). The first step is to determine the
arrival rates for each server. If a server’s traffic intensity is strictly less than 1,
the departure rate is exactly the arrival rate – we’ll assume that this is true for
all servers now and will verify this as we go. The arrival rates can be computed
as:
λ1 = 100
λ2 = 50
1
λ3 = (0.3λ1 + 0.2λ2 )
0.9
λ4 = 0.7λ1 + 0.4λ5
λ4 5 = 0.6λ2
λ6 = λ4 + 0.9λ3 + 0.6λ5
Given the arrival rates, the service rates shown in Figure 2.4, and the assumption
that c = 1 for all servers, we can apply the formulae from Section 2.3 to find Li ,
Remove Watermark Wondershare
PDFelement
1 2 3 4 5 6
$\lambda_j$ 100.00 50.00 44.44 82.00 30.00 140.00
$\mu_j$ 110.00 60.00 50.00 95.00 35.00 150.00
$\rho_j$ 0.91 0.83 0.89 0.86 0.86 0.93
$L_j$ 10.00 5.00 8.00 6.31 6.00 14.00
$W_j$ 0.10 0.10 0.18 0.08 0.20 0.10
6
X
L= Li
j=1
L
W =
λ1 + λ2
As we will see later in the book, this type of analysis can be very useful for
model verification even if the standard queueing assumptions aren’t met for a
given system that we wish to simulate.
2.6. PROBLEMS 53
And as we mentioned, such results are nearly always only for steady-state
performance metrics, so don’t tell you much if you’re interested in short-term
(or finite-horizon or transient) performance. And, queueing-theoretic results are
not universally available for all interarrival-time and service-time distributions
(recall the mathematical convenience of the memoryless exponential distribution),
though approximation methods can be quite accurate.
Simulation, on the other hand, can most easily deal with short-term (or finite-
horizon) time frames. In fact, steady-state is harder for simulation since we
have to run for very long times, and also worry about biasing effects of initial
conditions that are uncharacteristic of steady state. And when simulating, we
can use whatever interarrival- and service-time distributions seem appropriate
to fit the real system we’re studying (see Sections 6.1 and 6.2), and in particular
we have no need to assume that anything has an exponential distribution unless
it happens to appear that way from the real-world data. Thus, we feel that
simulation models stand a better chance of being more realistic, and thus more
valid, models of reality, not to mention that their structure can go far beyond
standard queueing models into great levels of complexity that render completely
hopeless any kind of exact mathematical analysis. The only real downside to
simulation is that you must remember that simulation results are statistical
estimates, so must be analyzed with proper statistical techniques in order to be
able to draw justified and precise conclusions, a point to which we’ll return often
in the rest of this book. In fact, the urgent-care clinic shown in Figure 2.1 and
discussed throughout this chapter will be simulated (and properly statistically
analyzed, of course), all in Simio, in a much more realistic framework in Chapter
9.
2.6 Problems
1. For an M/M/1 queue with mean interarrival time 1.25 minutes and mean
service time 1 minute, find all five of Wq , W , Lq , L, and ρ. For each,
interpret in words. Be sure to state all your units (always!), and the
relevant time frame of operation.
2. Repeat Problem 1, except assume that the service times are not exponen-
tially distributed, but rather (continuously) uniformly distributed between
a = 0.1 and b = 1.9. Note that the expected value of this uniform distribu-
tion is (a + b)/2 = 1, the same as the expected service time in Problem 1.
Compare all five of your numerical results to those from Problem 1 and ex-
plain intuitively with respect to this change in the service-time distribution
(but with its expected value remaining at 1). Hint: In case you’ve forgotten,
or your calculus has rusted completely shut, or you haven’t already found
it with a web search, the standard p deviation of the continuous uniform
distribution between a and b is (b − a)2 /12 (that’s right, you always
divide by 12 regardless of what a and b are . . . the calculus just works out
that way).
Remove Watermark Wondershare
PDFelement
3. Repeat Problem 1, except assume that the service times are triangularly
distributed between a = 0.1 and b = 1.9, and with the mode at m = 1.0.
Compare all five of your results to those from Problems 1 and 2. Hint:
The expected value of a triangular distribution between a and b, and with
mode
p m (a < m < b), is (a + m + b)/3, and the standard deviation is
(a2 + m2 + b2 − am − ab − bm)/18 . . . do you think maybe it’s time to
dust off that calculus book (or, at least hone your web-search skills)?
4. In each of Problems 1, 2, and 3, suppose that we’d like to see what would
happen if the arrival rate were to increase in small steps; maybe a single-
server barbershop would like to increase business by some advertising or
coupons. Create a spreadsheet or a computer program (if you haven’t
already done so to solve those problems), and re-evaluate all five of Wq ,
W , Lq , L, and ρ, except increasing the arrival rate by 1% over its original
value, then by 2% over its original value, then by 3% over its original value,
and so on until the system becomes unstable (ρ ≥ 1). Make plots of each
of the five metrics as functions of the percent increase in the arrival rate.
Discuss your findings.
5. Repeat Problem 1, except for an M/M/3 queue with mean interarrival
time 1.25 minutes and mean service time 3 minutes at each of the three
servers. Hint: You might want to consider creating a computer program
or spreadsheet, or use mmc.exe.
6. In Problem 5, increase the arrival rate in the same steps as in Problem
4, and again evaluate all of Wq , W , Lq , L, and ρ at each step. Continue
incrementing the arrival rate in 1% steps until you reach 100% over the
original rate (i.e., doubling the rate) and adding servers as necessary (but
keeping the minimum number of servers to achieve stability).
7. Show that the formula for Lq for the M/M/c queue in Section 2.3 includes
the M/M/1 as a special case.
8. In the urgent-care clinic of Figure 2.1, suppose that the patients arrive
from outside into the clinic (coming from the upper right corner of the
figure and always into the Sign In station) with interarrival times that are
exponentially distributed with mean 6 minutes. The number of individual
servers at each station and the branching probabilities are all as shown in
Figure 2.1. The service times at each node are exponentially distributed
with means (all in minutes) of 3 for Sign In, 5 for Registration, 90 for
Trauma Rooms, 16 for Exam Rooms, and 15 for Treatment Rooms. For
each of the five stations, compute the “local” traffic intensity ρStation there.
Will this clinic “work,” i.e., be able to handle the external patient load?
Why or why not? If you could add a single server to the system, and add
it to any of the five stations, where would you add it? Why? Hint: Unless
you like using your calculator, a spreadsheet or computer program might
be good, or perhaps use mmc.exe.
9. In Problem 8, for each of the five stations, compute each of Wq , W , Lq ,
Remove Watermark Wondershare
PDFelement
2.6. PROBLEMS 55
L, and ρ, and interpret in words. Would you still make the same decision
about where to add that extra single resource unit that you did in Problem
8? Why or why not? (Remember these are sick people, some of them
seriously ill, not widgets being pushed through a factory.) Hint: Unless you
really, really, really like using your calculator, a spreadsheet or computer
program might be very good, or maybe you could use mmc.exe.
10. In Problems 8 and 9 (and without the extra resource unit), the inflow
rate was ten per hour, the same as saying that the interarrival times have
a mean of 6 minutes. How much higher could this inflow rate go and
have the whole clinic still “work” (i.e., be able to handle the external
patient load), even if only barely? Don’t do any more calculations than
necessary to answer this problem. If you’d like to get this really exact, you
might consider looking up a root-finding method and program it into your
computer program (if you wrote one), or use the Goal Seek capability in
Excel (if you created an Excel spreadsheet).
11. In Problems 8 and 9 (and without the extra resource unit), the budget’s
been cut and we need to eliminate one of the ten individual servers across
the clinic; however, we have to keep at least one at each station. Where
would this cut be least damaging to the system’s operation? Could we cut
two servers and expect the system still to “work?” More than two?
Remove Watermark Wondershare
PDFelement
Chapter 3
Kinds of Simulation
Simulation is a very broad, diverse topic, and there are many different kinds of
simulations, and approaches to carrying them out. In this chapter we describe
some of these, and introduce terminology.
In Section 3.1 we classify the various kinds of simulations along several dimensions,
and then in Section 3.2 we provide four examples of one kind of simulation,
static stochastic (a.k.a. Monte Carlo) simulation. Section 3.3 considers two ways
(manually and in a spreadsheet) of doing dynamic simulations without special-
purpose dynamic-simulation software like Simio (neither is at all appealing, to
say the least). Following that, Section 3.4 discusses the software options for
doing dynamic simulations; Section 3.4.1 briefly describes how general-purpose
programming languages like C++, Java, and Matlab might be used to carry out
the kind of dynamic simulation logic done manually in Section 3.3.1, and Section
3.4.2 briefly describes special-purpose simulation software like Simio.
57
Remove Watermark Wondershare
PDFelement
If the state variables in a simulation model can change continuously over con-
tinuous time, then the model has continuous-change aspects. For example,
the level of water in a tank (a state variable) can change continuously (i.e., in
infinitesimally small increments/decrements), and at any point in continuous
time, as water flows in the top and out the bottom. Often, such models are de-
scribed by differential equations specifying the rates at which states change over
time, perhaps in relation to their levels, or to the levels or rates of other states.
Sometimes phenomena that are really discrete, like traffic flow of individual
vehicles, are approximated by a continuous-change model, in this case viewing
the traffic as a fluid. Another example of states that may, strictly-speaking, be
discrete being modeled as continuous involves the famous Lanchester combat
differential equations. In the Lanchester equations, x(t) and y(t) denote the sizes
(or levels) of opposing forces (perhaps the number of soldiers) at time t in the
fight. There are many versions and variations of the Lanchester equations, but
one of the simpler ones is the so-called modern (or aim-fire) model where each
side is shooting at the other side, and the attrition rate (so a derivative with
respect to time) of each side at a particular point in time is proportional to the
Remove Watermark Wondershare
PDFelement
dx(t)
= −ay(t)
dt
(3.1)
dy(t)
= −bx(t)
dt
where a and b are positive constants. The first equation in (3.1) says that the
rate of change of the x force is proportional to the size of the y force, with
a being a measure of effectiveness (lethality) of the y force — the larger the
constant a, the more lethal is the y force, so the more rapidly the x force is
attritted. Of course, the second equation in (3.1) says the same thing about
the simultaneous attrition of the y force, with the constant b representing the
lethality of the x force. As given here, these Lanchester equations can be solved
analytically, so simulation isn’t needed, but more elaborate versions of them
cannot be analytically solved so would require simulation.
If the state variables can change only at instantaneous, separated, discrete points
on the time axis, then the dynamic model is discrete-change. Most queueing
simulation models are of this type, as state variables like queue lengths and
server-status descriptors can change only at the times of occurrence of discrete
events like customer arrivals, customer service completions, server breaks or
breakdowns, etc. In discrete-change models, simulated time is realized only at
the times of these discrete events — we don’t even look at what’s happening
between successive events (because nothing is happening then). Thus, the
simulation-clock variable jumps from the time of one event directly to the time
of the next event, and at each of these points the simulation model must evaluate
what’s happening, and what changes are necessary to the state variables (and to
other kinds of variables we’ll describe in Section 3.3.1, like the event calendar
and the statistical-tracking variables).
the same execution, which causes you just to continue on in the fixed random-
number sequence from one replication to the next, which will produce different
(random) output from each replication and give you important information on
the uncertainty in your results. Reproducibility of the basic random numbers
driving the simulation is actually desirable for debugging, and for sharpening
the precision of output by means of variance-reduction techniques, discussed in
general simulation books like (Banks et al., 2005) and (Law, 2015).
All the possible face values are in cells C4..C9, the probabilities of each of the
faces are in cells A4..A9, and the corresponding probabilities that the die will be
strictly less than that face value are in cells B4..B9 (as you’ll see in a moment, it’s
convenient to have these strictly-less-than probabilities in B4..B9 for generating
simulated throws of each die). The throw numbers are in column E, the results
of the two individual dice from each throw are in columns F and G, and their
sum for each throw is in column H. In cells J4..L4 are a few basic summary
statistics on the 50 sums. If you have the spreadsheet Model_03_01.xls open
yourself (which we hope you do), you’ll notice that your results are different
from those in Figure 3.1, since Excel’s random-number generator (discussed
in the next paragraph) is what’s called volatile, so that it re-generates “fresh”
random numbers whenever the spreadsheet is recalculated, which happens when
it’s opened.
The heart of this simulation is generating, or “simulating” the individual dice
faces in cells F4..G53; we’ll discuss this in two steps. The first step is to note that
Excel comes with a built-in random-number generator, RAND() (that’s right, the
parentheses are required but there’s nothing inside them), which is supposed to
generate independent observations on a continuous uniform distribution between
0 and 1. We say “supposed to” since the underlying algorithm is a particular
mathematical procedure that cannot, of course, generate “true” randomness, but
only observations that “appear” (in the sense of formal statistical-inference tests)
to be uniformly distributed between 0 and 1, and appear to be independent of
each other. These are sometimes called pseudo-random numbers, a mouthful,
so we’ll just call them random numbers. We’ll have more to say in Chapter
6 about how such random-number generators work, but suffice it to say here
that they’re complex algorithms that depend on solid mathematical research.
Though the method underlying Excel’s RAND() has been criticized, it will do for
our demonstration purposes here, but we might feel more comfortable with a
better random-number generator such as those supplied with Excel simulation
add-ins like Palisade Corporation’s @RISK(R) (www.palisade.com), or certainly
with full-featured dynamic-simulation software like Simio.
The second step transforms a continuous observation, let’s call it U , distributed
continuously and uniformly on [0, 1] from RAND(), into one of the integers
1, 2, ..., 6, each with equal probability 1/6 since the dice are assumed to be
fair. Though the general ideas for generating observations on random variables
(sometimes called random variates) is discussed in Chapter 6, it’s easy to come up
with an intuitive scheme for our purpose here. Divide the continuous unit interval
[0, 1] into six contiguous subintervals, each of width 1/6: [0, 1/6), [1/6, 2/6), . . . ,
[5/6, 1]; since U is a continuous random variate it’s not important whether the
endpoints of these subintervals are closed or open, since U will fall exactly on a
boundary only with probability 0, so we don’t worry about it. Remembering
that U is continuously uniformly distributed across [0, 1], it will fall in each of
these subintervals with probability equal to the subintervals’ width, which is 1/6
for each subinterval, and so we’ll generate (or return) a value 1 if it falls in the
first subinterval, or a value 2 if it falls in the second subinterval, and so on for
Remove Watermark Wondershare
PDFelement
Figure 3.1: Static Monte Carlo simulation of throwing two fair dice.
Remove Watermark Wondershare
PDFelement
all six subintervals. This is implemented in the formulas in cells F4..G53 (it’s
the same formula in all these cells),
This Excel function VLOOKUP, with its fourth argument set to TRUE, returns the
value in the second column (that’s what the 2 is for in the third argument) of
the cell range B4..C9 (the second argument) in the row corresponding to the
values between which RAND() (the first argument) falls in the first column of
B4..C9. (The $s in $B$4:$C$9 are to ensure that reference will continue to be
made to these fixed specific cells as we copy this formula down in columns F and
G.) So we’ll get C4 (which is 1) if RAND() is between B4 and B5, i.e. between
0 and 0.1667, which is our first subinterval of width (approximately) 1/6, as
desired. If RAND() is not in this first subinterval, VLOOKUP moves on to the
second subinterval, between B5 and B6, so between 0.1667 and 0.3333, and
returns C5 (which is 2) if RAND() is between these two values, which will occur
with probability 0.3333 − 0.1667 = 1/6 (approximately). This continues up to
the last subinterval if necessary (i.e., if RAND() happened to be large, between
0.8333 and 1, a width of approximately 1/6), in which case we get C9 (which is
6). If you’re unfamiliar with the VLOOKUP function, it might help to, well, look it
up online or in Excel’s help.
The statistical summary results in J4..L4 are reasonable since we know that
the range of the sum is 2 to 12, and the true expected value of the sum is 7.
Since Excel’s RAND() function is volatile, every instance of it re-generates a fresh
random number any time the spreadsheet is recalculated, which can be forced
by tapping the F9 key (there are also other ways to force recalculation). So try
that a few times and note how the individual dice values change, as does the
mean of their sum in J4 (and occasionally even the min sum and max sum in
K4 and L4).
This idea can clearly be extended to any discrete probability distribution as
long as the number of possible values is finite (we had six values here), and for
unequal probabilities (maybe for dice that are “loaded,” i.e., not “fair” with
equal probabilities for all six faces). See Problem 1 for some extensions of this
dice-throwing simulation.
Next, take the value X you generated in the preceding paragraph such that
it’s continuously uniformly distributed on [a, b], evaluate the function h at this
value X, and finally multiply that by b − a to get a random variate we’ll call
Y = (b − a)h(X). If h were a flat (or constant) function, then no matter where
X happened to fall on [a, b], Y would be equal to the area under h between a
Rb
and b (which is the integral a h(x)dx we’re trying to estimate) since we’d be
talking about just the area of a rectangle here. But if h were a flat function,
you wouldn’t be doing all this in the first place, so it’s safe to assume that h is
Rb
some arbitrary curve, and so Y will not be equal to a h(x)dx unless we were
very lucky to have generated an X to make the rectangle of width b − a and
height h(X) equal to the area under h(x) over [a, b]. However, we know from the
first mean-value theorem for integration of calculus that there exists (at least
one) such “lucky” X somewhere between a and b so we could always hope. But
better than hoping for extremely good luck would be to hedge our bets and
generate (or simulate) a large number of independent realizations of X, compute
Y = (b − a)h(X), the area of a rectangle of width b − a and height h(X) for
each one of them, and then average all of these rectangle-area values of Y . You
can imagine that some rectangle-area values of Y will be bigger than the desired
Rb
a
h(x)dx, while others will be smaller, and maybe on average they’re about
right. In fact, it can be shown by basic probability, and the definition of the
expected value of a random variable, that the expected value of Y , denoted as
Rb
E(Y ) is actually equal to a h(x)dx; see Problem 3 for hints on how to prove
this rigorously.
Figure 3.2: Static Monte Carlo integration of the normal density function.
Remove Watermark Wondershare
PDFelement
Each hat you sell during the peak period turns a profit of r−w = $16.95−$11.00 =
$5.95, so you’d like to order enough to satisfy all peak-period demand. But each
hat you don’t sell during the peak period loses you w −c = $11.00−$6.95 = $4.05,
so you don’t want to over-order either and incur this downside risk. Clearly,
you’d like to wait until demand occurs and order just that many hats, but
customers won’t wait and that’s not how production works, so you must order
before demand is realized. This is a classical problem in the analysis of perishable
inventories, known generally as the newsvendor problem (thinking of daily
hardcopy newspapers [if such still exist when you read this book] instead of hats,
which are almost worthless at the end of that day), and has other applications
like fresh food, gardening stores, and even blood banks. Much research has
investigated analytical solutions in certain special cases, but we’ll develop a
simple spreadsheet simulation model that will be more generally valid, and could
be easily modified to different problem settings.
We first need to develop a general formula for profit, expressed as a function
of h = the number of hats ordered from the supplier. Now D is the peak-
period demand, which is a discrete random variable distributed uniformly on the
integers {a = 1000, 1001, 1002, . . . , b = 5000}. The number of hats sold at the
peak-period retail price of r = $16.95 will be min(D, h), and the number of hats
sold at the post-peak-period clearance price of c = $6.95 will be max(h − D, 0).
To verify these formulas, try out specific values of h and D, both for when D ≥ h
so you sell out, and for when D < h so you have a surplus left over after the
peak period that you have to dump at the clearance price. Profit Z(h) is (total
revenue) – (total cost):
D = ba + (b + 1 − a)U c. (3.3)
This will be an integer between a and b inclusively on both ends (we’d get
D = b + 1 only if U = 1, a probability-zero event that we can safely ignore).
And the probability that D is equal to any one of these integers, say i, is the
probability that i ≤ a + (b + 1 − a)U < i + 1, which, after a bit of algebra, is the
same thing as
i−a i+1−a
≤U < . (3.4)
b+1−a b+1−a
Note that the endpoints are both on the interval [0, 1]. Since U is continuously
uniformly distributed between 0 and 1, the probability of the event in the
equation is just the width of this subinterval,
i+1−a i−a 1 1 1
− = = = ≈ 0.000249938,
b+1−a b+1−a b+1−a 5000 + 1 − 1000 4001
exactly as desired! Excel has an integer-floor function called INT, so the Excel
formula for generating an observation on peak-period demand D is
where a and b will be replaced by absolute references to the cells containing their
numerical values (absolute since we’ll be copying this formula down a column).
The first sheet (tab at the bottom) of the file Model_03_03.xls contains our
simulation using only the tools that come built-in with Excel. Figure 3.3 shows
most of the spreadsheet (to save space, rows 27-54 are hidden and the numerical
frequency-distribution tables at the bottom have been cropped out), but it’s
best if you could just open the Excel file itself and follow along in it as you read,
paying particular attention to the formulas entered in the cells.
The blue-shaded cells in A4..B9 contain the model input parameters. These
should be set apart like this and then used in the formulas rather than “hard-
wiring” these constants into the Excel model, to facilitate possible “what-if”
experiments later to measure the impact of changing their values; that way,
we need only change their values in the blue cells, rather than throughout the
spreadsheet wherever they’re used. We decided, essentially arbitrarily, to make
50 IID replications of the model (each row is a replication), and the replication
number is in column E. Starting in row 7 and going down, the light-orange-shaded
cells in Column F contain the 50 peak-period demands D, which in each of these
cells is the formula
We took the approach of simply trying several values for h (1000, 2000, 3000,
4000, and 5000) spanning the range of possible peak-period demands D under
our assumptions. For each of these values of h, we computed the profit on each
of the 50 replications of peak-period demand if h had been each of these values,
and then summarized the statistics numerically and graphically.
If we order just h = 1000 hats (columns G-I), then we sell 1000 hats at the peak-
period price for sure since we know that D ≥ 1000 for sure, leading to a profit of
Remove Watermark Wondershare
PDFelement
It’s clear that add-ins like @RISK greatly ease the task of carrying out static
Remove Watermark Wondershare
PDFelement
T P = (Q × P ) − (Q × V + F ) (3.6)
where T P is the total profit, Q is the quantity sold, P is the selling price, V is
the variable (marginal) cost, and F is the fixed cost for setting up the production
facilities. Note that we are ignoring the time-value of money and other factors
in order to simplify the model, but these could easily be added to improve the
model realism. Since the firm is predicting what will happen if they produce the
product in the future, some of the profit equation components are uncertain. In
particular, Q, P , and V are assumed to be random variables with the following
distributions:
• Q ∼ Uniform(10000, 15000)
• P ∼ 1 + Lognormal(3.75, 0.65)
• V ∼ 12 + Weibull(10)
and F is fixed at $150, 000. The ultimate question to be answered is whether
the firm should undertake the project of producing and selling the new project.
Since Q, P , and V are random variables, the total profit, T P will also be a
random variable. In order to assist the decision-maker at the firm, we would
like to estimate the probability distribution for this random variable. Using this
distribution, we can then estimate parameters of interest, including the mean,
standard deviation, and percentiles of the profit.
Figure 3.5 illustrates the distributions for Q, P , and V , respectively, using
histograms based on 250, 000 samples from each of the “actual” distributions.
1 The original link was http://www.geocities.com/WallStreet/9245/vba12.htm. This link
appears to no longer be active, but we include it here for completeness of the citation.
Remove Watermark Wondershare
PDFelement
As with our previous Monte Carlo examples, our process will involve sampling
observations for each of these random variables and then using the equation
to compute the corresponding sample of the total profit random variable and
then replicating this process. The pseudo-code for our Monte Carlo model is
shown in Algorithm 1 (note that we rearranged it to reduce the computational
requirement).
Algorithm 1 - Sample TP
n = 250,000 F = 150,000 tp = [] FOR{i = 1 to n} sample P sample
V sample Q profit = Q(P-V)-F tp.append(profit) ENDFOR
Upon execution of the corresponding code/model, tp will be a list/array of the
sampled observations of total profit and we can use the values to estimate the
distribution parameters of interest.
Sampling the observations of Q, P , and V is the critical part of Algorithm 1 and
the algorithm can be easily implemented using any tool/language that supports
Remove Watermark Wondershare
PDFelement
the generation of observations from these random variables (as we’ll explain
in Section 6.4, we call such observations random variates). The general topic
of random variate generation is covered in Section 6.4, but for our Excel and
Python versions of Model 3-4, we will just use the formulae/functions shown in
Table 3.1 (see Sections 6.3 and 6.4 for why these formulae are valid).
Figure 3.6 shows the computational portion of the Python version of Model
3-4 along with the generated histogram total profit (T P ) based on 250, 000
replications.
Figure 3.6: The computational portion of the Python version of Model 3-4 and
the histogram of total profit.
Figure 3.7 shows a portion of the Excel version of Model 3-4 (which uses 100,000
replications). Both versions of the model generate the array of observations
of total profit as described in Algorithm 1 and then computes summary and
descriptive statistics and generates the histogram that estimates the probability
distribution.
Armed with the results of the runs of Model 3-4 we are ready to address
the original question posed – Should the firm undertake the project? The
descriptive statistics and histogram (shown in Figures 3.7 and 3.6) provide useful
information. While the expected profit is approximately $360, 000, there is also
an approximate 19% chance of actually losing money. In addition, the standard
Remove Watermark Wondershare
PDFelement
deviation ($482, 000) and the 25th and 75th percentiles ($41, 000 and $524, 000,
respectively) provide additional information about the risk of undertaking the
project. Chapter 4 goes further into the concepts of risk and error in this context.
Of course the actual decision of whether to undertake the project would depend
on the firm’s risk tolerance, expected return on capital, other opportunities, etc.,
but it is clear that the information provided by the model would be useful input
for the decision maker.
the hood. In this section we’ll describe how this goes, since even with high-level
software like Simio, it’s still important to understand these concepts even if
you’ll (thankfully) never actually have to do a simulation this way. The logic for
this is also what you’d need to code a dynamic discrete-change simulation using
a general-purpose programming language like C++, Java, or Matlab.
Our system here is just a simple single-server queue. Entities (which could
represent customers in a service system, parts in a manufacturing system, or
patients in a health-care system) show up at arrival times that, for now, will be
assumed to be simply given from some magical (see Section 4.2.1) outside source
(we’ll assume the first arrival to be at time 0), and require service times that
are also just given; all times are in minutes and the queue discipline is first-in,
first-out (FIFO). The simulation will just end abruptly at time 8 minutes, even
if entities are in queue or in service at that time. For output, we’ll compute
the utilization of the server (proportion or percent of time busy), as well as the
average, minimum, and maximum of each of (a) the total entity time in system,
(b) the entity time in queue (just waiting in line, exclusive of service time), (c)
the number of entities in the system, and (d) the number of entities in the queue.
The averages in (a) and (b) are just simple averages of lists of numbers, but
the averages in (c) and (d) are time-averages, which are the total areas under
the curves tracking these variables over continuous time, divided by the final
simulation-clock time, 8. For example, if Lq (t) is the number of entities waiting
Rin8 the queue at time t, then the time-average number of entities in queue is
0
Lq (t)dt/8, which is just the weighted average of the possible queue-length
values (0, 1, 2, . . .), with the weights being the proportions of time the curve is
at level 0, 1, 2, . . .. Likewise, if B(t) is the server-busy function (0 if idle at time
t, 1 if busy at time t), and L(t) is the number of entities in system (in queue
R8
plus in service) at time t, then the server-utilization proportion is 0 B(t)dt/8,
R8
and the time-average number of entities in system is 0 L(t)dt/8.
We’ll keep track of things, and do the arithmetic, in an Excel spreadsheet
called Model_03_05.xls, with the files that accompany this book and can be
downloaded as described in the Preface, shown in Figure 3.8. The spreadsheet
holds the data and does calculations. The pink-shaded cells contain formulas
that are specific to this particular input set of arrival and service times, so this
spreadsheet isn’t a general model per se that will work for any set of arrival and
service times.The light-blue-shaded cells B5..B14 and D5..D14 contain the given
arrival and service times. It turns out to be more convenient to work with –
rather than the given arrival times – the interarrival times, which are calculated
via the Excel “=” formulas in C6..C14; type “CTRL-‘” (while holding down the
Control key, type the backquote character) to toggle between viewing the values
and formulas in all cells. Note that an interarrival time in a row is the time
between the arrival of that row’s entity and the arrival of the prior entity in the
preceding row (explaining why there’s no interarrival time for entity 1, which
arrives at time 0).
In a dynamic discrete-change simulation, you first identify the events that occur
Remove Watermark Wondershare
PDFelement
at instants of simulated time, and that may change the system state. In our
simple single-server queue, the events will be the arrival of an entity, the end of
an entity’s service and immediate departure from the system, and the end of
the simulation (which might seem like an “artificial” event but it’s one way to
stop a simulation that’s to run for a fixed simulated-time duration — we’ll “run”
ours for 8 minutes). In more complex simulations, additional events might be
the breakdown of a machine, the end of that machine’s repair time, a patient’s
condition improves from one acuity level to a better one, the time for an employee
break rolls around, a vehicle departs from an origin, that vehicle arrives at its
destination, etc. Identifying the events in a complex model can be difficult, and
there may be alternative ways to do so. For instance, in the simple single-server
queue you could introduce another event, when an entity begins service. However,
this would be unnecessary since this “begin-service” event would occur only
when an entity ends service and there are other entities in queue, or when a
lucky entity arrives to find the server idle with no other entities already waiting
in line so goes directly into service; so, this “event” is already covered by the
arrival and departure events.
specific type of data structure vary, the event calendar will include information
on when in simulated time a future event is to occur, what type of event it is,
and often which entity is involved. The simulation proceeds by identifying the
next (i.e., soonest) event in the event calendar, advancing the simulation-clock
variable to that time, and executing the appropriate event logic. This effects all
the necessary changes in the system state variables and the statistical-tracking
variables needed to produce the desired output, and updates the event calendar
as required.
For each type of event, you need to identify the logic to be executed, which
sometimes depends on the state of the system at the moment. Here’s basically
what we need to do when each of our event types happens in this particular
model:
• Arrival First, schedule the next arrival for now (the simulation-clock value
in Column A) plus the next interarrival time in the given list, by updating
the next-arrival spot in the event calendar (column J in Model_03_04.xls
and Figure 3.8. Compute the continuous-time output areas of the rectangles
under B(t), L(t), and Lq (t) between the time of the last event and now,
based on their values that have been valid since that last event and before
any possible changes in their values that will be made in this event; record
the areas of these rectangles in columns O-Q. What we do next depends
on the server status:
– If the server is idle, put the arriving entity immediately into service
(put the time of arrival of the entity in service in the appropriate row
in column G, to enable later computation of the time in system), and
schedule this entity’s service completion for now plus the next service
time in the given list. Also, record into the appropriate row in column
N a time in queue of 0 for this lucky entity.
– If the server is busy, put the arriving entity’s arrival time at the end
of a list representing the queue of entities awaiting service, in the
appropriate row of columns H-I (it turns out that the queue length
in this particular simulation is never more than two, so we need only
two columns to hold the arrival times of entities in queue, but clearly
we could need more in other cases if the queue becomes longer). We’ll
later need these arrival times to compute times in queue and in system.
Since this is the beginning of this entity’s time in queue, and we don’t
yet know when it will leave the queue and start service, we can’t yet
record a time in queue into Column N for this entity.
• Departure. (upon a service completion). As in an arrival event, compute
and record the continuous-time output areas since the last event in the
appropriate row of columns O-Q. Also, compute and record into the
appropriate row in column M the time in system of the departing entity
(current simulation clock, minus the time of arrival of this entity, which
now resides in column G). What we do next depends on whether there are
other entities waiting in queue:
– If other entities are currently waiting in the queue, take the first
Remove Watermark Wondershare
PDFelement
entity out of queue and place it into service (copy the arrival time
from column H into the next row down in column G). Schedule the
departure of this entity (column K) for now plus the next service time.
Also compute the time in queue of this entity (current simulation
clock in column A, minus the arrival time just moved into column G)
into the appropriate row in column N.
– If there are no other entities waiting in queue, simply make the server-
status variable (column D below row 18) 0 for idle, and blank out the
event-calendar entry for the next departure (column K).
• End simulation (at the fixed simulation-clock time 8 minutes). Compute
the final continuous-time output areas in columns O-Q from the time of
the last event to the end of the simulation, and compute the final output
summary performance measures in rows 36-38.
It’s important to understand that, though processing an event will certainly take
computer time, there is no simulation time that passes during an event execution
— the simulation-clock time stands still. And as a practical matter in this manual
simulation, you probably should check off in some way the interarrival and service
times as you use them, so you can be sure to move through the lists and not
skip or re-use any of them.
Rows 19-35 of the spreadsheet Model_03_05.xls and in Figure 3.8 trace the
simulation from initialization at time 0 (row 19), down to termination at time
8 minutes (row 35), with a row for each event execution. Column A has the
simulation-clock time t of the event, column B indicates the event type, and
column C gives the entity number involved. Throughout, the cell entries in a row
represent the appropriate values after the event in that row has been executed,
and blank cells are places where an entry isn’t applicable. Columns D-F give
respectively the server status B(t) (0 for idle and 1 for busy), the number of
entities in the system, and the number of entities in the queue (which in this
model is always the number in system minus the server status . . . think about
it for a minute). Column G contains the time of arrival of the entity currently
in service, and columns H-I have the times of arrival in the first two positions in
the queue (we happen never to need a queue length of more than two in this
example).
The event calendar is in columns J-L, and the next event is determined by taking
the minimum of these three values, which is what the =MIN function in column
A of the following row does. An alternative data structure for the event calendar
is to have a list (or more sophisticated data structure like a tree or heap) of
records or rows of the form [entity number, event time, event type], and when
scheduling a new event insert it so that you keep this list of records ranked in
increasing order on event time, and thus the next event is always at the top of
this list. This is closer to the way simulation software actually works, and has
the advantage that we could have multiple events of the same type scheduled, as
well as being much faster (especially when using the heap data structure), which
can have a major impact on run speed of large simulations with many different
Remove Watermark Wondershare
PDFelement
kinds of events and long event lists. However, the simple structure in columns
J-L will do for this example.
When a time in system is observed (upon a departure), or a time in queue is
observed (upon going into service), the value is computed (the current simulation
clock in column A, minus the time of arrival) and recorded into column M or
N. Finally, columns O-Q record the areas of the rectangles between the most
recent event time and the event time of this row, in order to compute the time
averages of these curves.
The simulation starts with initialization in row 19 at time 0. This should be
mostly self-explanatory, except note that the end-simulation event time in L19
is set for time 8 minutes here (akin to lighting an 8-minute fuse), and the
next-departure time is left blank (luckily, Excel interprets this blank as a large
number so that the =MIN in A20 works).
The formula =MIN(J19:L19) in A20 finds the smallest (soonest) value in the
event calendar in the preceding row, which is 0, signifying the arrival of entity 1
at time 0. We change the server status to 1 for busy in D20, and the number
in system is set to 1 in E20; the number in queue in F20 remains at 0. We
enter 0 in G20 to record the time of arrival of this entity, which is going directly
into service, and since the queue is empty there are no entries in H20..I20. The
event calendar in J20..L20 is updated for the next arrival as now (0) plus the
next interarrival time (1.965834), and for the next departure as now (0) plus
the next service time (0.486165); the end-simulation event time is unchanged, so
it is just copied down from directly above. Since this is an arrival event, we’re
not observing the end of a time in system so no entry is made in M20; however,
since this is an arrival of a lucky entity directly into service, we record a time in
queue of 0 into N20. Cells O20..Q20 contain the areas of rectangles composing
the areas under the B(t), L(t), and Lq (t) curves since the last event, which are
all zero in this case since it’s still time 0.
Row 21 executes the next event, the departure of entity 1 at time 0.486165.
Since this is a departure, we have a time in system to compute and enter in M21.
The next rectangle areas are computed in O21..Q21; for instance, P21 has the
formula = E20 ∗ ($A21 − $A20), which multiplies the prior number-in-system
value 1 in E20 by the duration $A21 − $A20 of the time interval between the
prior event (A21) and the current time (A20); the $s are to keep the column A
fixed so that we can copy such formulas across columns O-Q (having originally
been entered in column O). Note that the time of the next arrival in J21 is
unchanged from J20, since that arrival is still scheduled to occur in the future;
since there is nobody else in queue at this time to move into service, the time of
the next departure in K21 is blanked out.
The next event is the arrival of entity 2 at time 1.965834, in row 22. Since this
is an arrival of an entity to an empty system, the action is similar to that of the
arrival of entity 1 at time 0, so we’ll skip the details and encourage you to peruse
the spreadsheet, and especially examine the cells that have formulas rather than
Remove Watermark Wondershare
PDFelement
constants.
After that, the next event is another arrival, of entity 3 at time 2.275418, in
row 23. Since this entity is arriving to a non-empty system, the number in
queue, for the first time, becomes nonzero (1, actually), and we record in H23
the time of arrival (now, so just copy from A23) of this entity, to be used later
to compute the time in queue and time in system of this entity. We’re observing
the completion of neither a time in queue nor a time in system, so no entries are
made in M23 or N23. The new rectangle areas under the curves in O23..Q23 are
computed, as always, and based on their levels in the preceding row.
The next event is the departure of entity 2 at time 2.630955, in row 24. Here,
entity 3 moves from the front of the queue into service, so that entity’s arrival
time is copied from H23 into G24 to represent this, and entity 3’s time in queue
is computed in N24 as =A24-G24 = 2.630955 − 2.275418 = 0.355537, in N24.
The simulation proceeds in this way (we’ve covered all the different kinds of
things that can happen, so leave it to you to follow things the rest of the
way through), until eventually the end-simulation event at time 8 becomes the
next event (neither the scheduled arrival of entity 10 at time 8.330407, nor the
departure of entity 7 at time 8.168503, ever happens). At that time, the only
thing to do is compute the final rectangle areas in O35..Q35. Figure 3.9 shows
plots of the B(t), L(t), and Lq (t) curves over the simulation.
In rows 36-38 we compute the output performance measures, using the built-in
Excel functions =AVERAGE, =MIN, =MAX, and =SUM (have a look at the formulas in
those cells). Note that the time averages in O36..Q36 are computed by summing
the individual rectangle areas and then dividing by the final simulation clock
time, 8, which is in A35. As examples of the final output performance measures,
the server was busy 62.32% of the time (O36), the average time in system and
in queue were respectively 0.8676 minute and 0.2401 minute (M36 and N36),
and the time-average length of the queue is 0.3864 entities (Q36). In Chapter
4 we’ll do this same model in Simio (the actual source of the “given” input
interarrival and service times) and we’ll confirm that we get all these same
output performance measures.
If you’re alert (or even awake after the numbing narrative above), you might
wonder why we didn’t compute standard deviations, perhaps using Excel’s
=STDEV function, for the observations of times in system and times in queue
in columns M and N, to go along with their means, minima, and maxima as
we did in Model_03_03.xls for the monthly profits (doing so for the entries
in columns O-Q wouldn’t make sense since they need to be weighted by time-
durations). After all, we’ve mentioned output variation, and you can see from
just looking at columns M and N that there’s variation in these times in system
and times in queue. Actually, there’s nothing stopping us (or you) from adding
a row to compute the standard deviations, but this would be an example of
doing something just because you can, without thinking about whether it’s
right (like making gratuitously fancy three-dimensional bar charts of simple
Remove Watermark Wondershare
PDFelement
Figure 3.9: Plots of the B(t), L(t), and Lq (t) curves for the manual simulation.
Remove Watermark Wondershare
PDFelement
One more practical comment about how we did things in our spreadsheet: In
columns M-Q we computed and saved, in each event row, the individual values
of observed times in system and in queue, and the individual areas of rectangles
under the B(t), L(t), and Lq (t) curves between each pair of successive events.
This is fine in this little example, since it allowed us to use the built-in Excel
functions in rows 36-38 to get the summary output performance measures, which
was easy. Computationally, though, this could be quite inefficient in a long
simulation (thousands of event rows instead of our 17), or one that’s replicated
many times, since we’d have to store and later recall all these individual values to
get the output summary measures. What actually happens instead in simulation
software (or if you used a general-purpose programming language rather than a
Remove Watermark Wondershare
PDFelement
spreadsheet), is that statistical accumulator variables are set up, into which we
just add each value as it’s observed, so we don’t have to store and later recall
each individual value. We also would put in logic to keep a running value of
the current maximum and minimum of each output, and just compare each new
observation to the current extreme values so far to see if this new observation is a
new extreme. You can see how this would be far more efficient computationally,
and in terms of storage use.
Finally, the spreadsheet Model_03_05.xls in Figure 3.8 isn’t general, i.e., it
won’t necessarily remain valid if we change the blue-shaded input arrival times
and service times, because the formulae in many cells (the pink-shaded ones) are
valid only for that type of event, and in that situation (e.g., a departure event’s
logic depends on whether the queue is empty). Spreadsheets are poorly suited
for carrying out dynamic discrete-change simulations, which is why they are
seldom used for this in real settings; our use of a spreadsheet here is just to hold
the data and do the arithmetic, not for building any kind of robust or flexible
model. In Section 3.4.1 we’ll briefly discuss using general-purpose programming
languages for dynamic discrete-change simulation, but really, software like Simio
is needed for models of any complexity, which is what’s covered in most of the
rest of this book.
for this one special case that enables us to simulate the output process we want:
the waiting times in queue (excluding their service time) of entities. Unlike the
manual simulation in Section 3.3.1, we won’t be able to compute directly any of
the other outputs here.
For a single-server queue starting empty and idle at time 0, and with the first
entity arrival at time 0, let Ai be the interarrival time between entity i − 1 and
entity i (for i = 2, 3, ...). Further, let Si be the service-time requirement of entity
i (for i = 1, 2, ...). Note that the Ai ’s and Si ’s will generally be random variables
from some interarrival-time and service-time probability distributions; unlike in
Chapter 2, though, these distributions could really be anything since now we’re
simulating rather than trying to derive analytical solutions. Our output process
of interest is the waiting time (or delay) in queue Wq,i of the ith entity to arrive;
this waiting time does not include the time spent in service, but just the (wasted)
time waiting in line. Clearly, the waiting time in queue of the first entity is 0, as
that lucky entity arrives (at time 0) to find the system empty of other entities,
and the server idle, so we know that Wq,1 = 0 for sure. We don’t know, however,
what the subsequent waiting times in queue Wq,2 , Wq,3 , ... will be, since they
depend on what the Ai ’s and Si ’s will happen to be. In this case, though, once
the interarrival and service times are observed from their distributions, there
is a relationship between subsequent Wq,i ’s, known as Lindley’s recurrence
(Lindley, 1952):
Setting U = F (X) and solving for X yields, after a few lines of algebra,
X = −β ln(1 − U ) (3.9)
Remove Watermark Wondershare
PDFelement
Columns E-G are then simply copied across to the right four times, to get a
total of five independent replications of this 100-entity waiting-time-in-queue
spreadsheet simulation; these blocks of three columns each are not changing
in any way, except of course that they are all using independent draws from
the volatile random-number generator RAND(). Column T averages, for each
i = 1, 2, ..., 100, the five values of each Wq,i across the five replications, so this
column contains a cross-replication average of the waiting times of the first,
second, . . . , 100th arriving entities in the five replications. Row 104 contains
column averages for the Ai ’s and Si ’s; these merely confirm (estimate) the mean
interarrival and service times in cells B5 and B6, but for the Wq,i ’s they are
within-replication averages of the waiting times for each of the five replications
separately. (We refrain from computing standard deviations of the waiting
times within the replications, and we likewise don’t show histograms of these
within-replication waiting times, due to the biasing effect of the autocorrelation,
as discussed in Section 3.3.1.) The plot on the left shows the waiting times
for each replication (light wiggly lines) as a function of the entity number, the
cross-replication waiting-time-average process (heavy wiggly line, but not as
wiggly as the light lines), and the steady-state expected waiting time in queue
(non-wiggly horizontal dashed line).
Tap the F9 key a few times to exercise the volatility of RAND(), and watch all
the interarrival, service, and waiting times change, and watch the wiggly lines
in the plot jump around (the vertical axis on the plot auto-scales in response
to the maximum waiting time with each tap of F9 and re-generation of all the
random numbers). Notice:
• All the simulation-based curves are “anchored” on the left at 0, merely
confirming that the first lucky entity to arrive has a zero wait in queue
every time. But generally, as time goes by (as measured by the entity
number on the horizontal axis, at least ordinally), the waiting times tend
to creep up, though certainly not smoothly or monotonically due to the
random noise in the interarrival and service times.
• The heavy wiggly line doesn’t wiggle as much as the light wiggly lines do,
since it’s the average of those light lines, and the large and small values
for each entity number tend to dampen each other out.
• All the wiggly lines, both light and heavy, have a “meandering” character
to them. That is, they’re certainly random, but as you follow each line
to the right, the new values are tied, at least loosely, to those that came
not too long before them. This confirms the (positive) autocorrelation of
the waiting times within a replication, as you can see algebraically from
Lindley’s recurrence in (3.7), and as discussed near the end of Section
3.3.1.
• While some taps of F9 might give you a reasonable convergence of the
waiting times to the steady-state expected value (horizontal dashed line),
most don’t, indicating that (a) there’s a lot of noise in this system, and
(b) it could take a lot longer than 100 entities to “approach” long-run
steady-state conditions.
Remove Watermark Wondershare
PDFelement
Go ahead and play around with the mean interarrival and mean service times in
B5 and B6, but make sure that the mean interarrival time is always more than
the mean service time, or else the formula in B9 for the steady-state expected
waiting time in queue Wq will be invalid (though the simulation will still be
valid). See how things change, especially as the mean interarrival and mean
service times get close to each other (so the traffic intensity ρ in B8 creeps
upward toward 1, and Wq just keeps getting bigger and bigger).
We want to emphasize that being able to do this particular dynamic simulation
in a spreadsheet depends completely on the availability of Lindley’s recurrence
in (3.7); and note as well that this is just for the waiting-time-in-queue output
process, and not for anything else we might like to get out of even this simple
system (like queue length or server utilization, as we did in the manual simulation
in Section 3.3.1). In general, for complex dynamic systems we’ll have nothing
like Lindley’s recurrence available, so simulating realistic dynamic systems in a
spreadsheet is completely impractical, and almost always outright impossible.
That’s why you need special dynamic-simulation software like Simio.
the next event and directs execution to the corresponding event subprogram, and
takes care of everything else we did in the manual simulation of Section 3.3.1,
like event-calendar updating. At the end, you need to program the appropriate
statistical summarization and create the output. You also need to be concerned
with random-number generators (for stochastic simulations), how to generate
observations from the desired input probability distributions, and keep track of
the model state variables in some sort of data structure. As you’re seeing, this
will be quite a lot of work for models of much complexity, so it can take a lot of
analyst time, and is prone to errors, some of which can be very hard to detect.
Nonetheless, people still do this sometimes, perhaps as quirky modules of larger,
more standard simulations. For more on this kind of programming see, for
example, (Banks et al., 2005), (Law, 2015), or (Seila et al., 2003).
friendly or intuitive either to use or interpret. Graphical user interfaces, often with
integrated animation, were then developed, which opened the door to far more
people; these software packages include Arena (Kelton et al., 2015), AnyLogic
(from Russia) (www.anylogic.ru), ExtendSim (www.extendsim.com), Promodel
(www.pmcorp.com), Flexsim (www.flexsim.com), Simul8 (www.simul8.com), and
others. For more on simulation software, see (Banks et al., 2005), (Law, 2015),
and especially (Nance and Sargent, 2002) for comprehensive reviews; for the
latest (tenth) in a sequence of biennial simulation-software surveys, see (Swain,
2015).
Simio is a comparatively recent product that takes advantage of the latest
in software-development and modeling capabilities. Although relatively new,
Simio has been developed by the same people who pioneered the development
of SLAM, SIMAN and Arena, so there is quite a lot of experience behind it. It
centers around intelligent objects and provides a new object-based paradigm that
radically changes the way objects are built and used. Simio objects are created
using simple graphical process flows that require no programming. This makes
it easier to build your own modeling objects and application-focused libraries.
Simio’s flexibility and extensive integration with real-time data integration also
makes it especially suitable for creating the Digital Twins necessary to support
Industry 4.0 . Most of this book will show you how to use simulation, and
specifically Simio, to solve practical problems effectively.
3.5 Problems
1. Extend the simulation of throwing two dice in Section 3.2.1 in each of the
following ways (one at a time, not cumulatively):
• Instead of 50 throws, extend the spreadsheet to make 500 throws, and
compare your results. Tap the F9 key to get a “fresh” set of random
numbers and thus a fresh set of results.
• Load the dice by changing the probabilities of the faces to be something
other than uniform at 1/6 for each face. Be careful to ensure that
your probabilities sum to 1.
• Use @RISK (see Section 3.2.3), or another Excel add-in for static
Monte Carlo spreadsheet simulation, to make 10,000 throws of the
pair of fair dice, and compare your results to the true probabilities
of getting the sum equal to each of 2, 3, ..., 12 as well as to the true
expected value of 7.
2. In the simulation of throwing two dice in Section 3.2.1, derive (from
elementary probability theory) the probability that the sum of the two dice
will be each of 2, 3, ..., 12. Use these probabilities to find the (true) expected
value and standard deviation of the sum of the two dice, and compare with
the (sample) mean in cell J4; add to the spreadsheet calculation of the
(sample) standard deviation of the sum of the two dice and compare with
Remove Watermark Wondershare
PDFelement
3.5. PROBLEMS 93
your exact analytical result for the standard deviation. Keep the number
of throws at 50.
3. Prove rigorously, using probability theory and the definition of the expected
Rb
value of a random variable, that in Section 3.2.2, E(Y ) = a h(x)dx.
Start by writing E(Y ) = E[(b − a)h(X)] = (b − a)E[h(X)], then use the
definition of the expected value of a function of a random variable, and
finally remember that X is continuously uniformly distributed on [a, b] so
has density function f (x) = 1/(b − a) for a ≤ x ≤ b.
4. Use @RISK, or another Excel add-in for static spreadsheet simulation, to
extend the example in Section 3.2.2 to 10,000 values of Xi , rather than just
the 50 values in Model_03_02.xls in Figure 3.2. Compare your results
to those in Model_03_02.xls as well as to the (almost) exact numerical
integral.
5. In the Monte Carlo integration of Section 3.2.2, add to the spreadsheet
calculation of the standard deviation of the 50 individual values, and use
that, together with the mean already in cell H4, to compute a 95% confi-
dence interval on the exact integral in cell I4; does your confidence interval
contain, or “cover” the exact integral? How often (tap F9 repeatedly and
keep track manually)? Repeat all this, but with a 90% confidence interval,
and then with a 99% confidence interval.
6. In the manual simulation of Section 3.3.1 and the Excel file
Model_03_04.xls, speed up the service times by decreasing them
all by 20%. What’s the effect on the same set of output performance
measures? Discuss.
7. Repeat Problem 6, except now slow down the service times by increasing
them all by 20%. Discuss.
8. In the manual simulation of Section 3.3.1 and the Excel file
Model_03_04.xls, change the queue discipline from FIFO to shortest-
job-first (SJF ), i.e., when the server becomes idle and there’s a queue,
the entity with the shortest service time will enter service next. This is
also called shortest-processing-time (SPT); see Section 2.1. To do this,
you’ll need to “assign’ ’ the (possibly-future) service time to each entity as
it arrives, and then use that to change your queue discipline. What’s the
effect on the same set of output performance measures? You could do this
by either (a) inserting new entities into the queue so that it stays ranked
in increasing order on service time (so the entity with the shortest service
time will always be at the front of the queue), or (b) leaving the queue
order as it is, with new arrivals always joining the end of the queue (if
they can’t go right into service) regardless of their service time, and then
searching through it each time the server becomes idle and is ready to
choose the correct next entity from somewhere in the queue — the results
should be identical, but which would be faster computationally (think of a
Remove Watermark Wondershare
PDFelement
3.5. PROBLEMS 95
the amount demanded (in pounds) could be as little as zero for each
product, and as much as 10, 8, 14, and 11 for oats, peas, beans, and
barley, respectively; he sells only whole-pound amounts, no partial pounds.
Assume a discrete uniform distribution for daily demand for each product
over its range; assume as well that Walther always has enough inventory
to satisfy all demand. The summer selling season is 90 days, and demand
each day is independent of demand on other days. Create a spreadsheet
simulation that will, for each day as well as for the whole season, simulate
Walther’s total cost, total revenue, and total profit.
19. A new car has a sticker price (the full retail asking price) of $22,000. How-
ever, there are several customer-chosen options (automatic transmission,
upgraded speakers, fog lights, auto-dimming rear-view mirror, moonroof)
that can add between $0 and $2000 to the selling price of the car depending
on which options the customer chooses; assume that the total cost of all op-
tions is distributed uniformly and continuously on that range. Also, many
buyers bargain down the price of the car; assume that this bargain-down
amount is distributed uniformly and continuously between $0 and $3000,
and is independent of the options. The selling price of the car is $22,000
plus the total of the options cost, minus the bargain-down amount.
• Create an Excel spreadsheet simulation that will compute the actual
selling price for the next 100 cars sold, using only the capabilities that
come built-in with Excel, i.e., don’t use @RISK or any other third-
party add-ins. Find the sample mean, standard deviation, minimum,
and maximum of your 100 selling prices. Form a 95% confidence
interval for the expected selling price of infinitely many future sales
(not just the next 100), and do this within Excel (Hint: check out
the built-in Excel function TINV and be careful to understand its
input parameters). Also, create a histogram of your 100 selling prices,
either by mimicking what was done in Model 3-5, or by using the
Data Analysis ToolPak that comes with Excel (you may need to
install it via File > Options > Add-Ins, then in the Manage window
at the bottom select Excel Add-ins, then the Go button just to the
right, then check the box for Analysis ToolPak, then OK) and its
Histogram capability (you may want to explore Excel help for this).
Do everything within Excel, i.e., no side hand/calculator calculations
or printed statistical tables, etc.
• In a second sheet (tab) of your same Excel file, repeat part a) above,
except now use @RISK or another Excel add-in for static spreadsheet
simulation, including its built-in variate-generation functions rather
than your own formulas to generate the uniform random variates
needed; also, don’t compute the confidence interval on expected
selling price. Instead of 100 cars, do 10,000 cars to get both a better
estimate of the expected selling price, and a smoother histogram (use
the histograms that come with @RISK). Again, do everything within
Remove Watermark Wondershare
PDFelement
3.5. PROBLEMS 97
Chapter 4
First Model
The initial model used in this chapter is very simple, and except for run length
is basically the same as Model 3-4 done manually in Section 3.3.1 and Model 3-5
in a spreadsheet model in Section 3.3.2. This model’s familiarity and simplicity
will allow us to focus on the process and the fundamental Simio concepts, rather
than on the model. We’ll then make some easy modifications to the initial
model to demonstrate additional Simio concepts. Then, in subsequent chapters
we’ll successively extend the model to incorporate additional Simio features and
simulation-modeling techniques to support more comprehensive systems. This
is a simple single-server queueing system with arrival rate λ = 48 entities/hour
and service rate µ = 60 entities/hour (Figure 4.1).
99
Remove Watermark Wondershare
PDFelement
This chapter actually describes two alternative methods to model the queuing
system using Simio. The first method uses the Facility Window and Simio
objects from the Standard Library (Section 4.2) . The second method uses
Simio Processes (Section 4.3) to construct the model at a lower level, which is
sometimes needed to model things properly or in more detail. These two methods
are not completely separate — the Standard Library objects are actually built
using Processes. The pre-built Standard-Library objects generally provide a
higher-level, more natural interface for model building, and combine animation
with the basic functionality of the objects. Custom-constructed Processes provide
a lower-level interface to Simio and are typically used for models requiring special
functionality or faster execution. In Simio, you also have access to the Processes
that comprise the Standard Library objects, but that’s a topic for a future
chapter.
The chapter starts with a tour around the Simio window and user interface
in Section 4.1. As mentioned above, Section 4.2 guides you through how to
build a model of the system in the Facility Window using the Standard Library
objects. We then experiment a little with this model, as well as introduce the
important concepts of statistically independent replications, warm-up, steady-
state vs. terminating simulations, and verify that our model is correct. Section
4.3 re-builds the first model with Simio Processes rather than objects. Section
4.4 adds context to the initial model and modifies the interarrival and service-
time distributions. Sections 4.5 and 4.6 show how to use innovative approaches
enabled by Simio for effective statistical analysis of simulation output data.
Section 4.8 describes the basic Simio animation features and adds animation to
the models. As your models start to get more interesting you will start finding
unexpected behavior. So we will end this chapter with Section 4.9 describing
the basic procedure to find and fix model problems. Though the systems being
modeled in this chapter are quite simple, after going through this material you
should be well on your way to understanding not only how to build models in
Simio, but also how to use them.
Remove Watermark Wondershare
PDFelement
4.1.1 Ribbons
Ribbons are the innovative interface components first introduced with Microsoft
TM
Office 2007 to replace the older style of menus and toolbars. Ribbons help
you quickly complete tasks through a combination of intuitive organization and
automatic adjustment of contents. Commands are organized into logical groups,
which are collected together under tabs. Each tab relates to a type of activity,
such as running a model or drawing symbols. Tabs are automatically displayed
or brought to the front based on the context of what you’re doing. For example,
Remove Watermark Wondershare
PDFelement
when you’re working with a symbol, the Symbols tab becomes prominent. Note
that which specific ribbons are displayed depends on where you are in the project
(i.e., what items are selected in the various components of the interface).
Simio includes comprehensive help available at the touch of the F1 key or the ?
icon in the upper right of the Simio window. If you prefer a printable version,
you’ll find a link to the Simio Reference Guide (a .pdf file). The help and
reference guides provide an indexed searchable resource describing basic and
advanced Simio features. For additional training opportunities you’ll also find
links to training videos and other on-line resources. The Support ribbon also
has direct links to open example projects and SimBits (covered below), and to
access Simio-related books, release and compatibility nodes, and the Simio user
forum.
Object Description
Source Generates entities of a specified type and
arrival pattern.
Sink Destroys entities that have completed
processing in the model.
Server Represents a capacitated process such as a
machine or service operation.
Combiner Combines multiple entities together with a
parent entity (e.g., a pallet).
Separator Splits a batched group of entities or makes
copies of a single entity.
Resource A generic object that can be seized and
released by other objects.
Vehicle A transporter that can follow a fixed route
or perform on-demand pickups/dropoffs.
Worker Models activities associated with people.
Can be used as a moveable object or a
transporter and can follow a shift schedule.
BasicNode Models a simple intersection between
multiple links.
TransferNode Models a complex intersection for changing
destination and travel mode.
Remove Watermark Wondershare
PDFelement
Object Description
Connector A simple zero-time travel link between two
nodes.
Path A link over which entities may
independently move at their own speeds.
TimePath A link that has a specified travel time for
all entities.
Conveyor A link that models both accumulating and
non-accu-mulating conveyor devices.
The Project Library includes the objects defined in the current project. As
such, any new object definitions created in a project will appear in the Project
Library for that project. Objects in the Project Library are defined/updated
via the Navigation Window (described below) and they are used (placed in the
Facility Window) via the Project Library. In order to simplify modeling, the
Project Library is pre-populated with a ModelEntity object. The Flow Library
includes a set of objects for modeling flow processing systems and the Extras
Library includes a set of material handling and warehouse-related objects. Refer
to the Simio Help for more information on the use of these libraries. Other
domain-specific libraries are available on the Simio User Forum and can be
accessed using the Shared Items button on the Support ribbon. The methods
for building your own objects and libraries will be discussed in Chapter 11.
slightly different set of project model tabs available, and you might select the
Definitions tab to add a state to that entity object. Then select the original
Model object in the navigation window to continue editing the main model. If
you get confused about what object you’re working with, look to the title bar at
the top of the navigation window or the highlighted bar within the navigation
window. Note that objects appearing in a library and in the Navigation Window
are often confusing to new users — just remember that objects are placed from
the library and are defined/edited from the Navigation Window. Additional
details are provided in Section 5.1.1.1.
4.1.7 SimBits
One feature you’ll surely want to exploit is the SimBits collection. SimBits are
small, well-documented models that illustrate a modeling concept or explain
how to solve a common problem. The full documentation for each can be found
in an accompanying automatically loaded .pdf file, as well as in the on-line help.
Although they can be loaded directly from the Open menu item (replacing the
currently open model), perhaps the best way to find a helpful SimBit is to look
for the SimBit button on the Support ribbon. On the target page for this button
you will find a categorized list of all of the SimBits with a filtering mechanism
that lets you quickly find and load SimBits of interest (in this case, loading
into a second copy of Simio, preserving your current workspace). SimBits are a
helpful way to learn about new modeling techniques, objects, and constructs.
dragging, you’ll see two sets of arrows called layout targets appear: a set near
the center of the window and a set near the outside of the window. For example
Figure 4.5 illustrates the layout targets just after you start dragging the tab for
a table. Dropping the table tab onto any of the arrows will cause the table to
be displayed in a new window at that location.
You can arrange the windows into vertical and horizontal tab groups by right
clicking any tab and selecting the appropriate option. You can also drag some
windows (Search, Watch, Trace, Errors, and object Consoles) outside of the
Simio application, even to another monitor, to take full advantage of your screen
real estate. If you ever regret your custom arrangement of the windows or you
lose a window (that is, it should be displayed but you can’t find it), use the Reset
button on the Project Home ribbon to restore the default window configuration.
4.2. MODEL 4-1: FIRST PROJECT USING THE STANDARD LIBRARY OBJECTS107
with the system to compare it to what standard queueing theory would predict.
Section 4.2.3 introduces the notions of statistically replicating and analyzing
the simulation output results, and how Simio helps you do that. In Section
4.2.4 we’ll talk about what might be roughly described as long-run vs. short-run
simulations, and how you might need to warm up your model if you’re interested
in how things behave in the long run. Section 4.2.5 revisits some of the same
questions raised in Section 4.2.2, specifically trying to verify that our model is
correct, but now we are armed with better tools like warm-up and statistical
analysis of simulation output data. All of our discussion here is for a situation
when we have only one scenario (system configuration) of interest; we’ll discuss
the more common goal of comparing alternative scenarios in Sections 5.5 and
9.1.1, and will introduce some additional statistical tools in those sections for
such goals.
by clicking on the Facility tab, and that the Standard Library is visible by
clicking on the Standard Library section heading in the Libraries bar on the
left; Figure 4.2 illustrates this. First, add a ModelEntity object by clicking on
the ModelEntity object in the ProjectLibrary panel, then drag and drop it onto
the Facility Window (actually, we’re dragging and dropping an instance of it
since the object definition stays in the ProjectLibrary panel). Next, click on the
Source object in the Standard Library, then drag and drop it into the Facility
Window. Similarly, click, drag, and drop an instance of each of the Server and
Sink objects onto the Facility Window. The next step is to connect the Source,
Server, and Sink objects in our model. For this example, we’ll use the standard
Connector object, to transfer entities between nodes in zero simulation time. To
use this object, click on the Connector object in the Standard Library. After
selecting the Connector, the cursor changes to a set of cross hairs. With the new
cursor, click on the Output Node of the Source object (on its right side) and
then click on the Input Node of the Server object (on its left side). This tells
Simio that entities flow (instantly, i.e., in zero simulated time) out of the Source
object and into the Server object. Follow the same process to add a connector
from the Output Node of the Server object to the Input Node of the Sink object.
Figure 4.7 shows the model with the connector in place between the Source and
Server objects.
Figure 4.7: Model 4-1 with the Source and Server objects linked by a Connector
object.
By the way, now would be a good time to save your model (“save early, save often,”
is a good motto for every simulationist). We chose the name Model_04_01.spfx
(spfx is the default file-name extension for Simio project files), following the
naming convention for our example files given in Section 3.2; all our completed
example files are available on the book’s website, as described in the Preface.
Before we continue constructing our model, we need to mention that the Standard
Library objects include several default queues. These queues are represented
Remove Watermark Wondershare
PDFelement
4.2. MODEL 4-1: FIRST PROJECT USING THE STANDARD LIBRARY OBJECTS109
by the horizontal green lines in Figure 4.7. Simio uses queues where entities
potentially wait — i.e., remain in the same logical place in the model for some
period of simulated time. Note that, technically, tokens rather than entities wait
in Simio queues, but we’ll discuss this issue in more detail in Chapter 5 and for
now it’s easier to think of entities waiting in the queues since that is what you
see in the animation. Model 4-1 includes the following queues:
• Source1 OutputBuffer.Contents — Used to store entities waiting to move
out of the Source object.
• Server1 InputBuffer.Contents — Used to store entities waiting to enter the
Server object.
• Server1 Processing.Contents — Used to store entities currently being
processed by the Server object.
• Server1 OutputBuffer.Contents — Used to store entities waiting to exit
the Server object.
• Sink1 InputBuffer.Contents — Used to store entities waiting to enter the
Sink object.
In our simple single-server queueing system in Figure 4.1, we show only a single
queue and this queue corresponds to the InputBuffer.Contents queue for the
Server1 object. The Processing.InProcess queue for the Server1 object stores the
entity that’s being processed at any point in simulated time. The other queues in
the Simio model are not used in our simple model (actually, the entities simply
move through these queues instantly, in zero simulated time).
Now that the basic structure of the model is complete, we’ll add the model
parameters to the objects. For our simple model, we need to specify probability
distributions governing the interarrival times and service times for the arriving
entities. The Source object creates arriving entities according to a specified arrival
process. We’d like a Poisson arrival process at rate λ = 48 entities per hour,
so we’ll specify that the entity interarrival times are exponentially distributed
with a mean of 1.25 minutes (a time between entities of = 60/48 corresponds
to a rate of 48/hour). In the formal Simio object model, the interarrival time
is a property of the Source object. Object properties are set and edited in the
Properties Window — select the Source object (click on the object) and the
Properties Window will be displayed on the right panel (see Figure 4.8).
The Source object’s interarrival-time distribution is set by assigning the Inter-
arrival Time property to Random.Exponential(1.25) and the Units property
to Minutes; click on the arrow just to the left of Interarrival Time to expose
the Units property and use the pull-down on the right to select Minutes. This
tells Simio that each time an entity is created, it needs to sample a random
value from an exponential distribution with mean 1.25, and to create the next
entity that far into the future for an arrival rate of λ = 60 × (1/1.25) = 48
entities/hour, as desired. The random-variate functions available via the keyword
Random are discussed further in Section 4.4. The Time Offset property (usually
Remove Watermark Wondershare
PDFelement
Figure 4.8: Setting the interarrival-time distribution for the Source object.
set to 0) determines when the initial entity is created. The other properties
associated with the Arrival Logic can be left at their defaults for now. With these
parameters, entities are created recursively for the duration of the simulation
run.
The default object name (Source1, for the first source object), can be changed by
either double-clicking on the name tag below the object with the object selected,
or through the Name property in the General properties section. Or, like most
items in Simio, you can rename by using the F2 key. Note that the General
section also includes a Description property for the object, which can be quite
useful for model documentation. You should get into the habit of including a
meaningful description for each model object because whatever you enter there
will be displayed in a tool tip popup note when you hover the mouse over that
object.
In order to complete the queueing logic for our model, we need to set up the
service process for the Server object. The Processing Time property of the Server
module is used to specify the processing times for entities. This property should
be set to Random.Exponential(1) with the Units property being Minutes. Make
sure that you adjust the Processing Time property rather than the Process Type
property (this should remain at its default value of Specific Time (the other
options for processing type will be discussed in Section 10.3). The final step
for our initial model is to tell Simio to run the model for 10 hours. To do this,
click on the Run ribbon/tab, then in the Ending Type pull-down, select the Run
Length option and enter 10 Hours. Before running our initial model, we’ll set
the running speed for the model.
The Speed Factor is used to control the speed of the interactive execution of
the model explicitly. Changing the Speed Factor to 50 (just type it into the
Speed Factor field in the Run ribbon) will speed up the run to a speed that’s
more visually appealing for this particular model. The optimal Speed Factor
for an interactive run will depend on the model and object parameters and the
individual preferences, as well as the speed of your computer, so you should
Remove Watermark Wondershare
PDFelement
4.2. MODEL 4-1: FIRST PROJECT USING THE STANDARD LIBRARY OBJECTS111
definitely experiment with the Speed Factor for each model (technically, the
Speed Factor is the amount of simulation time, in tenths of a second, between
each animation frame).
At this point, we can actually run the model by clicking on the Run icon in
the upper left of the ribbon. The model is now running in interactive mode.
As the model runs, the simulated time is displayed in the footer section of the
application, along with the percentage complete. Using the default Speed Factor,
simulation time will advance fairly slowly, but this can be changed as the model
runs. When the simulation time reaches 10 (the run length that we set), the
model run will automatically pause.
In Interactive Mode, the model results can be viewed at any time by stopping
or pausing the model and clicking on the Results tab on the tab bar. Run the
model until it reaches 10 hours and view the current results. Simio provides
several different ways to view the basic model results. Pivot Grid, and Reports
(the top two options are on the left panel — click on the corresponding icon to
switch between the views) are the most common. Figure 4.9 shows the Pivot
Grid for Model 4-1 paused at time 10 hours.
Figure 4.9: Pivot Grid report for the interactive run of Model 4-1.
Remove Watermark Wondershare
PDFelement
Note that as mentioned in the Preface, Simio uses an agile development process
with frequent minor updates, and occasional major updates. It’s thus possible
that the output values you get when you run our examples interactively may
not always exactly match the output numbers we’re showing here, which we got
as we wrote the book. This could, as noted at the end of Section 1.4, be due to
small variations across releases in low-level behavior, such as the order in which
simultaneous events are processed. Regardless of the reason for these differences,
their existence just emphasizes the need to do proper statistical design and
analysis of simulation experiments, and not just run it once to get “the answer,”
a point that we’ll make repeatedly throughout this book. The Pivot Grid format
is extremely flexible and provides a very quick method to find specific results.
If you’re not accustomed to this type of report, it can look a bit overwhelming
at first, but you’ll quickly learn to appreciate it as you begin to work with it.
The Pivot Grid results can also be easily exported to a CSV (comma-separated
values) text file, which can be imported into Excel and other applications. Each
row in the default Pivot Grid includes an output value based on:
• Object Type
• Object Name
• Data Source
• Category
• Data Item
• Statistic
So, in Figure 4.9, the Average (Statistic) value for the TimeInSystem (Data Item)
of the DefaultEntity (Object Name) of the ModelEntity type (Object Type) is
0.0613 hours (0.0613 hours × 60 minutes/hour = 3.6780 minutes. Note that
units for the Pivot Grid times, lengths, and rates can be set using the Time Units,
Length Units, and Rate Units items in the Pivot Grid ribbon; if you switch to
Minutes the Average TimeInSystem is 3.6753, so our hand-calculated value of
3.6780 minutes has a little round-off error in it. Further, the TimeInSystem data
item belongs to the FlowTime Category and since the value is based on entities
(dynamic objects), the Data Source is the set of Dynamic Objects.
If you’re looking at this on your computer (as you should be!), scrolling through
the Pivot Grid reveals a lot of output performance measures even from a small
model like this. For instance, just three rows below the Average TimeInSystem
of 0.0613 hours, we see under the Throughput Category that a total of 470
entities were created (i.e., entered the model through the Source object), and in
the next row that 470 entities were destroyed (i.e., exited the model through the
Sink object). Though not always true, in this particular run of this model all of
the 470 entities that arrived also exited during the 10 hours, so that at the end
of the simulation there were no entities present. You can confirm this by looking
at the animation when it’s paused at the 10-hour end time. (Change the run
time to, say, 9 hours, and then 11 hours, to see that things don’t always end up
Remove Watermark Wondershare
PDFelement
4.2. MODEL 4-1: FIRST PROJECT USING THE STANDARD LIBRARY OBJECTS113
this way, both by looking at the final animation as well as the NumberCreated
and NumberDestroyed in the Throughput Category of the Pivot Grid). So in
our 10-hour run, the output value of 0.0613 hours for average time in system is
just the simple average of these 470 entities’ individual times in system.
While you’re playing around with the simulation run length, try changing it to
8 minutes and compare some of the Pivot Grid results with what we got from
the manual simulation in Section 3.3.1 given in Figure 3.8. Now we can confess
that those “magical” interarrival and service times for that manual simulation
were generated in this Simio run, and we recorded them via the Model Trace
capability.
The Pivot Grid supports three basic types of data manipulation:
• Grouping: Dragging column headings to different relative locations will
change the grouping of the data.
• Sorting: Clicking on an individual column heading will cause the data to
be sorted based on that column.
• Filtering: Hovering the mouse over the upper right corner of a column
heading will expose a funnel-shaped icon. Clicking on this icon will bring
up a dialog that supports data filtering. If a filter is applied to any column,
the funnel icon is displayed (no mouse hover required). Filtering the data
allows you quickly to view the specific data in which you’re interested
regardless of the amount of data included in the output.
Pivot Grids also allow the user to store multiple views of the filtered, sorted, and
grouped Pivot Grids. Views can be quite useful if you are monitoring a specific
set of performance metrics. The Simio documentation section on Pivot Grids
includes much more detail about how to use these specific capabilities. The
Pivot Grid format is extremely useful for finding information when the output
includes many rows.
The Reports format gives the interactive run results in a formatted, detailed
report format, suitable for printing, exporting to other file formats, or emailing
(the formatting, printing, and exporting options are available from the Print
Preview tab on the ribbon). Figure 4.10 shows the Reports format with the
Print Preview tab open on the ribbon. Scrolling down to the TimeInSystem -
Average (Hours) heading on the left will show a Value of 0.06126, the same
(up to roundoff) as we saw for this output performance measure in the Pivot
Grid in Figure 4.9.
4.2. MODEL 4-1: FIRST PROJECT USING THE STANDARD LIBRARY OBJECTS115
Note that for any but the simplest models, this type of exact analysis will not be
possible (this is why we use simulation, in fact). Table 4.2 gives the steady-state
queueing results and the simulation results taken from the Pivot Table in Figure
4.9.
You’ll immediately notice that the numbers in the Queueing column are not equal
to the numbers in the Model column, as we might expect. Before discussing the
possible reasons for the differences, we first need to discuss one more important
and sometimes-concerning issue. If you return to the Facility Window (click on
the Facility tab just below the ribbon), reset the model (click on the Reset
icon in the Run ribbon), re-run the model, allow it to run until it pauses at time
10 hours, and view the Pivot Grid, you’ll notice that the results are identical to
those from the previous run (displayed in Figure 4.9). If you repeat the process
again and again, you’ll always get the same output values. To most people new
to simulation, and as mentioned in Section 3.1.3, this seems a bit odd given that
we’re supposed to be using random values for the entity interarrival and service
times in the model. This illustrates the following critical points about computer
simulation:
1. The random numbers used are not truly random in the sense of being
unpredictable, as mentioned in Section 3.1.3 and discussed in Section
6.3 — instead they are pseudo-random, which, in our context, means that
the precise sequence of generated numbers is deterministic (among other
things).
2. Through the random-variate-generation process discussed in Section 6.4,
some simulation software can control the pseudo-random number generation
and we can exploit this control to our advantage.
The concept that the “supposedly random numbers” are actually predictable
can initially cause great angst for new simulationists (that’s what you’re now
becoming). However, for simulation, this predictability is a good thing. Not only
does it make grading simulation homework easier (important to the authors),
but (more seriously) it’s also useful during model debugging. For example, when
you make a change in the model that should have a predictable effect on the
Remove Watermark Wondershare
PDFelement
simulation output, it’s very convenient to be able to use the same “random”
inputs for the same purposes in the simulation, so that any changes (or lack
thereof) in output can be directly attributable to the model changes, rather
than to different random numbers. As you get further into modeling, you’ll
find yourself spending significant time debugging your models so this behavior
will prove useful to you (see Section 4.9 for detailed coverage of the debugging
process and Simio’s debugging tools). In addition, this predictability can be used
to reduce the required simulation run time through a variety of techniques called
variance reduction, which are discussed in general simulation texts (such as
(Banks et al., 2005) or (Law, 2015)). Simio’s default behavior is to use the same
sequence of random variates (draws or observations on model-driving inputs like
interarrival and service times) each time a model is run. As a result, running,
resetting, and re-running a model will yield identical results unless the model is
explicitly coded to behave otherwise.
Now we can return to the question of why our initial simulation results are not
equal to our queueing results in Table 4.2. There are three possible explanations
for this mismatch:
1. Our Simio model is wrong, i.e., we have an error somewhere in the model
itself.
2. Our expectation is wrong, i.e., our assumption that the simulation results
should match the queueing results is wrong.
3. Sampling error, i.e., the simulation model results match the expectation in
a probabilistic sense, but we either haven’t run the model long enough, or
for enough replications (separate independent runs starting from the same
state but using separate random numbers), or are interpreting the results
incorrectly.
In fact, if the results are not equal when comparing simulation results to our
expectation, it’s always one or more of these possibilities, regardless of the model.
In our case, we’ll see that our expectation is wrong, and that we have not run
the model long enough. Remember, the queueing-theory results are for long-run
steady-state, i.e., after the system/model has run for an essentially infinite
amount of time. But we ran for only 10 hours, which for this model is evidently
not sufficiently close to infinity. Nor have we made enough replications (items 2
and 3 from above). Developing expectations, comparing the expectations to the
simulation-model results, and iterating until these converge is a very important
component of model verification and validation (we’ll return to this topic in
Section 4.2.5).
4.2. MODEL 4-1: FIRST PROJECT USING THE STANDARD LIBRARY OBJECTS117
interarrival and service times in our case). For the time being, assume that the
starting and ending conditions are dictated by the starting and ending simulation
time (although as we’ll see later, there are other possible kinds of starting and
ending conditions). So, starting our model empty and idle, and running it
for 10 hours, constitutes a replication. Resetting and re-running the model
constitutes running the same replication again, using the same input random
numbers and thus random variates, so obviously yielding the same results (as
demonstrated above). In order to run a different replication, we need a different,
separate, non-overlapping set of input random numbers and random variates.
Fortunately, Simio handles this process for us transparently, but we can’t run
multiple replications in Interactive mode. Instead, we have to create and run a
Simio Experiment.
Simio Experiments allow us to run our model for a user-specified number of
replications, where Simio guarantees that the generated random variates are
such that the replications are statistically independent from one another, since
the underlying random numbers do not overlap from one replication to the next.
This guarantee of independence is critical for the required statistical analysis
we’ll do. To set up an experiment, go to the Project Home ribbon and click
on the New Experiment icon. Simio will create a new experiment and switch
to the Experiment Design view as shown in Figure 4.11 after we changed both
Replications Required near the top, and Default Replications on the right, to 5
from their default values of 10.
To run the experiment, select the row corresponding to Scenario1 (the default
name) and click the Run icon (the one with two white right arrows in it in the
Experiment window, not the one with one right arrow in it in the Model window).
After Simio runs the five replications, select the Pivot Grid report (shown in
Figure 4.12).
Compared to the Pivot Grid we saw while running in Interactive Mode (Figure
4.9), we see the additional results columns for Minimum, Maximum, and Half
Width (of 95% confidence intervals on the expected value, with the Confidence
Level being editable in the Experiment Design Properties), reflecting the fact
that we now have five independent observations of each output statistic.
To understand what these cross-replication output statistics are, focus on the
entity TimeInSystem values in rows 3-5. For example:
• The 0.0762 for the Average of Average (Hours) TimeInSystem (yes, we
meant to say “Average” twice there) is the average of five numbers, each of
which is a within-replication average time in system (and the first of those
five numbers is 0.0613 from the single-replication Pivot Grid in Figure
4.9. The 95% confidence interval 0.0762 ± 0.0395, or [0.0367, 0.1157] (in
hours), contains, with 95% confidence , the expected within-replication
average time in system, which you can think of as the result of making
an infinite number of replications (not just five) of this model, each of
duration 10 hours, and averaging all those within-replication average times
Remove Watermark Wondershare
PDFelement
Figure 4.11: Initial experiment design for running five replications of a model.
Remove Watermark Wondershare
PDFelement
4.2. MODEL 4-1: FIRST PROJECT USING THE STANDARD LIBRARY OBJECTS119
Figure 4.12: Experiment Pivot Grid for the five replications of the model.
Remove Watermark Wondershare
PDFelement
Since our model inputs (entity interarrival and service times) are random, the
simulation-output performance metrics (simulation-based estimates of ρ, L, Lq ,
W , and Wq , which we could respectively denote as ρb, L,
b Lcq , W
c , and W
cq ) are
random variables . The queueing analysis gives us the exact steady-state values
Remove Watermark Wondershare
PDFelement
4.2. MODEL 4-1: FIRST PROJECT USING THE STANDARD LIBRARY OBJECTS121
Based on five replications, we’re 95% confident that the true mean (expected
value or population mean) of L b is between 1.456 and 5.862, while based on
50 replications, we’re 95% confident that the true mean is between 3.361 and
4.227. (Strictly speaking, the interpretation is that 95% of confidence intervals
formed in this way, from replicating, will cover the unknown true mean.) So the
Remove Watermark Wondershare
PDFelement
So, the first answer as to why our simulation results shown in Table 4.2 don’t
match the queueing results is that we were using the results from a singe
replication of our model. This is akin to rolling a die, observing a 4 (or any other
single value) and declaring that value to be the expected value over a large number
of rolls. Clearly this would be a poor estimate, regardless of the individual roll.
Unfortunately, using results from a single replication is quite common for new
simulationists, despite the significant risk. Our general approach going forward
will be to run multiple replications and to use the sample averages as estimates
of the means of the output statistics, and to use the 95% confidence-interval
half-widths to help determine the appropriate number of replications if we’re
interested in estimating the true mean. So, instead of simply using the averages
(point estimates), we’ll also use the confidence intervals (interval estimates)
when analyzing results. The standard Simio Pivot Grid report for experiments
(see Figure 4.12) automatically supports this approach by providing the sample
average and 95% confidence-interval half-widths for all output statistics.
The second reason for the mismatch between our expectations and the model
results is a bit more subtle and involves the need for a warm up period for our
model. We will discuss that in the next section.
Remove Watermark Wondershare
PDFelement
4.2. MODEL 4-1: FIRST PROJECT USING THE STANDARD LIBRARY OBJECTS123
For the 2, 5, 10, and 20 hour runs, it seems fairly certain that the estimates
are still biased downwards with respect to steady state (the steady-state value
is L = 4.000). At 30 hours, the mean is still a little low, but the confidence
interval covers 4.000, so we’re not sure. Running more replications would likely
reduce the width of the confidence interval and 4.000 may be outside it so that
we’d conclude that the bias is still significant with a 30-hour run, but we’re
still not sure. It’s also possible that running additional replications wouldn’t
provide the evidence that the startup bias is significant — such is the nature of
Remove Watermark Wondershare
PDFelement
It seems that the warm-up period has helped reduce or eliminate the startup
bias in all cases and we have not increased the overall run time beyond 30
hours. So, we have improved our estimates without increasing the computational
requirements by using the warm-up period. At this point, the natural question
is “How long should the warm-up period be?” In general, it’s not at all easy to
determine even approximately when a model reaches steady state. One heuristic
but direct approach is to insert dynamic animated Status Plots in the Simio
model’s Facility Window (in the Model’s Facility Window, select the Animation
ribbon under Facility Tools — see Chapter 8 for animation details) and just make
a judgment about when they appear to stop trending systematically; however,
these can be quite noisy" (i.e., variable) since they depict only one replication at
a time during the animation. We’ll simply observe the following about specifying
warm-up periods:
• If the warm-up period is too short, the results will still have startup bias
(this is potentially bad); and
• If the warm-up period is too long, our sampling error will be higher than
necessary (as we increase the warm-up period length, we decrease the
amount of data that we actually record).
Remove Watermark Wondershare
PDFelement
4.2. MODEL 4-1: FIRST PROJECT USING THE STANDARD LIBRARY OBJECTS125
As a result, the “safest” approach is to make the warm-up period long and
increase the overall run length and number of replications in order to achieve
acceptable levels of sampling error (measured by the half-widths of the confidence
intervals). Using this method we may expend a bit more computer time than
is absolutely necessary, but computer time is cheap these days (and bias is
insidiously dangerous since in practice you can’t measure it)!
Of course, the discussion of warm-up in the previous paragraphs assumes that
you actually want steady-state values; but maybe you don’t. It’s certainly
possible (and common) that you’re instead interested in the “short-run” system
behavior during the transient period; for example, same-day ticket sales for a
sporting event open up (with an empty and idle system) and stop at certain
pre-determined times, so there is no steady state at all of any relevance. In these
cases, often called terminating simulations, we simply ignore the warm-up
period in the experimentation (i.e., default it to 0), and what the simulation
produces will be an unbiased view of the system’s behavior during the time
period of interest, and relative to the initial conditions in the model.
The choice of whether the steady-state goal or the terminating goal is appropriate
is usually a matter of what your study’s intent is, rather than a matter of what
the model structure may be. We will say, though, that terminating simulations
are much easier to set up, run, and analyze, since the starting and stopping
rules for each replication are just part of the model itself, and not up to analysts’
judgment; the only real issue is how many replications you need to make in order
to achieve acceptable statistical precision in your results.
Table 4.5: Comparison of the queueing analysis and our final exper-
iment.
2. We developed and ran the model and compared the model results to our
expectations (Table 4.2).
3. Since the results didn’t match, we considered the three possible explana-
tions:
It’s a good idea to try to follow this basic verification process for all simulation
projects. Although we’ll generally not be able to compute the exact results that
we’re looking for (otherwise, why would we need simulation?), we can always
develop some expectations, even if they’re based on an abstract version of the
system being modeled. We can then use these expectations and the process
outlined above to converge to a model (and set of expectations) about which
we’re highly confident.
Now that we’ve covered the basics of model verification and experimentation in
Simio, we’ll switch gears and discuss some additional Simio modeling concepts
for the remainder of this chapter. However, we’ll definitely revisit these basic
issues throughout the book.
Remove Watermark Wondershare
PDFelement
entities and the “Processing time” is the time that an entity is delayed for
processing. The Number In System tracks the number of entities in the system
at any point in simulated time and the marking and recording of the arrival
time and time in system tracks the times that all entities spend in the system.
For our single-server queueing model, we simply set c = 1 and s = 1 (for all
entities). So our single-server model is just an implementation of the basic
seize-delay-release logic illustrated in Figure 4.13. Creating this model using
processes is a little bit more involved than it was using Standard Library Objects,
but it’s instructive to go through the model development and see the mechanisms
for collecting user-defined statistics. Figure 4.14 shows the completed Simio
process.
Type is Fixed and that the Capacity is 1 (these are the defaults). Note
the object Name in the General section (the default is Resource1).
3. Make sure that the Model is highlighted in the Navigation Window and
switch to the Definitions Window by clicking on the Definitions tab and
choose the States section by clicking on the corresponding panel icon on
the left. This prepares us to add a state to the model.
4. Create a new discrete (integer) state by clicking on the Integer icon in
the States ribbon. Change the default Name property of IntegerState1 for
the state to WIP. Discrete States are used to record numerical values. In
this case, we’re creating a place to store the current number of entities in
the model by creating an Integer Discrete State for the model (the Number
In System from Figure 4.13).
5. Switch to the Elements section by clicking on the panel icon and create
a Timer element by clicking on the Timer icon in the Elements ribbon
(see Figure 4.15). The Timer element will be used to trigger entity ar-
rivals (the loop-back arc in Figure 4.13). In order to have Poisson arrivals
at the rate of λ = 48 entities/hour, or equivalently exponential interar-
rivals with mean 1/0.8 = 1.25 minutes, set the Time Interval property
to Random.Exponential(1.25) and make sure that the Units are set to
Minutes.
10. Add an Assign step by dragging the Assign step from the Common Steps
panel to the process, placing the step just to the right of the Begin indicator
in the process. Set the State Variable Name property to WIP and the New
Value property to WIP + 1, indicating that when the event occurs, we
want to increment the value of the state variable to reflect the fact that an
entity has arrived to the system (the “Increment” in Figure 4.13).
11. Next, add the Seize step to the process just to the right of the Assign step.
To indicate that Resource1 should be seized by the arriving entity, click the
... button on the right and select the Seizes property in the Basic Logic
section, click Add, and then indicate that the specific resource Resource1
should be seized (see Figure 4.17).
12. Add the Delay step immediately after the Seize step and set the Delay
Time property to Random.Exponential(1) minutes to indicate that the
entity delays should be exponentially distributed with mean 1 minute
(equivalent to the original service rate of 60/hour).
13. Add the Release step immediately after the Delay step and set the Releases
property to Resource1.
14. Add another Assign step next to the Release step and set the State Variable
Remove Watermark Wondershare
PDFelement
Figure 4.17: Setting the Seize properties to indicate that Resource1 should be
seized.
Name property to WIP and the New Value property to WIP - 1, indicating
that when the entity releases the resource, we want to decrement the value
of the state variable to reflect the fact that an entity has left the system.
15. Add a Tally step and set the TallyStatisticName property to
TimeInSystem (the Tally Statistic was created earlier so is avail-
able on the pull-down there), and set the Value property to TimeNow -
Token.TimeCreated to indicate that the recorded value should be the
current simulation time minus the time that the current token was created.
This time interval represents the time that the current entity spent in the
system. The Tally step implements the Record function shown in Figure
4.13. Note that we used the token state Token.TimeCreated instead of
marking the arrival time as shown in Figure 4.13.
16. Finally, switch back to the Facility Window and set the run parameters
(e.g., set the Ending Type to a Fixed run length of 1000 hours).
Note that we’ll discuss the details of States, Properties, Tokens, and other
components of the Simio Framework in Chapter 5.
To test the model, create an Experiment by clicking on the New Experiment
icon in the Project Home ribbon. Figure 4.18 shows the Pivot Grid results
for a run of 10 replications of the model using a 500 hour warm-up period for
each replication. Notice that the report includes the UserSpecified category
including the CurrentWIP and TimeInSystem statistics. Unlike the ModelEntity
statistics NumberInSystem and TimeInSystem that Simio collected automatically
in the Standard Library object model from Section 4.2, we explicitly told Simio
to collect these statistics in the process model. Understanding user-specified
statistics is important, as it’s very likely that you’ll want more than the default
statistics as your models become larger and more complex. The CurrentWIP
statistic is an example of a time-dependent statistic. Here, we defined a Simio
state (step 4), used the process logic to update the value of the state when
necessary (step 10 to increment and step 14 to decrement), and told Simio
to keep track of the value as it evolves over simulated time and to report the
summary statistics (of L,b in this case — step 4). The TimeInSystem statistic is
Remove Watermark Wondershare
PDFelement
Another thing to note about our processes model is that it runs significantly
faster than the corresponding Standard Library objects model (to see this,
simply increase the run length for both models and run them one after another).
The speed difference is due to the overhead associated with the additional
functionality provided by the Standard Library objects (such as automatic
collection of statistics, animation, collision detection on paths, resource failures,
etc.).
As mentioned above, most Simio models that you build will use the Standard
Library objects and it’s unlikely that you’ll build complete models using only
Simio processes. However, processes are fundamental to Simio and it is important
to understand how they work. We’ll revisit this topic in more detail in Section
5.1.4, but for now we’ll return to our initial model using the Standard Library
objects.
for Section 4.8 is to add some context to the models so that they’ll more closely
represent the types of “real” systems that simulation is used to analyze. We’ll
continue to enhance the models over the remaining chapters in this Part of the
book as we continue to describe the general concepts of simulation modeling
and explore the features of Simio. In Models 4-1 and 4-2 we used observations
from the exponential distribution for entity inter-arrival and service times. We
did this so that we could exploit the mathematical “niceness” of the resulting
M/M/1 queueing model in order to demonstrate the basics of randomness in
simulation. However, in many modeling situations, entity inter-arrivals and
service times don’t follow nice exponential distributions. Simio and most other
simulation packages can sample from a wide variety of distributions to support
general modeling. Models 4-3 and 4-4 will demonstrate the use of a triangular
distribution for the service times, and the models in Chapter 5 will demonstrate
the use of many of the other standard distributions. Section 6.1 discusses how to
specify such input probability distributions in practice so that your simulation
model will validly represent the reality you’re modeling.
Model 4-3 models the automated teller machine (ATM) shown in Figure 4.19.
Customers enter through the door marked Entrance, walk to the ATM, use the
ATM, and walk to the door marked Exit and leave. For this model, we’ll assume
that the room containing the ATM is large enough to handle any number of
customers waiting to use the ATM (this will make our model a bit easier, but
is certainly not required and we’ll revisit the use of limited-capacity queues
in future chapters). With this assumption, we basically have a single-server
queueing model similar to the one shown in Figure 4.1. As such, we’ll start with
Model 4-1 and modify the model to get our ATM model (be sure to use the Save
Project As option to save Model 4-3 initially so that you don’t over-write your
file for Model 4-1). The completed ATM model (Model 4-3) is shown in Figure
4.20.
3. Change the Connector and entity objects so that the model includes the
customer walk time; and
Updating the object names doesn’t affect the model’s running characteristics
or performance, but naming the objects can greatly improve model readability
(especially for large or complicated models). As such, you should get into the
habit of naming objects and adding meaningful descriptions using the Description
property. Renaming objects can be done by either selecting the object, hitting
the F2 key, and typing the new name; or by editing the Name property for the
object. Rearranging the model to make it look like the system being modeled is
very easy — Simio maintains the connections between objects as you drag the
object around the model. Note that in addition to moving objects, you can also
move the individual object input and output nodes.
In our initial queueing model (Model 4-1) we assumed that entities simply
“appeared’ ’ at the server upon arrival. The Simio Connector object supported
this type of entity transfer. This is clearly not the case in our ATM model
where customers walk from the entrance to the ATM and from the ATM to
the exit (most models of”real" systems involves some type of similar entity
movement). Fortunately, Simio provides several objects from the Standard
Remove Watermark Wondershare
PDFelement
by lots of relatively small values and a few extremely large values, since the
mode of its density function is zero. Given that all customers must insert
their ATM card, correctly enter their personal identification number (PIN),
and select their transaction, and that the number of ATM transaction types
is generally limited, a bounded distribution is likely a better choice. We’ll
use a triangular distribution with parameters 0.25, 1.00, and 1.75 minutes.
Determining the appropriate distribution(s) to use is part of input analysis, which
is covered in Section 6.1. For now, we’ll assume that the given distributions
are appropriate. To change the processing-time distribution, simply change the
Processing Time property to Random.Triangular(0.25, 1, 1.75) and leave
the Units property as Minutes. By using the Random keyword, we can sample
statistically independent observations from some 19 common distributions (as
of the writing of this book) along with the continuous and discrete empirical
distributions for cases where none of the standard distributions provides an
adequate fit. These distributions, their required parameters, and plots of their
density or probability-mass functions are discussed in detail in the “Distributions’ ’
subsection of the”Expressions Editor, Functions and Distributions" section in
the “Modeling in Simio” part of the Simio Reference Guide. The computational
methods that Simio uses to generate random numbers and random variates are
discussed in Sections 6.3 and 6.4.
Now that we have completed Model 4-3, we must verify our model as discussed
in Section 4.2.5. As noted, the verification process involves developing a set
of expectations, developing and running the model, and making sure that the
model results match our expectations. When there’s a mismatch between our
expectations and the model results, we must find and fix the problems with
the model, the expectations, or both. For Model 4-1, the process of developing
expectations was fairly simple — we were modeling an M/M/1 queueing system
so we could calculate the exact values for the performance metrics. The process
isn’t quite so simple for Model 4-3, as we no longer have exponential processing
times, and we’ve added entity-transfer times between the arrival and service, and
between the service and the departure. Moreover, these two modifications will
tend to counteract each other in terms of the queueing metrics. More specifically,
we’ve reduced the variation in the processing times, so we’d expect the numbers
of entities in system and in the queue as well as the time in system to go down
(relative to Model 4-1), but we’ve also added the entity-transfer times, so we’d
expect the number of entities in the system and the time that entities spend in
the system to go up. As such, we don’t have a set of expectations that we can
test. This will be the case quite often as we develop more complex models. Yet
we’re still faced with the need for model verification.
One strategy is to develop a modified model for which we can easily develop
a set of expectations and to use this modified model during verification. This
is the approach we’ll take with Model 4-3. There are two natural choices for
modifying our model: Set the Entity Transfer Times to 0 and use an M/G/1
queueing approximation (as described in Chapter 2), or change the processing-
time distribution to exponential. We chose the latter option and changed the
Remove Watermark Wondershare
PDFelement
These results appear to match our expectations (we could run each replica-
tion longer or run additional replications if we were concerned with the minor
deviations between the average values and our expectations, but we’ll leave
this to you). So if we assume that we have appropriately verified the modified
model, the only way that Model 4-3 wouldn’t be similarly verified is if either we
mistyped the Processing Time property, or if Simio’s implementation of either
the random-number generator or Triangular random-variate generator doesn’t
generate valid values. At this point we’ll make sure that we’ve entered the prop-
erty correctly, and we’ll assume that Simio’s random-number and random-variate
generators work. Table 4.7 gives the results of our experiment for Model 4-3
(500 replications, 30 hours run length, 20 hours warm-up). As expected, the
number of entities in the queue and the entities’ time in system have both gone
down (this was expected since we’ve reduced the variation in the service time).
It’s worth reiterating a point we made in Section 4.2.5: We can’t (in general)
prove that a model is verified. Instead, we can only collect evidence until we’re
convinced (possibly finding and fixing errors in the process).
Figure 4.21: SMORE plot components (from the Simio Reference Guide).
Figure 4.22: Defining the experiment Response for average time in system in
Model 4-3.
Figure 4.23: Using the Simio expression builder for the average-time-in-system
Response for a SMORE plot.
Remove Watermark Wondershare
PDFelement
on it; note that that gets copied up into the expression field. Next, type a
period just to the right of ATMCustomer in the expression field, and notice that
another list drops down with valid possibilities for what comes next. In this
case we are looking for a statistic for the entire population of ATMCustomer
entities, not just a particular entity, so double-click on Population. Again you
are provided a list of choices; double-click on TimeInSystem at the bottom of
the list (since that’s what we want to know about our ATMCustomer entities).
If at any point you lose your drop-down list, just type the down arrow again. As
before, type a period on the right of the expression that’s gradually getting built
in the field, and double-click on Average in the list that appears (since we want
the average time in system of ATMCustomer entities, rather than the maximum
or minimum — though the latter two would be valid choices if you wanted to
know about them rather than the average). That’s the end of it, as you can
verify by trying another period and down arrow but nothing happens, so click
on the green check mark on the right to establish this as your expression.
You can add more Responses in this way, repeatedly clicking on the Add Response
icon and filling in the Properties as above, and when viewing the SMORE plots
you can rotate among them via a drop-down showing the Names you chose for
them. Go ahead and add two more: the first with Name = MaxQueueLength
and Expression = ATM1.AllocationQueue.MaximumNumberWaiting, and
the second with Name = ResourceUtilization and Expression =
ATM1.ResourceState.PercentTime(1). We invite you to poke through
the expression builder to discover these, and in particular the (1) in the last one
(note that as you hover over selections in the drop-downs from the expression
builder, helpful notes pop up, as in Figure 4.23, describing what the entries are,
including the (1)). The percents desired for the Lower and Upper Percentiles,
and the Confidence Level for the confidence intervals can be set using the
corresponding experiment properties (see Figure 4.24); by default, the lower and
upper percentiles are set for 25% and 75% (i.e., the lower and upper quartiles)
as in traditional box plots, though you may want to spread them out more than
that since the “box” to which your eye is drawn contains the results from only
the middle half of the replications in the default traditional settings, and maybe
you’d like your eye to be drawn to something that represents more than just
half (e.g., setting them at 10% and 90% would result in a box containing 80% of
the replications’ summary results).
To view your SMORE plots, select the Response Results tab in the Experiment
window. Figure 4.25 shows the SMORE plot for the average time in system from
a 500-replication run of Model 4-3 described above (30-hour run length, 20-hour
warm-up on each replication), with the Confidence Intervals and Histogram
showing, but not the individual replication-by-replication observations. We left
the percentiles at their defaults of 75% for upper and 25% for lower. The Rotate
Plot button allows you to view the plot horizontally rather than vertically, if
you prefer. The numerical values used to generate the SMORE plot, like the
confidence-interval endpoints, are also available by clicking on the Raw Data tab
at the bottom of the SMORE plot window, so you can see what they actually
Remove Watermark Wondershare
PDFelement
are rather than eyeballing them from the graph. We see from Figure 4.25 that
the expected average time in system is just under 0.058 hour (3.5 minutes), and
the median is a bit lower, consistent with the histogram shape’s being skewed to
the right. Further, the upper end of the box plot (75th percentile) is about 0.064
hour (3.8 minutes), so there’s a 25% chance that the average time in system
over a replication will be more than this. And the confidence-intervals seem
reasonably tight, indicating that the 500 replications we made are enough to
form reasonably precise conclusions.
Figure 4.26 shows the SMORE plots (with the same elements showing) for the
maximum queue length; we temporarily moved the Upper Percentile from its
default 75% up to 90%. Since this is for the maximum (not average) queue
length across each replication, this tells us how much space we might need to
hold this queue over a whole replication, and we see that if we provide space
for 14 or 15 people in the ATM lobby, we’ll always (remember, we’re looking at
the maximum queue length) have room to hold the queue in about 90% of the
replications. Play around a bit with the Upper Percentile and Lower Percentile
settings in the Experiment Design window; of course, as these percentiles move
out toward the extreme edges of 0% and 100%, the edges of the box move out too,
but what’s interesting is that the Confidence Intervals on them become wider,
i.e., less precise. This is because these more extreme percentiles are inherently
more variable, being based on only the paucity of points out in the tails, and are
thus more difficult to estimate, so the wider confidence intervals keep you honest
about what you know (or, more to the point, what you don’t know) concerning
where the true underlying percentiles really are.
The distribution of the observed server utilization in Figure 4.27 shows that
it will be between 77% and 83% about half the time, which agrees with the
Remove Watermark Wondershare
PDFelement
Figure 4.25: SMORE plot for average time in system in Model 4-3.
Remove Watermark Wondershare
PDFelement
Figure 4.26: SMORE plot for maximum queue length in system in Model 4-3.
Remove Watermark Wondershare
PDFelement
(the expected value of a triangular distribution with parameters min, mode, max
is (min + mode + max)/3, as given in the Simio Reference Guide). However,
there’s a chance that the utilization could be as heavy as 90% since the histogram
extends up that high (the maximum utilization across the 500 replications was
90.87%, as you can see in the Raw Data tab at the bottom).
the upper and lower percentile values to get a feeling for the variability associated
with the response. We can also use the histogram to get an idea about the
distribution shape of the response (e.g., in Figures 4.25-4.27 it’s apparent that the
distributions of average time in system and maximum queue length are skewed
right or high, but the distribution of utilizations is fairly symmetric). As we’ll
see in Chapter 5, SMORE plots are quite useful to see what the differences might
be across multiple alternative scenarios in an output performance measure, not
only in terms of just their means, but also their relative spread and distribution.
For example, in the 500 replications we used to make the SMORE plots in Section
4.5, we exported the data and extracted the 500 average times in system to one
column in an Excel spreadsheet, and the 500 utilizations in a second column.
Thus, in each of the 500 rows, the first-column value is the average time in
system on that replication, and the second-column value is the server utilization
in that same replication. We then used the StatTools statistical-analysis add-in
to produce the scatterplot and correlation in Figure 4.28.
Figure 4.28: StatTools scatterplot of average time in system vs. server utilization
in Model 4-3.
We see that there’s some tendency for average time in system to be higher when
the server utilization is higher, but there are plenty of exceptions to this since
there is a lot of random “noise” in these results. We also used the built-in
Excel Chart Tools to superpose a linear regression line, and show its equation
and R2 value, confirming the positive relationship between average time in
system and server utilization, with about 45% of the variation in average time
in system’s being explained by variation in server utilization. This is just one
very small example of what you can do by exporting the Simio results to a CSV
file, extracting from it appropriately (maybe using custom macros or a scripting
language), and then reading your simulation output data into powerful statistical
packages to learn a lot about your models’ behavior and relationships.
and we will only demonstrate a simple case here. Additional feature descriptions
and details are available in the Simio Help and SimBits.
For this example, we will use Model 4-3 and will log the ATM resource usage
and create a related dashboard report. First we will tell Simio to log the resource
usages for the ATM server resource. The steps to do this are as follows:
1. Turn on interactive logging from the Advanced Options item on the
Run ribbon.
2. Turn on resource usage logging for the ATM server object. To do this,
select the ATM object instance, expand the Advanced Options resource
group and set the Log Resource Usage property to True.
3. Reset and run the model in fast-forward mode.
4. Navigate to the Logs section of the Results tab and select the Resource
Usage Log (if it is not already selected). Figure 4.29 shows a portion of
the the Resource Usage Log view for the newly created log.
The resource usage log records every time the specified resource is “used” and
specifies the entity, the start time, the end time, and duration of the usage. Now
that the individual resource usages are logged, we will create a simple dashboard
report that plots the usage durations over the simulation time. The steps are as
follows:
1. Select the Dashboard Reports section of the Results tab, click on the
Create item from the Dashboards ribbon, and enter a name for your
dashboard in the Add Dashboard dialog box. Figure 4.30 shows the initial
dialog box for the new dashboard. Select the Resource Usage Log from
the Data Source drop-box.
Remove Watermark Wondershare
PDFelement
Figure 4.30: Initial dialog box for the new dashboard report.
Remove Watermark Wondershare
PDFelement
2. Click on the Chart option from the Chart Tools/Home ribbon to create
a new chart. Figure 4.31 shows the the newly created chart in the new
dashboard report. From here, we customize the chart by dragging items
from the Resource Usage Log and dropping them on the DATA ITEMS
components.
3. Drag the Duration (Hours) item and drop it on the Values (Pane 1) data
item.
4. Click on the bar chart item just to the right of the data item and change
the chart type to a line plot.
5. Drag the Start Time item and drop it on the Arguments data item.
6. Open the drop-box for the data source and select the Date-Hour-Minute
option from the list. Figure 4.32 shows the the completed resource usage
chart. The chart plots the resource usage durations by the start time of
the usages.
7. Click the Save item on the ribbon to save the newly created dashboard.
As mentioned, Simio’s logging and dashboard capabilities are extensive and
you should experiment with these features and have a look at the Simio Help
Remove Watermark Wondershare
PDFelement
Let’s enhance our animation by modifying Model 4-3 into what we’ll call Model
4-4. Of course, you should start by saving Model_04_03.spfx to a file of a
Remove Watermark Wondershare
PDFelement
The entire library consists of over 300 symbols organized into 27 categories.
To make it easier to find a particular symbol, three filters are supplied at the
Remove Watermark Wondershare
PDFelement
bottom: Domain, Type, and Action. You can use any combination of these
filters to narrow the choices to what you are looking for. For example, let’s use
the Type filter and check only the People option, resulting in a list of all the
People in the library. Near the top you will see a Library People category. If you
hover the mouse (don’t click yet) over any symbol, you’ll see an enlarged view
to assist you with selection. Click on one of the “Female” symbols to select it
and apply it as the new symbol to use for your highlighted object — the entity.
The entity in your model should now look similar to that in Figure 4.35. Note
that under the People folder there is an folder named Animated that contains
symbols of people with built-in animation like Walking, Running, and Talking.
Using these provides even more realistic animation, but that is probably overkill
for our little ATM model.
Figure 4.35: Model 4-4 with woman and ATM symbols in 2D view.
You may notice that Figure 4.35 also contains a symbol for an ATM machine.
Unfortunately this was not one of the symbols in the library. If you happened
to have an ATM symbol readily available you could import it. Or if you’re
particularly artistic you could draw one. But for the rest of us Simio provides a
much easier solution — download it from Trimble 3D Warehouse. This is a huge
repository of symbols that are available free, and Simio provides a direct link to
it. Let’s change the picture of our server to that of an ATM machine.
Remove Watermark Wondershare
PDFelement
Start by clicking on the Server object we’d previously named ATM1. Now go to
the Symbol ribbon and click on the Go To 3D Warehouse icon. This will open
the 3D Warehouse web page (https://3dwarehouse.sketchup.com) in your default
web browser. Enter ATM into the Search box and click on the Search button and
then choose the Models tab. You’ll see the first screen of hundreds of symbols
that have ATM in their name or description, something like Figure 4.36. Note
that the library is updated frequently, so your specific search results may vary.
Similarly, the web page may also look/behave differently if it has been updated
since the writing of this chapter.
Note that many of these don’t involve automated teller machines, but many
do, and in fact you should find at least one on the first screen that meets our
needs. You can click on an interesting object (we chose a Mesin ATM) and see
the basic details such as file size. If you click on the See more details link,
you can view and rotate the model in 3D from the browser. If you are satisfied,
choose Download and save the skp file on your computer (you may have to set
up an account on the 3D warehouse site if you do not already have one in order
to download symbols). Back in Simio, you can import the symbol and apply
it to the selected Server using the Import Symbol icon (with the Server object
instance selected). This will import the 3D model into your Simio model, allow
you to change the name size and orientation of the symbol, and apply it to the
object instance. Once the symbol has been imported, it can be applied to other
object instances without re-importing (using the Apply Symbol icon).
Remove Watermark Wondershare
PDFelement
One of the most important things to verify during the import process is that
the size (in meters) is correct. You cannot change the ratio of the dimensions,
but you can change any one value if it was sized wrong. In our case our ATM is
about 0.7 meter wide and 2 meters high, which seems about right. Click OK and
we’re done applying a new symbol to our ATM server. Now your new Model
4-4 should look something like to Figure 4.35 when running in the 2D view. If
you change to the 3D view (3 key) you should see that those new symbols you
selected also look good in 3D, as in Figure 4.37.
Figure 4.37: Model 4-4 with woman and ATM symbols in 3D view.
a modeler. In this section we will give you some additional insight to improve
your debugging abilities.
The best way to minimize the impact of bugs is to follow proper iterative
development techniques (see Section 1.5.3). If you work for several hours without
stopping to verify that your model is running correctly, you should expect a
complex and hard-to-find bug. Instead, pause frequently to verify your model.
When you find problems you will have a much better idea of what caused the
problem and you will be able to find and fix it much more quickly.
The most common initial reaction to a bug is to assume it is a software bug.
Although it is certainly true that most complex software, regardless of how
well-written and well-tested it is, has bugs, it is also true that the vast majority
of problems are user errors. Own the problem. Assume that it is your error until
proven otherwise and you can immediately start down the path to fixing it.
• Look through all of your objects, especially the ones that you have added
or changed most recently.
– Look at all properties that have been changed from their defaults
(in Simio these are all bold and their categories are all expanded).
Ensure that you actually meant to change each of these and that you
made the correct change.
– Look at all properties that have not been changed from their defaults.
Ensure that the default value is meaningful; often they are not.
• Minimize entity flow. Limit your model to just a single entity and see if
you can reproduce the problem. If not, add a second entity. It is amazing
how many problems can be reproduced and isolated with just one or two
entities. A minimal number of entities help all of the other debugging
processes and tools work better. In Simio, this is most easily done by
setting Maximum Arrivals on each source to 0, 1, or 2.
• Minimize the model. Save a copy of your model, then start deleting model
components that you think should have no impact. If you delete too much,
simply undo, then delete something else. The smaller your model is, the
easier it will be to find and solve the problem.
• If you encountered a warning or error, go back and look at it again carefully.
Sometimes messages are somewhat obscure, but there is often valuable
information embedded in there. Try to decode it.
• Follow your entity(ies) step by step. Understand exactly why they are
doing what they are doing. If they are not going the way they should,
did you accidentally misdirect them? Or perhaps not direct them at all?
Examine the output results for more clues.
• Change your perspective. Try to look at the problem from a totally different
direction. If you are looking at properties, start from the bottom instead
of the top. If you are looking at objects, start with the one you would
normally look at last. This technique often opens up new pathways of
thought and vision and you might well see something you didn’t see the
first time — In banking, people often do verification by having one person
read the digits in a number from left to right and a second person read
those same digits from right to left. This breaks the pattern-recognition
cycle that sometimes allows people to see what they expect or want to see
rather than what is really there.
• Enlist a friend. If you have the luxury of an associate who is knowledgeable
in modeling in your domain, he or she might be of great help solving your
problem. But you can also get help from someone with no simulation
or domain expertise — just explain aloud the process in detail to them.
In fact, you can use this technique even if you are alone — explain it
to your goldfish or your pet rock. While it may sound silly, it actually
works. Explaining your problem out loud forces you to think about it from
Remove Watermark Wondershare
PDFelement
a different perspective and quite often lets you find and solve your own
problem!
• RTFM - Read The (um, er) Friendly Manual. Okay, no one likes to read
manuals. But sometimes if all else fails, it might be time to crack the
textbook, reference guide, or interactive help and look up how something
is really supposed to work.
You don’t necessarily need to do the above steps in order. In fact you might get
better results if you start at the bottom or skip around. But definitely use the
debugging tools discussed below to facilitate this debugging process.
4.10 Summary
In this chapter we’ve introduced Simio and developed several simple Simio
models using the Standard Library and using Simio processes. Along the way,
we integrated statistical analysis of simulation output, which is just as important
Remove Watermark Wondershare
PDFelement
Figure 4.38: Using trace, watch, and break windows in custom layout.
as modeling in actual simulation projects, via topics like replications, run length,
warm-up, model verification, and the analysis capabilities made possible by the
powerful SMORE plots. We started out with an abstract queueing model, and
added some interesting context in order to model a somewhat realistic queueing
system. In the process, we also discussed use of Simio Paths to model entity
movement and basics of animation with Simio. All of these Simio and simulation-
related topics will be covered in more detail in the subsequent chapters, with
more interesting models.
4.11 Problems
1. Create a model similar to Model 4-1 except use an arrival rate, λ, of 120
entities per hour and a service rate, µ, of 190 entities per hour. Run your
model for 100 hours and report the number of entities that were created,
the number that completed service, and the average time entities spend in
the system.
2. Develop a queueing model for the Simio model from Problem 1 and compute
the exact values for the steady state time entities spend in the system and
the expected number of entities processed in 100 hours.
3. Using the model from Problem 1, create an experiment that includes 100
replications. Run the experiment and observe the SMORE plot for the
time entities spend in the system. Experiment with the various SMORE
plot settings — viewing the histogram, rotating the plot, changing the
upper and lower percentile values.
Remove Watermark Wondershare
PDFelement
4. If you run the experiment from Problem 3 five (or any number of) times,
you will always get the exact same results even though the interarrival and
service times are supposed to be random. Why is this?
5. You develop a model of a system. As part of your verification, you also
develop some expectation about the results that you should get. When
you run the model, however, the results do not match your expectations.
What are the three possible explanations for this mismatch?
6. In the context of simulation modeling, what is a replication and how, in
general, do you determine how many replications to run for a given model?
7. What is the difference between a steady-state simulation and a terminating
simulation?
8. What are the initial transient period and the warm-up period for a steady-
state simulation?
9. Replicate the model from Problem 1 using Simio processes (i.e., not using
objects from the Standard Library). Compare the run times for this model
and the model from Problem 1 for 50 replications of length 100 hours.
10. Run the ATM model (Model 4-3) for 10 replications of length 240 hours
(10 days). What are the maximum number of customers in the system and
the maximum average number of customers in the system (recall that we
mentioned that our model would not consider the physical space in the
ATM). Was our assumption reasonable (that we did not need to consider
the physical space, that is)?
11. Describe how SMORE plots give a quick view of a system’s risk and the
sampling error associated with a run of the model.
12. Animate your model from Problem 1 assuming that you are modeling a
cashier at a fast food restaurant — the entities represent customers and
the server represents the cashier at the cash register. Use Simio’s standard
symbols for your animation.
13. Modify your model from Problem 1 assuming that you are modeling a
manufacturing process that involves drilling holes in a steel plate. The
drilling machine has capacity for up to 3 parts at a time (c = 3 in queueing
terms). The arrival rate should be 120 parts per hour and the processing
rate should be 50 parts per hour. Use Trimble 3D Warehouse to find
appropriate symbols for the entities (steel plates) and the server (a drill
press or other hole-making device). Add a label to your animation to show
how many parts are being processed as the model runs.
14. Build Simio models to confirm and cross-check the steady-state queueing-
theoretic results for the four specific queueing models whose exact steady-
state output performance metrics are given in Section 2.3. Remember that
your Simio models are initialized empty and idle, and that they produce
results that are subject to statistical variation, so design and run Simio
Remove Watermark Wondershare
PDFelement
Experiments to deal with both of these issues; make your own decisions
about things like run length, number of replications, and Warm-up Period,
possibly after some trial and error. In each case, first compute numerical
values for the queueing-theoretic steady-state output performance metrics
Wq , W , Lq , L, and ρ from the results in Section 2.3, and then compare
these with your simulation estimates and confidence intervals. All time
units are in minutes, and use minutes as well throughout your Simio
models.
a. M/M/1 queue with arrival rate λ = 1 per minute and service rate
µ = 1/0.9 per minute.
b. M/M/4 queue with arrival rate λ = 2.4 per minute and service rate
µ = 0.7 per minute for each of the four individual servers (the same
parameters used in the mmc.exe command-line program shown in
Figure 2.2).
c. M/G/1 queue with arrival rate λ = 1 per minute and service-time
distribution’s being gamma(2.00, 0.45) (shape and scale parameters,
respectively). You may need to do some investigation about properties
of the gamma distribution, perhaps via some of the web links in Section
6.1.3.
d. G/M/1 queue with interarrival-time distribution’s being continuous
uniform between 1 and 5, and service rate µ = 0.4 per minute (the
same situation shown in Figure 2.3).
15. Build a Simio model to confirm and cross-check the steady-state queueing-
theoretic results from your solutions to the M/D/1 queue of Problem 9 in
Chapter 2. Remember that your Simio model is initialized empty and idle,
and that it produces results that are subject to statistical variation, so
design and run a Simio Experiment to deal with both of these issues; make
your own decisions about things like run length, number of replications,
and Warm-up Period, possibly after some trial and error. For each of the
five steady-state queueing metrics, first compute numerical values for the
queueing-theoretic steady-state output performance metrics Wq , W , Lq , L,
and ρ from your solutions to Problem 9 in Chapter 2, and then compare
these with your simulation estimates and confidence intervals. All time
units are in minutes, and use minutes as well throughout your Simio model.
Take the arrival rate to be λ = 1 per minute, and the service rate to be
µ = 1/0.9 per minute.
16. Repeat Problem 15, except use the D/D/1 queueing model from Problem
10 in Chapter 2.
17. In the processes-based model we developed in Section 4.3, we used the
standard Token.TimeCreated token state to determine the time in system.
Develop a similar model where you manually mark the arrival time (as
illustrated in Figure 4.13 and used that value to record the time in system.
Remove Watermark Wondershare
PDFelement
Hint: You will need to create a custom token with a state variable to hold
the value and use an Assign step to store the current simulation time when
the token is created.
Remove Watermark Wondershare
PDFelement
Chapter 5
Intermediate Modeling
With Simio
The goal of this chapter is to build on the basic Simio modeling and analysis
concepts presented in Chapter 4 so that we can start developing and experiment-
ing with models of more realistic systems. We’ll start by discussing a bit more
about how Simio works and its general framework. Then we’ll continue with
the single-server queueing models developed in the previous chapter and will
successively add additional features, including modeling multiple processes, con-
ditional branching and merging, etc. As we develop these models, we’ll continue
to introduce and use new Simio features. We’ll also resume our investigation of
how to set up and analyze sound statistical simulation experiments, this time by
considering the common goal of comparing multiple alternative scenarios. By
the end of this chapter, you should have a good understanding of how to model
and analyze systems of intermediate complexity with Simio.
165
Remove Watermark Wondershare
PDFelement
You might wonder why you should care. For many of the same reasons that
OOP has revolutionized the software-development industry, it is revolutionizing
the simulation industry. The use of objects allows you to reduce large problems
to smaller, more manageable problems. Objects help improve your models’
reliability, robustness, reusability, extensibility, and maintainability. As a result,
overall modeling flexibility and power are dramatically improved, and in some
cases the modeling expertise required is lower.
In the rest of this section we will explore what Simio objects are and some impor-
tant terminology. Then we will continue by discussing Simio object characteristics
in some detail. While some of this may seem foreign if this is your first exposure
to using objects, command of this material is important to understanding and
effectively using the object-oriented paradigm.
An object has its own custom behavior that responds to events in the system as
defined by its internal model. For example, a production-line model is built by
placing objects that represent machines, conveyors, forklift trucks, and aisles,
while a hospital might be modeled using objects that represent staff, patient
rooms, beds, treatment devices, and operating rooms. In addition to building
your models using the Standard Object Library objects, you can also build your
own libraries of objects that are customized for specific application areas. And
as you’ll see shortly, you can modify and extend the Standard Library object
behavior using process logic. The methods for building your own objects will be
discussed in Chapter 11.
Remove Watermark Wondershare
PDFelement
an object into your model. For example, an object representing a server might
have a property that specifies the service time. When you place the server
object into your facility model, you would also specify this property value. In
Model 5-1, we used the Source object’s Interarrival Time property to specify
the interarrival-time distribution and the Server’s Processing Time property
to specify the server-processing-time distribution to form an M/M/1 queueing
system.
States are dynamic values that may change as the model executes. For example,
the busy and idle status of a server object could be maintained by a state variable
named Status that’s changed by the object each time it starts or ends service
on a customer. In Model 4-2, we defined and used the model state WIP to track
the number of entities in the system. When an entity arrives to the system, we
increment the WIP state and when and entity departs, we decrement the WIP
state. So, at any point in simulated time a specific state provides one component
of the overall object’s state. For example, in our single-server queueing system,
the system state would be composed of the number of entities in the system
(specified by the WIP model state) and the arrival time of each entity in the
system (specified by the Entity.TimeCreated entity states).
Events are things that the object may “fire” at selected times. We first discussed
the concept of dynamic-simulation events in Section 3.3.1. In our single-server
queueing model, we defined entity arrival and service-completion events. In
Simio, events are associated with objects. For example, a server object might
have an event fire each time the server completes processing of a customer, or
an oil-tank object might fire an event whenever it reaches full or empty. Events
are useful for informing other objects that something important has happened
and for incorporating custom logic.
The External View of an object is the 2D/3D graphical representation of the
object. This is what you’ll see when it’s placed in your facility model. So, for
example, when you use objects from the Standard Library, you’re seeing the
objects’ external views when you add them to your model.
An object’s Logic defines how the object responds to specific events that may
occur. For example, a server object may specify what actions take place when a
customer arrives to the server. This logic gives the object its unique behavior.
One of the powerful features of Simio is that whenever you build a model of
a system, you can turn that model into an object definition by simply adding
some input properties and an external view. Your model can then be placed as
a sub-model within a higher-level model. Hence, hierarchical modeling is very
natural in Simio. We’ll expand on this in Chapter 11.
5.1.2.1 Properties
Properties are defined within an object (see Figure 5.2) to collect information
from the user to customize that object’s behavior (note that in this context,
the term User refers to the person who instantiates the object and specifies its
property values. In the case of Standard Library objects, you are the user of
the objects created by Simio LLC employees. But you will learn in Chapter 11
that you can create your own objects and that the user of those objects may be
someone other than yourself).
Figure 5.2: Properties ribbon on the Properties view of the Definitions window.
To create or view the properties for an object you must select the object in the
Navigation window (not the Facility window), then select the Definitions tab
and the Properties item. Properties specific to this object (if any) will appear
at the top of this window; properties that are inherited from another object
appear in an expandable area just below the other properties.
Properties can be of many different types including:
• Standard: Integer, Real, Expression, Boolean, DateTime, String, . . .
• Element: Station, Network, Material, TallyStatistic, . . .
• Object: Entity, Transporter, or other generic or specific object reference
• Repeat Group: A repeating set of any of the above
Tip: When you create a new property it will show up in the object’s Property
Window. Sometimes a new property will appear to get “lost.” Make sure that
you’re looking in the properties window of the same object to which you added
the property (e.g., if you add a property to the ModelEntity object, don’t expect
to see it appear on the Model object or a Server object). And if you haven’t
given the property a category, by default it will show up in the General category.
Properties can’t change definition during a run. For example, if the user defined
the value of 5.3 for a ProcessTime property, it will always return 5.3 and it can’t
be changed without stopping the run. However, some property definitions can
contain random variables and dynamic states that could return different values
even though the definition remains constant. For example, in Model 4-3, we used
Random.Triangular(0.25, 1, 1.75) as the Process Time property for the
Server object. In this case, the property value itself doesn’t change throughout
the model run (it’s always the triangular distribution with parameters 0.25, 1,
Remove Watermark Wondershare
PDFelement
and 1.75), but an individual sample from the specified distribution is returned
from each entity visit to the object. Similarly, we could set a property definition
using the name of a state that changes over the model run so that each time the
property is referenced, it returns the current value of the state.
The value of a property is unique to each object instance (e.g., the copy of
the object that’s placed into the facility window). So for example, you could
place three instances of ModelEntity (let’s call them PartA, PartB, and PartC)
in your model by dragging three copies of the ModelEntity object from the
Project Library onto the Facility view. Each of these will have a property
named Initial Desired Speed but each one could have a different value of that
property (e.g., The Initial Desired Speed of PartA doesn’t necessarily equal that
of PartB). However because properties can’t change their values during a run,
those property values are efficiently stored once, with the instance, regardless of
how many dynamic entities (Runspaces) are created as the model runs.
5.1.2.2 States
States are defined within an object (see Figure 5.3) to hold the value of something
that might change while a model is running. (Note: Since state values can change,
they are often referred to as state variables and you should consider the terms
state and state variables synonymous in this context.) There are two categories
of states: Discrete and Continuous. A Discrete State (or discrete-change state)
may change via an assignment only at discrete points in time (e.g., it may change
at time 1.2457, then change again at time 100.2). A Continuous State (or
continuous-change state) will change continuously and automatically when it’s
rate or acceleration is non-zero.
Figure 5.3: States ribbon on the States view of the Definitions window.
• String: A discrete state that may be assigned a string value (e.g., “Hello”)
and may be manipulated using the String Expression functions such as
String.Length.
• Element Reference: A discrete state that may be assigned an element
reference value (e.g., indicates an element such as a TallyStatistic or a
Material).
• Object Reference: A discrete state that may be assigned an object
reference value (e.g., refers to either a generic Object or a specific type of
object like an Entity).
• List Reference: A discrete state that may be assigned a list reference
value (e.g., refers to list like LocalTrucks or LDTrucks).
• Level: A continuous state that has both a real value (the level) and a rate
of change. The state will change continuously when the rate is non-zero.
The rate may change only discretely.
• Level with Acceleration: A continuous state that has a real value (the
level), a rate of change, and an acceleration. The state may change contin-
uously over time based on the value of a rate of change and acceleration.
The rate may change continuously when the acceleration is non-zero. Both
the rate and the acceleration may change discretely.
States can be associated with any object. A state on an entity is often thought
of as an attribute of that entity. A state on a model can in some ways be thought
of as a global variable on that model (e.g., the model state WIP that we used in
Model 4-2). But you can have states on other objects to accomplish tasks like
recording throughput, costs, or current contents.
States do not appear in the Properties Window, although a Property that’s
used to designate the initial value of a State often does appear in the Properties
Window. To create or view the states for an object you must select the object in
the Navigation window (not the Facility window). For example to add a state
to the ModelEntity object, first click on ModelEntity in the navigation window.
Once you have the proper object selected, you can select the Definitions tab
and the States item. States specific to this object (if any) will appear at the
bottom of this window; states that are inherited from another object appear in
an expandable area at the top of this window.
The value of a state is unique to each object runspace (i.e. the copies of the
object that are dynamically generated during a run) but not unique to the object
instance. So for example, an instance of ModelEntity placed in your model (let’s
call it PartA) has a property named Initial Desired Speed that is common to
all entities of type PartA. But all instances of ModelEntity also have a state
named Speed. Because these states can be assigned as they move through the
model, each entity created (the dynamic runspace) could have a different value
for the state Speed. Hence the value of the Speed state must be stored with
the dynamic entity runspaces. Because of the extra memory involved with a
state, you should generally use a Property instead of a State unless you need
the ability to change values during a run.
Remove Watermark Wondershare
PDFelement
Referenced properties are displayed with a green arrow marker when used as
property values (see Figure 5.5). When running a model interactively, the
values of the controls are set in the model Properties window. When running
experiments the values specified for controls in the model properties window
are ignored and instead the values that are associated with each scenario in the
Experiment Design window are used.
You’ll see examples of using referenced properties in the models in the current
and subsequent chapters.
Table 5.1 summarizes some of the differences between properties and states.
Note that new users are very often confused about properties and states and, in
particular, when one is used rather than the other. Hopefully we can clear up the
natural confusion as we develop models with more and more features/components
and discuss the use of their properties and states.
Remove Watermark Wondershare
PDFelement
Properties States
Basic Data Types 22 9
Runtime Change No Yes
Arrays Supported No Yes (selected)
Where Stored Object instance Object runspace
Server Example Processing time Number processed
Entity Example Initial speed Current speed
Cost Example Cost per hour Accrued cost
Failure Example Failure rate Last failure time
Batching Example Desired batch size Current batch size
5.1.3.1 Tokens
A Token is a delegate of an object that executes the steps in a process. Typically,
our use of a Token is as a delegate of an Entity, but in fact any object that
executes a process will do so using a token as a delegate. A token is created
at the beginning of a process and is destroyed at the end of that same process.
As the token moves through the process it executes the actions as specified by
each step. A single process may have many active tokens moving through it in
parallel. And a single object can have many tokens representing it.
A token may also carry its own properties and states. For example, a token
might have a state that tracks the number of times the token has passed through
a specific point in the logic. In most cases you can simply use the default token
in Simio, but if you require a token with its own properties and states you can
create one in the Token panel within the Definitions window.
A token carries a reference to both its parent object and its associated object
(Figure 5.6). The parent object is an instance of the object in which the process
is defined. For example a process defined inside the Server object definition would
indicate a server (perhaps Server1) as its parent. The associated object is
the related object (separate from the parent object) that triggered this process
to execute. For example, a process that’s triggered by an entity arriving to an
object will have that entity as the associated object. The process logic can refer
to properties, states, and functions of both the parent object and the associated
Remove Watermark Wondershare
PDFelement
object. Hence, the token could reference the arriving entity to specify the delay
time on the Delay step. To reference the associated object it’s necessary to
precede the property or state name with the object-class name. For example
ModelEntity.TimeCreated would return the value of the TimeCreated function
for the associated object of type ModelEntity.
5.1.3.2 Entities
In Simio, Entities are part of an object model and can have their own intelligent
behavior. They can make decisions, reject requests, decide to take a rest, etc.
Entities have object definitions just like the other objects in the model. Entity
objects can be dynamically created and destroyed, move across a network of
links and nodes, move through 3D space, and move into and out of fixed objects.
Examples of entity objects include customers, patients, parts, and work pieces.
Entities don’t flow through processes as tokens do. Instead a token is created as
a delegate of the entity to execute the process. The movement of entities into
and out of objects may trigger an event, which might execute a process. When
the process is executed, a Token is created that flows through the steps of a
process.
Entities have a physical location within the Facility window and they can reside
in either Free Space, in a Station, on a Link, or at a Node (discussed further in
Remove Watermark Wondershare
PDFelement
Chapter 8). When talking about the location type of an Entity, we’re referring to
the location of the Entity’s leading edge. Examples of Stations within Simio are:
the parking station of a Node (TransferNode1.ParkingStation), the input
buffer of a Server object (Server1.InputBuffer), and the processing station of
a Combiner object (Combiner1.Processing).
5.1.4 Processes
In Section 4.3 we built an entire model using nothing but Simio Processes. That
was an extreme case for using processes. In fact, every model uses processes
because the logic for all objects is specified using processes. We’ll explore that
more in Chapter 11. But there’s yet another common use for processes, Add-on
Processes, that we’ll explore here.
A process is a set of actions that take place over (simulated) time, which may
change the state of the system. In Simio a process is defined as a flowchart
using steps that are executed by tokens and may change the state of one or more
elements. Referring again to Figure 5.6, you’ll note an object (Parent Object)
that contains a process consisting of three steps. The arrows on the first blue
token indicate that it has references to both its parent object (e.g., a server) and
its associated object (e.g., an entity that initiated this process execution). Note
that the other blue tokens in the figure also have similar references.
Processes can be triggered in several ways:
• Simio-defined processes are automatically executed by the Simio engine.
For example, the OnInitialized process is executed by Simio for each
object on initialization.
• Event-triggered processes are user-defined processes that are triggered by
an event that fires within the model.
• Add-on processes are incorporated into an object definition to allow the
user of that object to insert customized logic into the standard behavior of
the object.
For now, let’s just discuss add-on processes a bit more.
time and likewise the Worker utilized for a corresponding 10% of the time. Of
course, you could make this model more interesting by having the worker do
other things when not busy. And a bit later we’ll learn how to move the worker
between tasks and consider the worker’s current location in the processing. But
for now, you’ve hopefully learned that using add-on processes can provide a lot
of flexibility and isn’t all that difficult to do.
any integer in between. The capacity may also follow a schedule (see Sections 5.3.3
and 7.2). Calendar-based schedules may be defined by selecting the Schedules
window under the Data Tab. Here you can configure recurring (such as daily
and weekly) schedules and also configure Exceptions to those schedules, such as
for holidays or scheduled overtime.
For ultimate flexibility the capacity of a resource can be controlled using process
logic and assign steps. This approach allows you to adjust capacity dynamically
in reaction to model situations and also to account for any desired transition
rules (e.g., what happens to a busy resource when it goes off-shift).
Resources have a queue where tokens wait for capacity to become available.
Entities don’t directly take resource capacity. Rather, an entity has a token
execute a Seize step inside a process to request that a resource allocate capacity
to the entity. All tokens wait in a single allocation queue for a specific resource.
If the requested resource isn’t available, the token (and associated entity) must
wait. An entity that wants to seize more than one resource, or one of a list of
resources, may generate a token waiting in the allocation queue for each resource
involved.
The ranking rule for allocation queues may be specified with either static or
dynamic ranking. Static ranking rules include First In First Out, Last In First
Out, Smallest Value First, and Largest Value First. The latter two rules require
a Ranking Expression that’s often a state like Entity.Priority. This expression
is evaluated when the queue is entered to determine proper rank. While static
ranking is very efficient, dynamic ranking allows superior flexibility when it’s
necessary to make a real-time determination of the “best” allocation strategy.
Dynamic Ranking examines every waiting entity each time an allocation is
attempted. Because dynamic ranking rules must examine every entity each
time a decision is made, when the queues are very large it might cause slower
execution speed. . In addition to Smallest Value First and Largest Value First, it
includes an option for Standard Dispatching Rule under which you will find more
sophisticated rules such as Critical Ratio, Least Setup Time, and Campaign
Sequence Up. (Note: Campaigns are often used in industries like painting
and rolling mills where the exact sequence of processing is very important, like
painting successively darker colors or rolling successively narrower strips of steel.).
Advanced users also have the capability to create their own dynamic allocation
rules (see Chapter 11).
Resources have automatic statistics on scheduled and allocated capacity. These
may also be supplemented with state statistics (e.g., Idle, Busy, Blocked, Failed,
. . . ). Every resource automatically tracks the average, minimum, and maximum
number of capacity units scheduled and capacity units allocated. Many of the
standard objects take advantage of the List State feature to track additional
state-based detail. For example, the Resource Object tracks the following states:
• Idle - The resource isn’t allocated to any task.
• Busy - The resource has capacity allocated to one or more tasks.
Remove Watermark Wondershare
PDFelement
You can use math operators +, - , * , / and ˆ to form expressions, and parentheses
as needed to control the order of calculation, like 2*(3+4)ˆ(4/3). Logical expres-
sions can be built using <, <=, >, >=, !=, ==, &&, ||, and !. Logical expressions
return a numerical value of 1 when true, and 0 when false. For example 10*(A >
2) returns a value of 10 if A is greater than 2; otherwise it returns a value of 0.
Remove Watermark Wondershare
PDFelement
Arrays (up to 10 dimensions) are 1-based (i.e., the beginning subscript is 1, not
0) and are indexed with square brackets (e.g., B[2,3,1] indexes into the three
dimensional state array named B). Model properties can be referenced by prop-
erty name. For example if Time1 and Time2 are properties that you’ve added to
your model then you can enter an expression such as (Time1 + Time2)/2.
Math functions such as Sin, Round, Min, Log, etc., are accessed in a similar way
using the keyword Math. Begin typing Math and enter a period to complete the
word and provide a list of all available math functions. Highlighting a math
function in the list will automatically bring up a description of the function. You
may also find the DateTime functions (keyword DateTime) to be particularly
useful to convert any time (e.g., TimeNow) into its components like month, day,
and hour.
Object and math functions are listed and described in detail in the Simio Help
and in the Reference Guide (see the Support ribbon). The Expression Reference
Guide, also found on the Support ribbon provides html-based help in describing
all the components found in your current model.
Remove Watermark Wondershare
PDFelement
5.1.8 Costing
One important modeling objective is to predict expected cost or compare scenarios
based on cost. In some cases this can be accomplished by comparing the capital
investment associated with one scenario versus another. Such simple cases can
often be modeled with a few states to capture costs, or even have the cost entirely
accounted for external to the model. But often there is need to measure the
operating cost of one scenario versus another. In these cases you may have
direct and indirect costs and widely differing production in terms of product mix,
throughput at the subsystem level, and total throughput. These more complex
cases often benefit from the more comprehensive approach of Activity-Based
Costing (ABC). Activity-Based Costing is a method of assigning costs to
products or services based on the resources consumed. This helps us recognize
more costs as direct costs instead of indirect, which in turn provides a more
accurate understanding of how individual products and services contribute to
costs under various scenarios.
Simulation is an ideal tool for implementing ABC because the activities are
usually modeled at the same detail at which costs must be measured. The
model typically “knows” which resources are being used by each entity and the
duration involved. In some simulation products, ABC must be implemented
by adding logic and data items to track each cost as it is being incurred. More
comprehensive simulation products have built-in ABC. Simio is in the latter
category.
Most objects in the Simio Standard Library have a Financials category. The
properties in the category vary with the complexity and features of the object.
It could be as simple as just having a busy cost per time unit (Usage Cost Rate),
but it can be much more complicated than that to accurately capture all costs.
For example most (not all) workers still get paid while they are idle, waiting
for the next activity (Idle Cost rate). Some resources incur a fixed cost with
each entity handled (Cost Per Use). And some resources and entities (like an
airplane) are expensive enough that they incur a significant cost when they are
just sitting idle (Holding Cost Rate). In many cases it is not enough to simply
accrue the costs, but they must also be allocated or “rolled up” to the proper
department (Parent Cost Center).
In Figure 5.9 you will notice that both the Server and the Worker have similar
properties for calculating resource costs (e.g., the cost of seizing and holding
the Server or Worker and the costs for it to be idle while scheduled for work).
The Server also has properties to calculate the cost accrued while waiting in its
input and output buffers. The Worker object has no buffer costing. Instead it
potentially has a cost each time it carries an entity, as well as a transportation
cost while it is moving. It is rare for a single instance of any object to have all
of these costs – typically, one resource may have a cost per use while another
might have busy and idle cost rates.
The left side of Figure 5.9 illustrates an automated shrink wrapping machine
Remove Watermark Wondershare
PDFelement
(a Server). It requires a capital cost of 33,500 EUR, but the only cost of use is
a fixed 13.852 EUR each time it is used. The shrink wrapper costs get rolled
up to the Shipping Center cost center. The right side of Figure 5.9 illustrates a
fork lift operator (a Worker) who gets paid 20 USD per hour whether busy or
idle. But when the operator uses the fork lift to transport something it incurs
an additional 31.50 USD per hour to account for the cost of the vehicle. The
fork lift operator’s costs get rolled up to the Transportation cost center.
One final note is that multinational companies and projects often involve work
being done across the world and hence in multiple currencies. Simio recognizes
most common world currencies (I don’t think it yet handles goats or Bitcoins).
The Financials category under the Advanced Options on the Run tab allows you
to specify the exchange rate for the currencies you want to use as well as the
default currency to be used in reports.
about our system, since (as described in Section 4.2.5) we’ll need to verify our
model before we can use it to estimate our performance metrics of interest.
Recall that the basic verification process involves comparing your model results
with your expectations. Figure 5.11 shows the basic queueing model of our
initial PCB assembly system. Given the board arrival rate (λ = 10) and the
respective service rates (µp = 15 and µi = 20), all in units of boards per hour,
we can compute the exact server utilizations at steady state (the utilizations
are independent of the specific inter-arrival and processing time distributions).
Since ρp = λ/µp = 0.667 < 1, we know that the arrival rate to the inspector
is exactly 10 boards/hour (why?) and therefore, ρi = λ/µi = 0.500. Since
both of the server utilizations are strictly less than 1, our system is stable (we
can process entities at a faster rate than they arrive, so the number of entities
in the system will be strictly finite, i.e., the system won’t “explode” with an
ever-growing number of boards forever). If we assume that the placement and
inspection times are exponentially distributed, we can also calculate the expected
number of boards in our system, L = 3.000 and the expected time that a board
spends in the system, W = 0.3000 hours (see Chapter 2 for details), both at
steady-state, of course. While the times are not exponentially distributed, as we
saw in Chapter 4 it’s easy to make them so initially in our simulation model in
order to verify it.
Armed with our expectation, we can now build the Simio model. Compared to
our models in Chapter 4, Model 5-1 includes two basic enhancements: sequential
processes (inspection follows component placement); and branching (after inspec-
tion, some boards are classified as “good” and others are classified as “bad”).
Both of these enhancements are commonly used and are quite easy in Simio.
Figure 5.12 shows the completed Simio model, consisting of an entity object
(PCB), a source object (Source1), two server objects (Placement and Inspection),
and two sink objects (GoodParts and BadParts).
For our initial model, we used Connectors to connect the objects and specify
the entity flow. Recall that a Connector transfers an entity from the output
node of one object to the input node of another in zero simulated time. Our
sequential processes are modeled by simply connecting the two server objects
(boards leaving the Placement object are transferred to the Inspection object).
Remove Watermark Wondershare
PDFelement
Since our model specifications indicated that 92% of inspected boards are good,
we set the Selection Weight property to 0.92 for the link to the GoodParts
Remove Watermark Wondershare
PDFelement
object (see Figure 5.14) and 0.08 for the link to the BadParts object. This
link-weight mechanism allows us easily to model n-way random branching by
simply assigning the relative link weight to each outgoing link. Note that we
could have also used 92 and 8 or 9.2 and 0.8 or any other proportional values
for the link weights — like a cake recipe . . . 5 parts flour, 2 parts sugar, 1 part
baking soda, etc. — Simio simply uses the specified link weights to determine
the proportion of entities to route along each path. Simio includes several other
methods for specifying basic routing logic — we’ll explore these in later models
— but for now, we’ll just use the random selection.
Figure 5.14: Selection weight for the link between the Inspection and GoodParts
objects.
The final step to complete Model 5-1 is to specify the interarrival and service-time
distributions using the Interarrival Time and Processing Time properties as we
did in our previous models in Chapter 4. As a verification step, we initially set
the processing times to be exponentially distributed so that we can compare to
our queueing results. Table 5.2 gives the results from running 25 replications
each with length 1200 hours and a 200 hour warm-up period. The results were
all read from the Pivot Grid report as described in Section 4.2. These results are
within the confidence intervals of our expectations, so we have strong evidence
that our model behaves as expected (i.e., is verified). As such, we can change
our processing time distributions to the specified values and have our completed
model.
Table 5.3 gives the results based on the same run conditions as our verification
run. Note that, as expected, the utilizations and proportions of good and bad
parts did not significantly change but our simulation-generated estimates of the
number of entities (L) and time in system (W ) both went down (note that while
the actual numbers did change, our estimates did not change in a probabilistic
sense — remember that the averages and confidence-interval half widths are
observations of random variables). Also, note that we should have expected these
reductions as we reduced the variation in both of the processes when we switched
from the exponential distribution to the triangular and uniform distributions
(both of which, unlike the exponential distribution, are bounded on the right).
Given the structure of our system (and the model), it’s possible for PCBs to be
reworked multiple times since we don’t distinguish between new and reworked
Remove Watermark Wondershare
PDFelement
boards at the placement or inspection processes. As such, we’d like to keep track
of the number of times each board is processed by the placement machine and
report statistics on this value (note that we could have just as easily chosen to
track the number of times a board is reworked — the minimum would just be 0
rather than 1 in this case). This is an example of a user-defined statistic — a
value in which we’re interested, but Simio doesn’t provide automatically. Adding
this capability to our model involves the following steps:
• Define an entity state that will keep track of the number of times the entity
has been processed in the placement machine;
• Add logic to increment that state value when an entity is finished being
processed by the placement machine;
• Create a Tally Statistic that will report the summary statistics over the
run; and
• Add logic to record the tally value when an entity departs the system (as
either a good or bad part).
Note that this is similar to the TimeInSystem statistic that we modeled in Section
4.3. Both of these are examples of observational statistics (also called discrete-
time processes), where each entity produces one observation — in the current
case, the number of times the entity went through the placement process, and in
Model 5-2, the time the entity spent in the system — and the Tally Statistic
reports summary statistics like average and maximum over all observations
(entities, in both cases). Note that the standard deviation is not not included in
the summary statistics . . . see Section 3.3.1 for why doing so would often be
biased and thus invalid, even though it easily could be done.
A state is defined within an object and stores a value that changes over the
simulation run (Section 5.1.2.2). This is exactly what we need to track the
number of times an entity goes through the placement process — every time the
entity goes through (exits) the process, we increment the value stored in the
state. In this case, we need to define the state with respect to the entity so we
select the ModelEntity in the Navigation window, select the Definitions tab,
select States from the Panel, and click on Integer icon from the ribbon (see
Figure 5.16).
We named the state TimesProcessed for this model. Every entity object of type
ModelEntity will now have a state named TimesProcessed and we can update
the value of this state as the simulation runs. In our case, we need to increment
the value (add 1 to the current value) at the end of the placement process. There
are several ways that we could implement this logic in Simio. For this model,
we’ll use the State Assignments property associated with Server objects. This
property allows us to make one or more state assignments when an entity either
enters or exits the server; see Figure 5.17.
Here we’ve selected the Placement object, opened the Before Exiting repeat
group property in the State Assignments section, and added our state assignment
to increment the value of the TimesProcessed state. This tells Simio to make
Remove Watermark Wondershare
PDFelement
Figure 5.17: Setting the State Assignments property for the Placement object.
Remove Watermark Wondershare
PDFelement
the specified set of state assignments (in our case, the single assignment) just
before an entity leaves the object. So at any point in simulated time an entity’s
TimesProcessed state indicates the number of times that entity has completed
processing by the Placement object.
Next, we need to tell Simio that we’d like to track the value of the TimesProcessed
state as an observational (tally) statistic just before entities leave the system.
This is a two-step process:
• Define the tally statistic; and
• Record the value (stored in the TimesProcessed entity state) at the appro-
priate location in the model.
First we’ll define the tally statistic by selecting the Model in the Navigation
window, clicking on the Definitions tab, and selecting the Elements pane, and
clicking on the Tally Statistic icon on the Ribbon to add the statistic (see
Figure 5.18). Note that we named the tally statistic NumTimesProcessed by
setting the Name property. Finally, we’ll demonstrate two different methods
for recording the tally values: Using an add-on process to record the value of
the TimesProcessed state to the tally statistic; and using the Tally Statistics
property of the input node of the Sink object (ordinarily, you’d use one method
or the other in a model, but we wanted to demonstrate both methods for
completeness).
First, we’ll use the add-on process method for the entities that are routed to
the GoodParts sink. The process will be executed when an entity enters the
sink object. To create the add-on process, select the GoodParts Sink object
and expand the Add-On Process Triggers group in the model properties panel.
Four triggers are defined: Run Initialized, Run Ending, Entered, and Destroying
Entity. Since we want to record each entity’s value in the tally, We chose the
Entered trigger. You can enter any name that you like for the add-on process,
but there is a nice Simio shortcut for defining add-on processes. Simply double-
click on the trigger property name (Entered, in this case) and Simio will define
an appropriate name and open the processes panel with the newly created process
selected. The add-on process in this case is quite simple — just the single step
of recording the tally value to the appropriate tally statistic. This is done using
the Tally step (as shown in Figure 5.19).
Remove Watermark Wondershare
PDFelement
To add the step, simply select and drag the Tally step from the Common Steps
panel onto the process and place it between the Begin and End nodes in the
process. The important properties for the Tally step are the TallyStatistic Name,
where we specify the previously defined Tally Statistic (NumTimesProcessed)
and the Value, where we specify the value that should be recorded (the
TimesProcessed entity state in this case). We also set the Value Type property
to Expression to indicate that we’ll be using an expression to be evaluated and
recorded.
The second method uses the Tally Statistics property for the Basic Node from
the Standard Object Library and we’ll use this method with the Bad Parts sink.
Figure 5.20) illustrates this method. First select the input node of the BadParts
sink and expand the Tally Statistics property group (shown at the top of
the figure). Next, open the repeat group editor by clicking on the ellipsis next
to the On Entering property and add the tally as show in bottom part of the
figure. Note that we use the same tally statistic for both part types since we
wanted to track the number of times processed for all parts. Had we wanted
to track the statistics separately by part type (Good and Bad), we would have
simply used two different Tally Statistics. Now when we run the model, we’ll
see our Tally statistic reported in the standard Simio Pivot Grid and Reports
and the values will be available in case we wish to use them in our process logic.
The process that we just described for creating a user-defined observational
statistic is a specific example of a general process that we will frequently use.
The general process for creating user-defined observational (tally) statistics is as
follows:
• Identify the expression to be observed. Often, this involves defining a new
model or entity state where we can compute and store the expression to
be observed (as it did with the previous example);
• Add the logic to set the value of the expression for each observation, if it
is not already part of the model;
Remove Watermark Wondershare
PDFelement
Figure 5.20: Using the Tally Statistics property for the input node of the
BadParts sink object.
condition is not met, probabilities are used to determine between the remaining
two alternative. Figure 5.21 shows a simple way to implement this logic using
expressions for link weights. Note that the parenthetical components if the link
weights will evaluate to either 0 or 1, so the probabilities are applied only if
the board has been processed fewer than 3 times. Otherwise, the board will be
rejected. This simple example illustrates the power of using expressions with
the link-weight selection rule. New users will often unnecessarily resort to using
more complex add-on processes in order to implement this type of logic. We
encourage to you study this example carefully as these types of expressions can
greatly simplify model development. Of course, if we were really implementing
this system, we would like to reject the board before it is processed the third
time – i.e., immediately after it fails inspection for the second time, but before
it is reworked. We leave this as an exercise for the reader (see Problem 7 at the
end if the chapter).
day is actually 9 hours including the meal break). The shifts are as follows.
• First shift: 8:00 a.m. – 12:00 p.m., 12:00 p.m. – 1:00 p.m. (meal break),
1:00 p.m. – 5:00 p.m.
• Second shift: 4:00 p.m. – 8:00 p.m., 8:00 p.m. – 9:00 p.m. (meal break),
9:00 p.m. – 1:00 a.m.
• Third shift: 12:00 a.m. – 4:00 a.m., 4:00 a.m. – 5:00 a.m. (meal break),
5:00 a.m. – 9:00 a.m.
We’ll also assume that, for multi-shift processes (inspection, in our case), a
worker’s first hour is spent doing paperwork and setting up for the shift, so that
there’s only one worker actually performing the inspection task during those
periods when worker shifts overlap.
Given the work schedule that we described, the inspection operation operates
24-hours per day with three 1-hour meal breaks (12:00 noon – 1:00 p.m., 8:00
p.m. – 9:00 p.m., and 4:00 a.m. – 5:00 a.m.). This schedule would correspond to
having three inspection operators, each of whom works 8 hours per day. Since
Simio is based on a 24-hour clock that starts at 12:00 a.m., this translates to
the inspection resource capacity schedule shown in Table 5.4.
With this work schedule, we’d expect boards to queue in front of the inspection
station during each of the three “meal periods” when there is no inspector
working. Once we complete the model, we should be able to see this queueing
behavior in the animation. There are multiple ways to implement this type of
resource capacity schedule in Simio — for Model 5-2, we’ll use Simio’s built-in
Schedules table. To use this table, we first define the schedule and then tell the
Inspection object to use the schedule to determine the object’s resource capacity.
To create our work schedule, select the Model in the Navigation pane, select the
Data tab, and the Schedules icon in the Data panel. You’ll see two tabs — under
the Work Schedules tab you’ll see that a sample schedule named StandardWeek
has already been created for you, and under the Day Patterns tab you’ll see that
a sample StandardDay has been created for you.
We’ll start under the Day Patterns tab to define the daily work cycle by telling
Remove Watermark Wondershare
PDFelement
Simio the capacity values over the day. We can choose either to revise the sample
pattern, or to replace it. Select StandardDay and then click on Remove to delete
the existing pattern, then click on Day Pattern in the Create category of the
ribbon to create a new one. Give the new pattern a Name of DayPattern1
and click the + to the left of it to expand the Work Periods definition. In the
first work period row, type or use the arrows to enter 12:00:00 AM for Start
Time then type 4 for the Duration. You’ll see that End Time is automatically
calculated and that the Value (capacity of the resource) defaults to 1. Continue
this process to add the three additional active work periods as indicated in Table
5.4. Your completed day pattern should look like that in Figure 5.22.
Now let’s move back to the Work Schedules tab. Again, we could delete the
sample schedule and create a new schedule, but this time we’ll just change it to
meet our needs. Change the Work Schedule Name to InspectionSchedule and
change the Description to Daily schedule for inspectors. For our model,
the work pattern is the same every day so we’ll set the Days property value to 1
to indicate that the same pattern will repeat every (one) day. Finally, since we
deleted the StandardDay pattern that was originally referenced here, the Day 1
column indicates an error. To clear the error, just select the new DayPattern1
from the pull-down list. Your completed work schedule should look like that in
Figure 5.23.
Now that we have the schedule defined, we tell the Inspection object to use
the schedule to specify the resource capacity. We can do this by selecting the
Remove Watermark Wondershare
PDFelement
Next, we need to specify the capacity schedule similarly for the rework operator.
As specified above, the rework operation works only during the second shift,
which will be 4:00 p.m. – 8:00 p.m., 8:00 p.m. – 9:00 p.m. (meal break), and
9:00 p.m. – 1:00 a.m. So, as before, we created a new day pattern DayPattern2
and referenced that day pattern in a new work schedule ReworkSchedule and
then told the Rework object to use the schedule (see Figure 5.25).
Schedules will be discussed in more detail in Section 7.2.
Before incorporating the placement-machine failures into our model, it’s in-
Remove Watermark Wondershare
PDFelement
Figure 5.26: Resource section of the Pivot Grid for the Inspection object.
If the resource capacities are greater than 1 during a schedule (e.g., if some shifts
had 2 or 3 inspectors working), the Resource State values are independent of
the number of units of a resource that are busy, whereas the Capacity values
take the specific numbers of units of resource capacity into consideration. For
example, if we halve the inspection processing rate (set the Processing Time
property to Random.Uniform(4, 8)) and change the schedule so that there are
2 inspectors rather than 1 during the work cycles, we get the results shown in
Table 5.6.
In this model, the ScheduledUtilization and Offshift Time percentage did not
change (as we’d expect — make sure you understand why this is true!), but the
other values did. The ProcessingTime percentage went up because it measures
the percentage of time that either or both of the units of capacity are busy.
Similarly, the Starved Time percentage went down because now both units of
capacity have to be starved in order for the inspection resource to be in the
starved state.
uptime and that the time required to repair the machine after it fails is approxi-
mately 30 minutes. As both the uptime and repair durations are highly variable,
we’ll assume that both are exponentially distributed. To incorporate this failure
model into Model 5-2, we need to set the Failure Type property to Calendar
Time Based, the Uptime Between Failures property to Random.Exponential(6)
Hours, and the Time to Repair property to Random.Exponential(30) Minutes
(see Figure 5.27).
Now when we run the model (using the same run parameters as in the previous
section), we can see that the ResourceState category for the Placement object now
includes a section for Failed Time (see Figure 5.28) and that our estimate of the
percentage of time that the machine spends in the failed state is approximately
7.83%.
Calendar Time Based failures are most commonly used to model random me-
chanical failures where the time between failures is a function of time. Processing
Count Based failures are most commonly used to model failures where the
time between failures is a function of the number of times the process is used.
Raw-material replenishment is an example of a situation that would call for
this type of failure process. In this situation the machine has an inventory of
raw materials that is exhausted by processing parts. When the raw-material
inventory is empty, the machine can’t continue processing until the raw-material
inventory is replenished. As such, the time between failures will be a function
of the number of parts processed (or, more specifically, the Processing Count).
Event Count Based failures are based on the number of occurrences of an event,
which can be a standard Simio-defined event or a user-defined event.
λ0 = λ + 0.26 × λ0
Remove Watermark Wondershare
PDFelement
Ignoring the machine failures for now, we’d expect the utilization of the placement
machine to be 13.514/15 = 0.9019. Since the utilization is strictly less than 1,
the departure rate will equal the arrival rate and the expected utilization for
the inspection station will be 13.514/20 = 0.6757 (ignoring the resource-capacity
schedule). Similarly, since the inspection utilization is also strictly less than 1,
the expected utilization for the rework station will be (13.514×0.26)/15 = 0.2342
(again, ignoring the resource-capacity schedule). If you run Model 5-2 ignoring
the resource-capacity schedules and machine failures, you’ll see that the model
matches our expectation.
The resource-capacity schedules and the machine failures will have the effect
of reducing the available capacities of the resources. For the resource-capacity
schedules, it’s instructive to consider the daily arrival and service rates for the
inspection and rework operations. Since the inspection operators work a combined
21 hours/day (due to the three one-hour meal breaks), the daily processing rate is
21×20 = 420 and the expected utilization is (24×13.514)/420 = 0.7722. Similarly,
since the inspection operator works only during second shift, the daily processing
rate is 8 × 15 = 120 and the expected utilization is (24 × 13.514 × 0.26)/120 =
0.7027.
We’ll take a slightly different approach for the machine failures. Recall that the
expected uptime for the placement machine is 6 hours and the expected time
to repair it is 30 minutes. As such, the machine is failed for approximately 30
minutes out of every 390 minutes, or 7.692% of the time. Since the expected
percentage of time that the placement machine is idle ((1−0.9010)×100 = 9.91%)
is greater than the expected percentage of failed time, we’d expect the system
to remain stable.
Table 5.7 gives the pertinent results based on 50 replications of 600-day runs
with 100-day warmup. As these values appear to match our expectation, we
have strong evidence that our model is correct (verified) and we can now use
the model to analyze the system.
Remove Watermark Wondershare
PDFelement
Just to make the model interesting, we’ll also assume that the three fine-pitch
placement machines are not identical. More specifically, we’ll assume that we
have a fast machine, a medium machine, and a slow machine where the processing
times are random and are distributed as follows:
• Fast — Triangular(8, 9, 10);
• Medium — Triangular(10, 12, 14); and
Remove Watermark Wondershare
PDFelement
We next connected the output node of the Placement object to the input nodes
of the three new server objects using Connector objects (branching) and similarly
connected the output nodes of the new server objects to the input node of the
Inspection object (merging).
The model now has five server object instances and it’s an opportune time to
demonstrate the use of the properties spreadsheet view. This view presents the
common properties of all instances of a given object in familiar spreadsheet format.
Figure 5.32 shows Model 5-3 with the properties spreadsheet view open. You
can open the properties spreadsheet view by right-clicking on an object instance
and choosing the Open properties spreadsheet view for all objects of
this type ... option from the context menu. You can also open the view
Remove Watermark Wondershare
PDFelement
using the Properties button from the Windows section of the Project Home
ribbon. The properties spreadsheet view includes the same standard sorting and
filtering options that other spreadsheet views include and it can be quite useful
for models with multiple instances of the same objects.
In our first example of branching in Section 5.2, we used link weights to select
randomly between the alternative entity destinations. We could easily use
this same logic to select the fine-pitch machine, but this is likely not what
we want. Rather than selecting the machine randomly, we’d like to select the
“first available” machine. We’ll use a Simio node list to implement this logic.
In order to use the node list, we must first define the list and then tell the
Placement object’s output node to use the list to determine the destination
for the PCB objects. To define the list, select the Model in the Navigation
pane, select the Definitions tab, and the Lists icon from the Definitions
panel. Note that Simio supports String, Object, Node, and Transporter lists.
Click on the Node icon in the Ribbon to create a new node list and then add
the input nodes for the three fine-pitch objects (Input@FinepitchFastStation,
Input@FinepitchMediumStation, and Input@FinepitchSlowStation) to the
node list in the bottom pane of the main window (see Figure 5.33). Note that
each of the Node list items in the bottom pane is selected from a pull-down list
that includes all of the nodes in the model.
Now that we have the list defined, we need to tell Simio how to select one of the
list elements. In the real system, we’d like to send the PCB to the machine that
will be available first. Since the processing times are random and the machines
are subject to random failures, we won’t know for sure which one will be available
first, so we’ll use a surrogate measure — we’ll select the machine with the fewest
boards already waiting for or en route to the machine. To implement this logic,
select the output node for the Placement object and set the parameters to the
Remove Watermark Wondershare
PDFelement
Figure 5.34: Properties for the output node of the Placement object.
The Entity Destination Type and Node List Name properties tell Simio to use
the FinePitchStations list (Figure 5.33) and the Selection Goal property indicates
that the smallest value of the Selection Expression. So, when an entity arrives
at the node, Simio will evaluate the expression for each of the candidate nodes
in the list, and will route the entity to the node with a minimum value of that
expression.
The expression value, Candidate.Node.AssociatedStationOverload requires
some explanation. The Candidate.Node keyword indicates that we want to
consider each candidate node from the list. The AssociatedStationOverload
Remove Watermark Wondershare
PDFelement
function returns the Overload for each of the stations associated with the nodes
(the fine-pitch machine objects, in our case). The AssociatedStationOverload
property is defined in the Simio Reference Guide as:
• "For an external input node, returns the current difference between the
load and capacity values (a positive difference indicating an ‘overload’)
for the station locations inside the node’s associated object that may be
entered using the node.
• The associated station ‘load’ is defined as the sum of entities currently en
route to the node intending to enter the stations, plus the current number
of entities arrived to the node but still waiting to enter the stations, plus
the current number of entities occupying the stations. This function returns
the difference between that load and the current station capacity (Overload
= Load - Capacity)."
So when an entity reaches the output node of the Placement object, Simio will
select the input node for the fine-pitch machine that has minimum overload
(a measure of the workload waiting for the machine, in our context) and then
route the entity to that node. If there are multiple nodes with the same overload
value (e.g, when the first board arrives, all three machines are empty and idle),
Simio will select the node based on the list order (i.e., the first node with the
minimum value). Important Note: Functions like AssociatedStationOverload
and AssociatedStationLoad don’t work well when Input Buffer Capacity is
Infinity. You might recall from basic math that Infinity plus anything equals
Infinity. So when infinite capacity queues are involved, a tie will result. For our
problem, we put the fast machine first so that it would have priority in the case
of ties. In addition to AssociatedStationOverload, the AssociatedStation
keyword can be used in combination with many values associated with the
station. Common uses include (you can see and select from the alternatives by
opening the value in the expression builder and using the down arrow to open
the display):
Now that the logic for the fine-pitch placement process has been incorporated
into our model, we’ll add one more set of user-defined statistics so that we can
track the proportion of times that the fast, medium, and slow machines are
selected, respectively. We do this for two reasons: first, for model verification —
we expect approximately 38%, 33%, and 29% of the processing to be done by
the fast, medium, and slow machines, respectively (see Problem 8 at the end of
the chapter); and second, to demonstrate how to set up another user-defined
statistic. The steps for creating the user-defined statistics are:
Remove Watermark Wondershare
PDFelement
• Define a model state to record the number of times each machine is used
to process a board;
• Increment the corresponding model state when one of the fast-pitch ma-
chines completes processing; and
• Tell Simio to report an Output Statistic for each proportion.
For the first step, select the Model in the Navigation window, select the
Definitions tab, and the States icon from the Definitions panel. Then add the
three Discrete States (NumFast, NumMedium, and NumSlow — see Figure 5.35).
Figure 5.35: Defining the model states to track the fast-pitch machine process
counts.
Note that when we defined the user statistic to track the numbers of times
boards are processed by the placement machine (Section 5.3.1), we used an entity
state rather than a model state. This was because we were tracking an entity
characteristic in that case, whereas we’re tracking a model characteristic in this
case. This is a very important distinction when you’re creating user-defined
statistics. For the second step, we’ll use the same method that we used in Section
5.3.1 — we’ll use the State Assignments property associated with the Server
objects and will increment the NumFast, NumMedium, and NumSlow states in the
respective BeforeExiting repeat group. Finally, select the Elements icon from
the model Definitions Panel and add the three Output Statistics to compute
the proportion of processing steps completed by each machine. Recall that an
Output Statistic reports the value of an expression at the end of a replication.
The expression for the proportion of times the fast machine is used is:
property
Comparing these two methods, the benefit of using your own states is that you
know exactly how the values are tracked and you can customize them as you
see fit, but using the Simio-provided states is somewhat easier (since you don’t
have to define or increment the states). It’s important to know how to use both
methods — defining your own states and using Simio’s built-in states.
label and not the property), select Set Referenced Property from the pop-up
menu, and select Create New Referenced Property from the bottom of the
menu. This will bring up a dialog box where you enter the Reference Property
name (we used InitialCapacityFast). Next, follow the same procedure to
define the referenced properties for the medium and slow fine-pitch servers.
Figure 5.36: Setting the referenced property for the fast fine-pitch station.
After defining the three referenced properties, select the Model from the Naviga-
tion window, select the Definitions tab and the Properties panel to display
the newly defined Reference Properties (see Figure 5.37).
This is where we set the Default Value property (set to 1 in Model 5-4). At this
point, we have defined the new referenced properties and told Simio to use these
properties to define the Initial Capacity properties for the three fine-pitch servers.
Note that the referenced property values for interactive runs can be set in the
Model Properties (right-click on the Model in the Navigation window and select
Properties from the context menu). The next step is to define the experiment
that we’ll use to compare our three alternatives. Before defining the experiment,
we’ll adjust the Processing Time properties for the three fine-pitch stations so
that the performance differences will be exaggerated (just for demonstration
purposes). The new processing-time distributions are Triangular(8,9,10),
Remove Watermark Wondershare
PDFelement
Figure 5.38: Experiment Design for Model 5-4 showing the referenced properties
and Subset Selection results.
Three aspects of our experiment warrant discussion at this point – the Controls
and Responses (columns in the experiment table) and the Scenarios (rows in the
experiment table). We introduced experiment Responses in Section 4.5, where
we demonstrated how responses are used in Simio MORE (SMORE) plots. In
Model 5-4, we’ve defined the following responses:
• TIS (Time in System): The time that an average entity (PCB) spends in
the system. Simio tracks this statistic automatically for each entity type
(PCB.Population.TimeInSystem.Average for the PCB objects).
• WIP (Work in Process): The average number of entities (PCBs) in the
system. Simio also tracks this statistic automatically for each entity type
(PCB.Population.NumberInSystem.Average for the PCB objects).
• Num Times: The average number of times that an entity is processed
by the placement machine. We defined the corresponding tally statistic
in Section 5.3.1 and use the expression NumTimesProcessed.Average to
access the average value.
You can see in Figure 5.38 that the current response values are displayed as
Remove Watermark Wondershare
PDFelement
the experiment runs. The controls columns include the referenced properties
that we created and used to specify the initial capacities of the three fine-pitch
placement machine objects. In an experiment, the values for these properties
can be set, and we can define a scenario by specifying the number of replications
to run and values for each of the three referenced properties. As shown in
Figure 5.38, we’ve defined three scenarios using the referenced properties to
define the configurations — one for adding a fast machine, one for adding a
medium machine, and one for adding a slow machine (and named accordingly).
With multiple scenarios, you can explicitly control which ones Simio runs by
checking/unchecking the boxes in the far left column of the experiment table.
Depending on your computer processor type, Simio will run one or more scenarios
simultaneously.
Figure 5.39 shows the Response Chart tab (the SMORE plot, introduced in
Section 4.5) for our 3-scenario experiment with the TIS response selected. Note
that the three SMORE plots are displayed on the same scale allowing a direct
comparison. For these SMORE plots, we specified the Upper Percentile as 90%
and the Lower Percentile as 10%, so the box in the box plot contains the middle
80% of the responses from the 300 replications; we also opted to display the
plots with the value axes’ being horizontal, via the Rotate Plot button in the
Response Chart ribbon. As we might expect, the Add Fast scenario appears
to be better (smaller average times in system) than the other two, and Add
Medium appears better than Add Slow; you’ll find a similar pattern with the
WIP Responses selected from the pull-down near the top left of the chart (not
shown).
Figure 5.40 shows the SMORE plot for the average number of times that an
entity is processed by the placement machine (the NumTimes Response). As
we’d expect, the number of times that a board is processed does not appear to
depend on whether we buy a fast, medium, or slow fine-pitch placement machine.
While some scenarios may appear better than others in the SMORE plots for
TIS and WIP, we must be careful to use statistically valid comparisons before
drawing formal conclusions. One route to this might be to use Simio’s Export
Details capability (discussed in Section 4.6) to create a CSV file with each
response from each replication, and then import that into a dedicated statistical-
analysis package that will provide several statistical-comparison methods. One
such method, if we’re interested in comparing means, is the classical paired-t
approach to building a confidence interval on the difference between means of two
scenarios, or doing hypothesis tests on the difference between two means. Here,
we use the paired-t approach, rather than the two-sample-t approach, since the
same underlying random numbers are used to run all scenarios, so they are not
independent. The paired approach can tolerate this non-independence, but the
two-sample approach requires independent samples, so separate random numbers
across all scenarios. Note that this allows only two scenarios to be compared
at a time, so in a situation like ours with more than two scenarios, we could
perhaps do all pairwise comparisons (Fast vs. Medium, then Fast vs. Slow, then
Remove Watermark Wondershare
PDFelement
Figure 5.40: SMORE plot for the NumTimes Response in Model 5-4.
Remove Watermark Wondershare
PDFelement
Medium vs. Slow), but we need to remember that the overall confidence level
degrades when doing multiple statistical comparisons in this way. Alternatively,
methods like analysis of variance (ANOVA) could be used to compare all the
means at once, with standard post-test multiple-comparison methods (Tukey,
Scheff’{e}, Bonferroni, etc.) For details, see any standard statistics text.
Since this situation of comparing multiple alternative scenarios is quite common
in simulation applications, special statistical methods have been developed for
it. If you look back carefully at the TIS and WIP response columns in Figure
5.38, you’ll notice that the Response values for the Add Medium and Add Slow
scenarios are shaded light brown, but are shaded darker brown for the Add Fast
scenario. This is a result of the Subset Selection Analysis available in Simio
Experiments, which uses sound statistical methods from (Boesel et al., 2003) to
divide the scenarios into two subsets in terms of their estimated mean responses,
“possible best” (shaded the darker brown) and “rejects” (shaded the light brown),
based on the 300 replications that were already run for each scenario. The
essential interpretation of this, per (Nelson, 2013), is that “everything in the
[possible-best] subset is statistically indistinguishable from the sample best” in
terms of sample means. To make this Subset Selection happen, after completing
your Experiment runs, first select the TIS response in the Experiment Design
window, and in the resulting Properties grid under Objective, select Minimize
(via the pull-down at the right) since smaller values for average time in system
are better. Then, in the ribbon for the Experiment Design, click on the Subset
Selection icon in the Analysis section, and the algorithm decides which scenarios
are “possible best” (Add Fast, which is shaded the darker brown), and which
are “rejects” (Add Medium and Add Slow, which are shaded the light brown).
You should choose the overall statistical confidence level for this conclusion in
the Experiment Properties under Confidence Level to be 90%, 95%, 98%, or
99%. You can repeat all this for the WIP Responses, where smaller is once
again better, so you would again choose Minimize for the Objective property;
we’d actually done this, and happened to get the same subsets of “possible best”
and “rejects” as we did for the TIS responses, though such agreement for all
responses is generally not to be expected. (We did not do Subset Selection for
the NumTimes Responses since it’s not clear whether we “want” this to be big
or small.)
In Subset Selection, things don’t always work out as conclusively as they did in
this example, since the subset of “possible best” scenarios could contain more
(maybe a lot more) than just a single scenario. In such a case, Simio provides an
Add-In, Select Best Scenario using KN, available under the Select Add-In icon
on the Experiment ribbon, to narrow things down for you; again, this is based on
means. Using algorithms in (Kim and Nelson, 2001), this add-in commandeers
your Experiment run, sequentially increasing the number of replications for some
scenarios as called for by the algorithm, in order to isolate one scenario as very
likely “the best,” based on the Response you select (only one Response at a time
can be considered). You must provide a confidence level for this selection, and
an indifference zone (a value small enough so that you don’t care if the mean of
Remove Watermark Wondershare
PDFelement
your selection is inferior to the mean of the true best scenario by this amount
or less), as well as a replication limit that you might set based on your initial
experimentation with the model. For more information on how this procedure
works in Simio, see the Simio Reference Guide topic “Select Best Scenario Using
KN Add-In,” and of course (Kim and Nelson, 2001) for the underlying methods;
in Section 9.1.2 we use this KN Add-In to select the best scenario in a larger
example.
5.6 Summary
In this chapter we’ve moved things along into intermediate modeling with several
new Simio concepts, building on a firmer foundation of how the object orientation
of Simio is defined. We also have discussed how to do a sound statistical analysis
when comparing multiple alternate simulated scenarios. All of this provides a
solid basis for further study of simulation with Simio, including model data,
animation, and advanced modeling techniques, to be covered in the chapters
that follow.
5.7 Problems
1. What is the difference between an object property and an object state?
2. Consider a process associated with a Server object. What is the difference
between a token’s parent object and it’s associated object?
3. Develop a queueing model that gives the steady-state values analogous to
the values in Table 5.2 (Model 5-1 with exponential processing times at
both stations).
4. Consider an office where people come to get their drivers’ licenses. The pro-
cess involves three steps for arriving customers — reception / application;
a vision exam; and a written exam. Assume that customer arrivals are
Poisson with a rate of 6 per hour (i.e., interarrival times are exponentially
distributed with mean 10 minutes). The processing time distributions
for the three processes are given in Table 5.8. The office has one person
responsible for reception/application and one person responsible for admin-
istering the vision exams. The written exam is computer-based and there
are three computer stations where customers can take the exam. Develop a
Simio model of this system. Assume that the office opens at 9:00 a.m. and
closes at 5:00 p.m. The performance metrics of interest include the time
that customers spend in the system, the utilizations of the office employees
and the computer stations, and the average and maximum numbers of
customers in the reception/application queue, the vision exam queue, and
the written exam queue. How many replications should be run in order to
be confident about your results? Justify your answer.
5. Animate the model from Problem 4. If you did not already do so, specify
a reasonable office layout and use Path object to incorporate customer
Remove Watermark Wondershare
PDFelement
movement through the office. Make sure that the distances between
stations are reasonable for a drivers’ license office and that the entity speed
is appropriate for humans walking.
6. In Model 5-2, we assumed that the inspection workers did not overlap
between shifts (i.e., there were never two inspectors working at the same
time). Modify the model so that the inspectors do overlap for the first
hour of one shift and the last hour of the other shift. Compare the results
of the two models. Does having the inspectors overlap help?
7. In the description of Model 5-2, we noted that there is no limit on the
number of times that a board may be found in need of rework. Modify
Model 5-2 so that if a board fails the inspection more than two times, it
is rejected as a bad part. Count the number of boards that are rejected
because of 3 or more failures of inspection.
8. In the description of Model 5-3, we indicated that as part of our model
verification, we had predicated the proportions of parts that would go to the
fast, medium and slow fine-pitch placement machines (38%, 33%, and 29%,
respectively). Develop a queueing model to estimate these proportions.
9. Consider a pharmacy where customers come to have prescriptions filled.
Customers can either have their doctor fax their prescriptions ahead of time
and come at a later time to pick up their prescriptions or they can walk in
with the prescriptions and wait for them to be filled. Fax-in prescriptions
are handled directly by a pharmacist who fills the prescriptions and leaves
the filled prescriptions in a bin behind the counter. Historical records
show that approximately 59% of customers have faxed their prescriptions
ahead of time and the times for a pharmacist to fill a prescription are
triangularly distributed with parameters (2,5,8) minutes. If an arriving
customer has faxed his/her prescription in already, a cashier retrieves the
filled prescription from the bin and processes the customer’s payment.
Historical records also indicate that the times required for the cashier to
retrieve the prescriptions and process payment are triangularly distributed
with parameters (2,4,6) minutes. If an arriving customer has not faxed the
prescription ahead of time, the cashier processes payment and sends the
prescription to a pharmacist, who fills the prescription. The distributions
of the cashier times and pharmacist times are the same as for the fax-in
customers (triangular(2,4,6) and triangular(2,5,8), respectively). Fax-in
and customer arrival rates vary during the day as do the pharmacy staffing
levels. Table 5.9 gives the arrival and staffing data where C is the number
of cashiers, P is the number of Pharmacists, λ1 is the arrival rate for
fax-in prescriptions and λ2 is the arrival rate for customers. Develop a
Simio model of this pharmacy. Performance metrics of interest include
the average time fax-in prescriptions take to be filled, the average time
customers spend in the system, and the scheduled utilizations of the cashiers
and pharmacists. Assume that the pharmacy opens at 8:00 a.m. and closes
at 10:00 p.m. and you can ignore faxes and customers that are still in
the system at closing time (probably not the best customer service!). Use
500 replications for your analysis and generate the SMORE plots for the
Remove Watermark Wondershare
PDFelement
Time Period C P λ1 λ2
8:00 a.m. - 11:00 a.m. 1 2 10 12
11:00 a.m. - 3:00 p.m. 2 3 10 20
3:00 p.m. - 7:00 p.m. 2 2 10 15
7:00 p.m. - 10:00 p.m. 1 1 5 12
Remove Watermark Wondershare
PDFelement
S1 S2 S3 S4
ST (secs) unif(10, 20) tria(20, 30, 40) unif(60, 84) expo(40)
Servers (c) 1 1 2 1
F/R prob. 0.15 0.30 0.33 0.08
Remove Watermark Wondershare
PDFelement
Chapter 6
Input Analysis
In the simulation models of Chapters 3-5, there were many places where we
needed to specify probability distributions for input, as part of the modeling
process. In Model 3-3 we said that the demand for hats was a discrete uniform
random variable on the integers {1000, 1001, . . . , 5000}. In Models 3-5, 4-1, and
4-2, we said that interarrival times to the queueing system had an exponential
distribution with mean 1.25 minutes, and that service times were exponentially
distributed with mean 1 minute; in Models 4-3 and 4-4, we changed that service-
time distribution to be triangularly distributed between 0.25 and 1.75 with
a mode of 1.00, which is probably a more realistic shape for a service-time
distribution than is the exponential (which has a mode of 0). The models
in Chapter 5 used exponential, triangular, and uniform input distributions to
represent interarrival, processing, inspection, and rework times. And in the
models in the chapters to follow there will be many places where we need to
specify probability distributions for a wide variety of inputs that are probably
best modeled with some uncertainty, rather than as fixed constants. This raises
two questions:
1. How do you specify such input distributions in practice (as opposed to just
making them up, which we authors get to do, after some experimentation
since we’re trying to demonstrate some ideas and make some points)?
2. Once you’ve somehow specified these input distributions, how do you
“generate” values from them to make your simulation go?
We’ll discuss both in this chapter, but mostly the first question since it’s some-
thing that you will have to do as part of model building. The second question
is fortunately pretty much covered within simulation software like Simio; still,
you need to understand the basics of how those things work so you can properly
design and analyze your simulation experiments.
We do assume in this chapter (and for this whole book in general) that you’re
225
Remove Watermark Wondershare
PDFelement
already comfortable with the basics of probability and statistics. This includes:
• Confidence intervals for means and other population parameters, and how
they’re interpreted.
• Hypothesis tests for means and other population parameters (though we’ll
briefly discuss in this chapter a specific class of hypothesis tests we need,
goodness-of-fit tests), including the concept of the p-value (a.k.a. observed
significance level) of a hypothesis test.
If you’re rusty on any of these concepts, we strongly suggest that you now dust
off your old probability/statistics books and spend some quality time reviewing
before you read on here. You don’t need to know by heart lots of formulas, nor
have memorized the normal or t tables, but you do need familiarity with the
ideas. There’s certainly a lot more to probability and statistics than the above
list, like Markov and other kinds of stochastic processes, regression, causal path
analysis, data mining, and many, many other topics, but what’s on this list is
all we’ll really need.
Figure 6.1: Data file with 47 observed service times (in minutes).
that fitted distribution to drive the simulation. There are several reasons:
• As you’ll see in later chapters, we typically want to run simulations for a
very long time and often repeat them for a large number of IID replications
in order to be able to draw statistically valid and precise conclusions from
the output, so we’d simply run out of real-world input data in short order.
• The observed data in Figure 6.1 and in Data_06_01.xls represent only
what happened when the data were taken at that time. At other times, we
would have observed different data, perhaps just as representative, and in
particular could have gotten a different range (minimum and maximum) of
data. If we were to use our observed data directly to drive the simulation,
we’d be stuck with the values we happened to get, and could not generate
anything outside our observed range. Especially when modeling service
times, large values, even if infrequent, can have great impact on typical
queueing congestion measures, like average time in system and maximum
queue length, so by “truncating” the possible simulated service times on
the right, we could be biasing our simulation results.
• Unless the sample size is quite large, the observed data could well leave
gaps in regions that should be possible but in which we just didn’t happen
to get observations that time, so such values could never happen during
the simulation.
So, there are several reasons why fitting a probability distribution, and then
generating random variates from it to drive the simulation, is often preferred
over using the observed real-world data directly. One specific situation where
driving the simulation directly from the observed real-world data might be
a good idea is in model validation, to assess whether your simulation model
accurately reproduces the performance of the real-world system. Doing this,
though, would require that you have the output data from the real-world system
against which to match up your simulation outputs, which might not be the
case if your data-collection efforts were directed at specifying input distributions.
However, some recent work ((Song et al., 2014), (Song and Nelson, 2015)) has
shown that there are cases where sampling from sets of observed data is the
preferred approach to fitting a probability distribution. We will briefly discuss
this topic and the Simio method for sampling from observed data sets in Section
6.5. Our initial job, then, is to figure out which probability distribution best
Remove Watermark Wondershare
PDFelement
possibly be. Browsing through a list of PDF plots of distributions (such as the
Simio Reference Guide cited above and in Simio via the F1 key or the ? icon near
the upper right corner), possibilities might be Erlang, gamma (a generalization
of Erlang), lognormal, Pearson VI, or Weibull. But each of these has parameters
(like shape and scale, for the gamma and Weibull) that we need to estimate; we
also need to test whether such distributions, with their parameters estimated
from the data, provide an acceptable fit, i.e., an adequate representation of our
data. This estimating and goodness-of-fit testing is what we mean by fitting a
distribution to observed data.
Figure 6.3: Histogram of the observed 47 service-times (in minutes) in data file.
Stat::Fit that you can download from this book’s web site. Figure 6.4 shows
Stat::Fit with our service-time data pasted into the Data Table on the left. You
can just copy/paste your observed real-world data directly from Excel; only the
first 19 of the 47 values present appear, but all 47 are there and will be used by
Stat::Fit. In the upper right is the histogram of Figure 6.3, made via the menu
path Input → Input Graph (or the Graph Input button on the toolbar); we
changed the number of intervals from the default 7 to 17 (Input → Options,
or the Input Options button labeled just OPS on the toolbar). In the bottom
right window are some basic descriptive statistics of our observed data, made
via the menu path Statistics → Descriptive.
Figure 6.4: Stat::Fit with data file, histogram, and descriptive statistics (data in
minutes).
To view PMFs and PDFs of the supported distributions, follow the menu path
Utilities → Distribution Viewer and then select among them via the pull-
down field in the upper right of that window. Note that the free textbook
version of Stat::Fit includes only seven distributions (binomial and Poisson for
discrete; exponential, lognormal, normal, triangular, and uniform for continuous)
and is limited to 100 data points, but the full commercial version supports 33
distributions and allows up to 8000 observed data points.
We want a continuous distribution to model our service times, and don’t want
to allow even a small chance of generating a negative value, so the qualitatively
sensible choices from this list are exponential, lognormal, triangular, and uniform
(from among those in the free textbook version — the full version, of course, would
include many other possible distributions). Though the histogram shape certainly
Remove Watermark Wondershare
PDFelement
would seem to exclude uniform, we’ll include it anyway just to demonstrate what
happens if you fit a distribution that doesn’t fit very well. To select these four
distributions for fitting, follow the menu path Fit → Setup, or click the Setup
Calculations button (labeled just SETUP) on the toolbar, to bring up the Setup
Calculations window. In the Distributions tab (Figure 6.5), click one at a time
on the distributions you want to fit in the Distribution List on the left, which
copies them one by one to the Distributions Selected list on the right; if you
want to remove one from the right, just click on it there.
The Calculations tab (Figure 6.6) has choices about the method to form the
Estimates (MLE, for Maximum Likelihood Estimation, is recommended), and
the Lower Bound for the distributions (which you can select as unknown and
allow Stat::Fit to choose one that best fits your data, or specify a fixed lower
bound if you want to force that). The Calculations tab also allows you to pick
the kinds of goodness-of-fit Tests to be done: Chi Squared, Kolmogorov-Smirnov,
or Anderson-Darling, and, if you selected the Chi Squared test, the kind of
intervals that will be used (Equal Probability is usually best). See Section 6.1.5
for a bit more on assessing goodness of fit; for more detail see (Banks et al.,
2005) or (Law, 2015).
The Lower Bound specification requires a bit more explanation. Many distri-
butions, like exponential and lognormal on our list, usually have zero as their
customary lower bound, but it may be possible to achieve a better fit to your data
with a non-zero lower bound, essentially sliding the PDF left or right (usually
right for positive data like service times) to match up better with the histogram
of your data. If you select fixed here you can decide yourself where you’d
like the lower end of your distribution to start (in which case the field below it
becomes active so you can enter your value — the default is the minimum value
in your data set, and entering 0 results in the customary lower bound). But if
you select unknown here the numerical field becomes inactive since this selection
lets Stat::Fit make this determination, which will usually be a bit less than the
minimum observation in your data set to get a good fit. Click Save Apply to
Remove Watermark Wondershare
PDFelement
To fit the four distributions you chose to represent the service-time data, follow
the menu path Fit → Goodness of Fit, or click the Fit Data button (labeled
just FIT) in the toolbar, to produce a detailed window of results, the first part
of which is in Figure 6.7.
A brief summary is at the top, with the test statistics for all three tests applied
to each distribution; for all of these tests, a smaller value of the test statistic
indicates a better fit (the values in parentheses after the Chi Squared test
statistics are the degrees of freedom). The lognormal is clearly the best fit,
followed by exponential, then triangular, and uniform is the worst (largest test
statistics).
In the “detail” section further down, you can find, well, details of the fit for each
distribution in turn; Figure 6.7 shows these for only the exponential distribution,
and the other three distributions’ fit details can be seen by scrolling down in
this window. The most important parts of the detail report are the p-values for
each of the tests, which for the fit of the exponential distribution is 0.769 for
the Chi Squared test, 0.511 for the Kolmogorov-Smirnov test, and 0.24 for the
Anderson-Darling test, with the “DO NOT REJECT” conclusion just under each
of them. Recall that the p-value (for any hypothesis test) is the probability that
you would get a sample more in favor of the alternate hypothesis than the sample
that you actually got, if the null hypothesis is really true. For goodness-of-fit
tests, the null hypothesis is that the candidate distribution adequately fits the
data. So large p-values like these (recall that p-values are probabilities, so are
always between 0 and 1) indicate that it would be quite easy to be more in favor
of the alternate hypothesis than we are; in other words, we’re not very much in
favor of the alternate hypothesis with our data, so that the null hypothesis of an
adequate fit by the exponential distribution appears quite reasonable.
Another way of looking at the p-value is in the context of the more traditional
Remove Watermark Wondershare
PDFelement
Figure 6.7: Stat::Fit Goodness of Fit results window (detail shown for only
the exponential distribution; similar results for the lognormal, triangular, and
uniform distributions are below these when scrolling down).
Remove Watermark Wondershare
PDFelement
This gives the overall acceptance (or not) conclusion for each distribution, re-
ferring to the null hypothesis of an adequate fit, without the p-values, and in
addition the parameters of the fitted distributions (with Stat::Fit’s parameteri-
zation conventions, which, as noted earlier, are not universally agreed to, and
so in particular may not agree with Simio’s conventions in every case). The
rank column is an internal score given by Stat::Fit, with larger ranks indicating
a better fit (so lognormal is the best, consistent with the p-value results from
the detailed report). A graphical comparison of the fitted densities against the
histogram is available via Fit → Result Graphs → Density, or the Graph Fit
button on the toolbar, shown in Figure 6.9.
By clicking on the distributions in the upper right you can overlay them all (in
different colors per the legend at the bottom); you can get rid of them by clicking
in the lower-right window. This provides our favorite goodness-of-fit test, the
Remove Watermark Wondershare
PDFelement
Figure 6.9: Stat::Fit overlays of the fitted densities over the data histogram.
eyeball test, and provides a quick visual check (so we see just how ridiculous the
uniform distribution is for our service-time data, and the triangular isn’t much
better).
The final step is to translate the results into the proper syntax for copying
and direct pasting into Simio expression fields. This is on File → Export →
Export fit, or the Export toolbar button, and brings up the EXPORT FIT
dialog shown in Figure 6.10.
distribution, you’re done. Note that Stat::Fit is recommending that we shift the
lognormal distribution up (to the right) by 17.4 in order to get a better fit to our
data, rather than stay with the customary lower end of zero for the lognormal
distribution; this shift value of 17.4 is a little less than the minimum value of
19.0 in the data set, so that the fitted lognormal density function will “hit zero”
on the left just a bit to the left of the minimum data value (so when generating
variates, the smallest possible value will be 17.4).
You can save all your Stat::Tools work, including the data, distribution selection,
results, and graphics. As usual, do File → Save or Save As, or the usual Save
button. The default filename extension is .sfp (for Stat::Fit Project); we chose
the file name Data_06_01.sfp.
In Figure 6.9, what we’re looking for in a good fit is good (or at least reasonable)
agreement between the histogram (the blue bars) and the PDFs of the fitted
distributions (the lines of various colors in the legend at the bottom); for this
discussion we’ll assume we’re fitting a continuous distribution. While this desire
is intuitive, there’s also a mathematical reason for it.
Now, let fb(x) be the PDF of the fitted distribution under consideration. If this
is really the right PDF to represent the data, then the probability that a data
Remove Watermark Wondershare
PDFelement
point in our observed sample falls in the jth interval [xj−1 , xj ) would be
Z xj
pj = fb(x)dx,
xj−1
and under the null hypothesis H0 that the observed data follow the fitted
distribution fb, χ2k−1 has (approximately (more precisely, asymptotically, i.e., as
n → ∞.})\index{Asymptotically Valid) a chi-squared distribution with k − 1
degrees of freedom. So we’d reject the null hypothesis H0 of a good fit if the
value of the test statistic χ2k−1 is “too big” (or inflated as it’s sometimes called).
How big is “too big” is determined by the chi-squared tables: for a given size
α of the test, we’d reject H0 if χ2k−1 > χ2k−1,1−α where χ2k−1,1−α is the point
above which is probability α in the chi-squared distribution with k − 1 degrees
of freedom. The other way of stating the conclusion is to give the p-value of the
test, which is the probability above the test statistic χ2k−1 in the chi-squared
distribution with k − 1 degrees of freedom; as usual with p-values, we reject H0
at level α if and only if the p-value is less that α.
Note that the value of the test statistic χ2k−1 , and perhaps even the conclusion
of the test, depends on the choice of the intervals. How to choose these intervals
is a question that has received considerable research, but there’s no generally
accepted “right” answer. If there is consensus, it’s that (1) the intervals should
be chosen equiprobably, i.e., so that the probability values pj of the integrals are
equal to each other (or at least approximately so), and (2) so that npj is at least
(about) 5 for all intervals j (the latter condition is basically to discourage use of
the chi-squared goodness-of-fit test if the sample size is quite small). One way
to find the endpoints of equiprobable intervals is to set xj = Fb−1 (j/k), where
Fb is the CDF of the fitted distribution, and the superscript −1 denotes the
functional inverse (not the arithmetic reciprocal); this entails solving the equation
Fb(xj ) = j/k for xj , which may or may not be straightforward, depending on the
form of Fb, and so may require use of a numerical-approximation root-finding
algorithm like the secant method or Newton’s method.
Remove Watermark Wondershare
PDFelement
where “sup” is the supremum, or the least upper bound across all values of x.
The reason for not using the more familiar max (maximum) operator is that
the largest vertical discrepancy might occur just before a “jump” of Femp (x), in
which case the supremum won’t actually be attained exactly at any particular
value of x.
A finite (i.e., computable) algorithm to evaluate the K-S test statistic Vn is
given in (Law, 2015). Let X1 , X2 , . . . , Xn denote the observed sample, and for
i = 1, 2, . . . , n let X(i) denote the ith smallest of the data values (so X(1) is the
smallest observation and X(n) is the largest observation); X(i) is called the ith
order statistic of the observed data. Then the K-S test statistic is
i i−1
Vn = max max − F (X(i) ) ,
b max F (X(i) ) −
b .
i=1,2,...,n n i=1,2,...,n n
It’s intuitive that the larger Vn , the worse the fit. To decide how large is too
large, we need tables or reference distributions for critical values of the test
for given test sizes α, or to determine p-values of the test. A disadvantage of
the K-S test is that, unlike the chi-squared test, the K-S test needs different
tables (or reference distributions) for different hypothesized distributions and
different sample sizes n (which is why we include n in the notation Vn for
the K-S test statistic); see~(Gleser, 1985) and~(Law, 2015) for more on this
point. Distribution-fitting packages like Stat::Fit include these reference tables
as built-in capabilities that can provide p-values for K-S tests. Advantages of
Remove Watermark Wondershare
PDFelement
the K-S test over the chi-squared test are that it does not rely on a somewhat
arbitrary choice of intervals, and it is accurate for small sample sizes n (not just
asymptotically, as the sample size n → ∞).
In Stat::Fit, the menu path Fit → Result Graphs → Distribution produces the
plot in Figure 6.11with the empirical CDF in blue, and the CDFs of various fitted
distributions in different colors per the legend at the bottom; adding/deleting
fitted distributions works as in Figure 6.9. While the K-S test statistic is not
shown in Figure 6.11 (for each fitted distribution, imagine it as the height of
vertical bar at the worst discrepancy between the empirical CDF and that fitted
distribution), it’s easy to see that the uniform and triangular CDFs are very
poor matches to the empirical CDF in terms of the largest vertical discrepancy,
and that the lognormal is a much better fit (in fact, it’s difficult to distinguish it
from the empirical CDF in Figure 6.11).
Figure 6.11: Stat::Fit overlays of the fitted CDFs over the empirical distribution.
in the plot. Since both the x and y coordinates of these points are probabilities
(empirical and fitted, respectively), this is called a probability-probability plot, or
a P-P plot.
In Stat::Fit, P-P plots are available via the menu path Fit → Result Graphs
→ PP Plot, to produce Figure 6.12 for our 47-point data set and our four trial
fitted distributions. As in Figures 6.9 and 6.11, you can add fitted distributions
by clicking them in the upper right box, and remove them by clicking them in
the lower right box. The P-P plot for the lognormal fit appears quite close to
the diagonal line, signaling a good fit, and the P-P plots for the triangular and
uniform fits are very far from the diagonal, once again signaling miserable fits
for those distributions. The exponential fit appears not unreasonable, though
not as good as the lognormal.
change the fact that we’re looking for a straight line.) Now, both the x and y
coordinates of these points are quantiles (fitted and empirical, respectively), so
this is called a quantile-quantile plot, or a Q-Q plot.
You can make Q-Q plots in Stat::Fit via Fit → Result Graphs → QQ Plot, to
produce Figure 6.13 for our data and our fitted distributions. As in Figures
6.9, 6.11, and 6.12, you can choose which fitted distributions to display. The
lognormal and exponential Q-Q plots appear to be the closest to the diagonal
line, signaling a good fit, except in the right tail where neither does well. The
Q-Q plots for the triangular and uniform distributions indicate very poor fits,
consistent with our previous findings. According to~(Law, 2015), Q-Q plots tend
to be sensitive to discrepancies between the data and fitted distributions in the
tails, whereas P-P plots are more sensitive to discrepancies through the interiors
of the distributions.
other data point in your data set. This might be suspect if the data
were sequentially collected on a process over time (as might often be the
case) where an observation has some kind of relationship with the next or
later observations, either a “physical” causal relationship or an apparent
statistical-correlation relationship.
It’s always good to have a contextual understanding of the system being modeled,
and of the way in which the data were collected. While there are formal statistical
tests for both the “I” and “ID” in IID, we’ll focus on a few simple graphical
methods to check these assumptions informally, and where possible, suggest
courses of action if either assumptions appears unwarranted from the data.
As before, let X1 , X2 , . . . , Xn denote the observed data, but now suppose that
the subscript i is the time-order of observation, so X1 is the first observation
in time, X2 is the second observation in time, etc. An easy first step to assess
IID-ness is simply to make a time-series plot of the data, which is just a plot of
Xi on the vertical axis vs. the corresponding i on the horizontal axis; see Figure
6.14, which is for the 47 service times we considered in Sections 6.1.1–6.1.5. This
plot is in the Excel spreadsheet file Data_06_02.xls; the original data from
Data_06_01.xls are repeated in column B, with the time-order of observation
i added in column A (ignore the other columns for now). For IID data, this
plot should look rather like an amorphous and uninteresting cloud of points,
without apparent visible persistent trends up or down or periodicities (which
could happen if the “ID” is violated and the distribution is drifting or cycling
over time), or strong systematic connections between successive points (which
could happen if the “I” is violated), which seems to be the case for these data.
Figure 6.15: Scatter plot (at Lag 1) for the 47 service times.
Remove Watermark Wondershare
PDFelement
Time-series and scatter plots can provide good intuitive visualization of possible
lack of independence, but there are numerical diagnostic measures as well.
Perhaps most obvious is to construct a correlation matrix showing the numerical
autocorrelation (_auto_correlation since it’s within the same data sequence)
estimates at various lags; we’ll do lags 1 through 3. Most standard statistical-
analysis packages can do this automatically, but we can do it in Excel as well.
Figure 6.16 shows columns A–E of Data_06_02.xls, except that rows 9–43 are
hidden for brevity, and you can see that columns C, D, and E are the original data
from column B except shifted up by, respectively, 1, 2, and 3 rows (representing
lags in the time-order of observation).
To make the autocorrelation matrix, use the Excel Data Analysis package,
via the Data tab at the top and then the Analyze area on the right (if you
don’t see the Data Analysis icon there, you need to load the Analysis ToolPak
add-in via the File tab at the top, then Options on the bottom left to get
the Excel Options window, then Add-ins on the left menu, and finally Manage
Excel Add-ins at the bottom). Once you’re in the Data Analysis window,
select Correlation, then OK, then select the input range $B$1:$E$45 (the blue-
shaded cells, noting that we had to omit the last three rows since we want
autocorrelations through lag 3), check the box for Labels in First Row, and
then where you’d like the output to go (we selected Output Range $G$37).
Figure ref{fig:AutocorrelMatrix} shows the results.
There are actually three estimates of the lag-1 autocorrelation (down the diagonal
from upper left to lower right), −0.07, −0.06, and −0.05 that are very close to
each other since they are using almost the same data (except for a few data points
at the ends of the sequence), and are all very small (remember that correlations
always fall between −1 and +1). Similarly, there are two estimates of the lag-2
Remove Watermark Wondershare
PDFelement
autocorrelation, −0.05 and −0.04, again very close to each other and very small.
The single estimate of the lag-3 autocorrelation, +0.24, might indicate some
positive relation between data points three observations apart, but it’s weak
in any case (we’re not addressing here whether any of these autocorrelation
estimates are statistically significantly different from zero). A visual depiction of
the autocorrelations is possible via a plot (called a correlogram, or in this case
within a single data sequence an autocorrelogram) with the lag (1, 2, 3, etc.) on
the horizontal axis and the corresponding lagged autocorrelation on the vertical
axis; Stat::Fit does this via the menu path Statistics → Independence →
Autocorrelation, with the result in Figure {fig:AutocorrelPlot} indicating the
same thing as did the autocorrelation matrix.
There are also many formal statistical hypothesis tests for independence within
a data set. Among these are various kinds of runs tests, that look in a data
sequence for runs of the data, which are a subsequences of data points that
go only up (or down), and in truly independent data the expected length and
frequency of such runs can be computed, against which the length and frequency
of runs in the data are compared for agreement (or not). Stat::Fit supports two
other runs tests (above/below median and turning points), via the menu path
Statistics → Independence → Runs Test (we’ll leave it to you to try this
Remove Watermark Wondershare
PDFelement
out).
So it appears that the independence assumption for our 47 service times is
at least plausible, having found no strong evidence to the contrary. Finding
that your data are clearly not independent mandates some alternative course of
action on your part, either in terms of modeling or further data collection. One
important special case of this in simulation is a time-varying arrival pattern,
which we discuss below in Section 6.2.3, and modeling this is well-supported by
Simio. But in general, modeling non-independent input process in simulation is
difficult, and beyond the scope of this book; the interested reader might peruse
the time-series literature (such as (Box et al., 1994)), for examples of methods for
fitting various kinds of autoregressive processes, but generating them is generally
not supported in simulation software.
Having focused on the “I” (Independent) assumption so far, let’s now consider
the “ID” (Identically Distributed) assumption. Deviations from this assumption
could be due to a heterogeneous data set, such as service times provided by
several different operators with different levels of training and skill. This is
sometimes detected by noting several distinct modes (peaks) in the histogram
of all the service times merged together. A good way to deal with this is to
try to track down which service times were provided by which operator, and
then alter the simulation model to have distinct server resources, with different
distributions for service times, and use appropriate and different distributions
for their service times depending on their training or skill. Another example
is in simulation of a hospital emergency department, where patients arrive
with different acuities (severities) in their conditions, and the various service
times during their stay could well depend on their acuity, so we would need
different service-time distributions for different acuities. Deviations from the
“ID” assumption could also happen if the distribution changes over time; in this
case we could try to identify the change points (either from physical knowledge
of the system, or from the data themselves) and alter the simulation model to
use different distributions during different time periods.
Note that in both the discrete and continuous cases, you’ll end up with a
distribution that’s bounded both below (by your minimum data point) and
above (by your maximum data point), i.e., it does not have an infinite tail in
either direction.
Obviously, this is not a good situation. What people usually do is ask an “expert”
familiar with the system (or similar systems) for, say, lowest and highest values
that are reasonably possible, which then specify a uniform distribution. If you
feel that uniform gives too much weight toward the extremes, you could instead
use a triangular distribution with a mode (peak of the PDF, not necessarily the
mean) that may or may not be in the middle of the range, depending on the
situation. Once you’ve done such things and have a model working, you really
ought to use your model as a sensitivity-analysis tool (see “What’s the Right
Amount of Data?” just below) to try to identify which inputs matter most to
the output, and then try very hard to get some data on at least those important
inputs, and try to fit distributions. Simio’s Input Parameters feature, discussed
in Section 6.5, may also provide guidance on which inputs matter most to key
output performance metrics.
Remove Watermark Wondershare
PDFelement
Another extreme situation is when you have a very large sample size of observed
real-world data of maybe thousands. Usually we’re happy to have a lot of data,
and really, we are here too. We just have to realize that, with a very large
sample size, the goodness-of-fit hypothesis tests will have high statistical power
(probability of rejecting the null hypothesis when it’s really false, which strictly
speaking, it always is), so it’s likely that we’ll reject the fits of all distributions,
even though they may look perfectly reasonable in terms of the eyeball test. In
such cases, we should remember that goodness-of-fit tests, like all hypothesis
tests, are far from perfect, and we may want to go ahead and use a fitted
distribution anyway even if goodness-of-fit tests reject it with a large sample
size, provided that it passes the eyeball test.
Speaking of sample size, people often wonder how much real-world data they
need to fit a distribution. Of course, there’s no universal answer possible to
such a question. One way to address it, though, is to use your simulation model
itself as a sensitivity-analysis tool to gauge how sensitive some key outputs are
to changes in your input distributions. Now you’re no doubt thinking “but I
can’t even build my model if I don’t know what the input distributions are,” and
strictly speaking, you’re right. However, you could build your model first, before
even collecting real-world data to which to fit input probability distributions,
and initially just use made-up input distributions — not arbitrary or crazy
distributions, but in most cases you can make a reasonable guess using, say,
simple uniform or triangular input distributions and someone’s general familiarity
with the system. Then vary these input distributions to see which ones have
the most impact on the output — those are your critical input distributions, so
you might want to focus your data collection there, rather than on other input
distributions that seem not to affect the output as much. As in the no-data
case discussed above, Simio’s Input Parameters feature in Section 6.5 may also
provide guidance as to how much relative effort should be expended collecting
real-world data on your model’s various inputs.
But there could be relationships between the different inputs across a simulation
model, in which case we really should view them as components (or coordinates)
of an input vector, rather than being independent; if some of these components
are random, then this is called a random vector, or a multivariate distribution.
Importantly, this allows for dependence and correlation across the coordinates of
the input random vector, making it a more realistic input than if the coordinates
were assumed to be independent — and this can affect the simulation’s output.
In the manufacturing example of the preceding paragraph, we could allow, say,
positive correlation between a given part’s processing and inspection times,
reflecting the reality that some parts are bigger or more problematic than are
other parts. It would also allow us to prevent generating absurdities in the
urgent-care clinic like a young child suffering from arthritis (unlikely), or an
elderly man with complications from pregnancy (beyond unlikely), both of which
would be possible if all these inputs were generated independently, which is
typically what we do. Another example is a fire-department simulation, where
the number of fire trucks and ambulances sent out on a given call should be
positively correlated (large fires could require several of each, but small fires
perhaps just one of each); see (Mueller, 2009) for how this was modeled and
implemented in one project. While some such situations can be modeled just
logically (e.g., for the health-care clinic, first generate gender and then do the
obvious check before allowing a pregnancy-complications diagnosis), in other
situations we can model the relationships statistically, with correlations or joint
probability distributions. If such non-independence is in fact present in the
Remove Watermark Wondershare
PDFelement
real-world system, it can affect the simulation output results, so ignoring it and
just generating all inputs independently across your model can lead to erroneous
results.
One way to specify an input random vector is first to fit distributions to each
of the component univariate random variables one at a time, as in Section
6.1; these are called the marginal distributions of the input random vector
(since in the case of a two-dimensional discrete random vector, they could be
tabulated on the margins of the joint-distribution table). Then use the data
to estimate the cross correlations via the usual sample-correlation estimator
discussed in any statistics book. Note that specifying the marginal univariate
distributions and the correlation matrix does not necessarily completely specify
the joint probability distribution of the random vector, except in the case of
jointly distributed normal random variables.
Stepping up the dimensionality of the input random vector to an infinite number
of dimensions, we could think of a (realization of) a stochastic process as being
an input driving the simulation model. Models of telecommunications systems
sometimes do this, with the input stochastic process representing a stream of
packets, each arriving at a specific time, and each being of a specific size; see
(Biller and Nelson, 2005) for a robust method to fit a very general time-series
model for use as an input stream to a simulation.
For more on such “nonstandard” simulation input modeling, see (Kelton, 2006)
and (Kelton, 2009), for example.
Simio supports generating arrivals from such a process in its Source object,
where entities arrive to the system, by specifying its Arrival Mode to be Time
Varying Arrival Rate. The arrival-rate function is specified separately in a
Simio Rate Table. Section 7.3 provides a complete example of implementing
a nonstationary Poisson arrival process with a piecewise-constant arrival rate
in this way, for a hospital emergency department. Note that in Simio, all rates
must be in per-hour units before entering them into the corresponding Rate
Table; so if your arrival-rate data are on the number of arrivals during each
ten-minute period, you’d first need to multiply these rate estimates for each
period by 6 to convert them to per-hour arrival rates.
You can’t just think up something strange and expect it to work well as a
random-number generator. In fact, there’s been a lot of research on building
good RNGs, which is much harder than most people think. One classical (though
outmoded) method is called the linear congruential generator (LCG), which
Remove Watermark Wondershare
PDFelement
Zi = (aZi−1 + c)(mod m)
where a, c, and m are non-negative integer constants (a and m must be > 0) that
need to be carefully chosen, and we start things off by specifying a seed value
Z0 ∈ {0, 1, 2, . . . , m − 1}. Note that mod m here means to divide (aZi−1 + c) by
m and set Zi to be the remainder of this division (you may need to think back
to before your age hit double digits to remember long division and remainders).
Because it’s a remainder of a division by m, each Zi will be an integer between 0
and m − 1, so since we need our random numbers Ui to be between 0 and 1, we
let Ui = Zi /m; you could divide by m − 1 instead, but in practice m will be quite
large so it doesn’t much matter. Figure 6.19 shows part of the Excel spreadsheet
Model_06_01.xls (which is available for download as described in the book’s
Preface) that implements this for the first 100 random numbers; Excel has a
built-in function =MOD that returns the remainder of long division in column F,
as desired.
The LCG’s parameters a, c, m, and Z0 are in cells B3..B6, and the spreadsheet
is set up so that you can change them to other values if you’d like, and the whole
spreadsheet will update itself automatically. Looking down at the generated
Ui values in column F, it might appear at first that they seem pretty, well,
Remove Watermark Wondershare
PDFelement
“random” (whatever that means), but looking a little closer should disturb you.
Our seed was Z0 = 7, and it turns out that Z22 = 7 as well, and after that, the
sequence of generated numbers just repeats itself as from the beginning, and
in exactly the same order. Try changing Z0 to other values (we dare you) to
try to prevent your seed from reappearing so quickly. As you’ll find out, you
can’t. The reason is, there are only so many integer remainders possible with
the mod m operation (m, in fact) so you’re bound to repeat by the time you
generate your mth random number (and it could be sooner than that depending
on the values of a, c, and m); this is called cycling of RNGs, and the length of a
cycle is called its period. Other, less obvious issues with LCGs, even if they had
long periods, is the uniformity and independence appearance we need, which
are actually more difficult to achieve and require some fairly deep mathematics
involving prime numbers, relatively prime numbers, etc. (number theory).
Several relatively good LCGs were created (i.e., acceptable values of a, c, and m
were found) and used successfully for many years following their 1951 development
in (Lehmer, 1951), but obviously with far larger values of m (often m = 231 − 1 =
2, 147, 483, 547, about 2.1 billion or on the order of 109 ). However, computer
speed has come a long way since 1951, and LCGs are no longer really serious
candidates for high-quality RNGs; for one thing, an LCG with a period even as
high as 109 can be run through its whole cycle in just a few minutes on common
personal computers today. So other, different methods have been developed,
though many still using the modulo remainder operation internally at points,
with far longer periods and much better statistical properties (independence and
uniformity). We can’t begin to describe them here; see (L’Ecuyer, 2006) for a
survey of these methods, and (L’Ecuyer and Simard, 2007) for testing RNGs.
Simio’s RNG is the Mersenne twister (see (Matsumoto and Nishimura, 1998), or
the developer’s website www.math.sci.hiroshima-u.ac.jp/$\sim$m-mat/MT/emt.html),
and has a truly astronomical cycle length (106001 , and by comparison, it’s
estimated that the observable universe contains about 1080 atoms). And just
as importantly, it has excellent statistical properties (tested independence and
uniformity up to 632 dimensions). So in Simio, you at least have two fewer
things to worry about — running out of random numbers, and generating
low-quality random numbers.
As implemented in Simio, the Mersenne twister is divided into a huge number of
hugely long streams, which are subsegments of the entire cycle, and it’s essentially
impossible for any two streams to overlap. While you can’t access the seed (it’s
actually a seed vector), you don’t need to since you can, if you wish, specify
the stream to use, as an extra parameter in the distribution specification. For
instance, if you wanted to use stream 28 (rather than the default stream 0) for
the shifted lognormal that Stat::Fit fitted to our service-time data in Section
6.1, you’d enter 17.4+Random.Lognormal(2.04, 0.672, 28).
Why would you ever want to do this? One good reason is if you’re comparing
alternative scenarios (say, different plant layouts), you’d like to be more confident
that output differences you see are due to the differences in the layouts, and not
Remove Watermark Wondershare
PDFelement
due to just having gotten different random numbers. If you dedicate a separate
stream to each input distribution in your model, then when you simulate all the
plant-layout scenarios you’re doing a better job of synchronizing the random-
number use for the various inputs across the different scenarios, so that there’s a
better chance that each layout scenario will “see” the same jobs coming at it at
the same times, the processing requirements for the jobs will be the same across
the scenarios, etc. This way, you’ve at least partially removed “random bounce”
as an explanation of the different results across the alternative scenarios.
1 if 0 ≤ x ≤ 1
fU (x) =
0 otherwise
and that the probability that an RV lands in an interval is the area under its
PDF over that interval (see Figure 6.20).
−1 −1
P (FX (U ) ≤ x) = P (FX (FX (U )) ≤ FX (x)) (apply FX , an increasing
function, to both sides)
−1
This shows that the probability that the generated variate X = FX (U ) is less
than or equal to x is FX (x), i.e., the generated variate has CDF FX (x), exactly
as desired. Figure 6.21 illustrates the inverse CDF method in the continuous
case, with two random numbers U1 and U2 plotted on the vertical axis (they’ll
always be between 0 and 1, so will always fit within the vertical range of any
CDF plot, since it too is between 0 and 1), and the corresponding generated
variates X1 and X2 are on the x axis, in the range of the CDF FX (x) (this
particular CDF appears to have a range of all positive numbers, like the gamma
Remove Watermark Wondershare
PDFelement
Figure 6.21: Illustration of the inverse CDF method for continuous random-
variate generation.
1 − e−x/β if x ≥ 0
FX (x) =
0 otherwise
so setting U = FX (X) = 1−e−X/β and solving for U , a few lines of algebra yields
X = −β ln(1 − U ) as the variate-generation recipe, just as we got in Section 3.3.2.
In the case of this exponential distribution, everything worked out well since
we had a closed-form formula for the CDF in the first place, and furthermore,
the exponential CDF was easily inverted (solving U = FX (X) for X) via simple
algebra. With other distributions there might not even be a closed-form formula
for the CDF (e.g., the normal) so we can’t even start to try to invert it with
algebra. And for yet other distributions, there might be a closed-form formula for
the CDF, but inverting it isn’t possible analytically (e.g., the beta distribution
Remove Watermark Wondershare
PDFelement
with shape parameters’ being large integers). So, while the inverse CDF always
works for the continuous case in principle, implementing it for some distributions
could involve numerical methods like root-finding algorithms.
In the discrete case, the inverse-CDF idea is the same, except the CDF is not
continuous — it’s a piecewise-constant step function, with “riser” heights of the
steps equal to the PMF values above the corresponding possible values of the
discrete RV X. Figure 6.22 illustrates this, where the possible values of the RV
X are x1 , x2 , x3 , x4 . So implementing this generally involves a search to find the
right “riser” on the steps. If you think of projecting the step heights leftward
onto the vertical axis (all between 0 and 1, of course), what you’ve done is divide
the (vertical) interval [0, 1] into subsegments of width equal to the PMF values.
Then generate a random number U , search for which subinterval on the vertical
axis contains it, and the corresponding xi is the one you return as the generated
variate X (X = x3 in the example of Figure 6.22). Actually, the custom method
we devised in Section 3.2.3 to generate the discrete uniform demands is the
discrete inverse-CDF method, just implemented more efficiently as a formula
rather than as a search. Such special “tricks” for some distributions are common,
and sometimes are equivalent to the inverse CDF (and sometimes not).
Figure 6.22: Illustration of the inverse CDF method for discrete random-variate
generation.
Inverse CDF is, in a way, the best variate-generation method, but it is not
the only one. There has been a lot of research on variate generation, focusing
on speed, accuracy, and numerical stability. For overviews of this topic see,
for example, (Banks et al., 2005) or (Law, 2015); a thorough encyclopedic
treatment can be found in (Devroye, 1986). We briefly discussed specifying
random vectors and process in Section 6.1.6, and for each one of those cases,
we also need to think about how to generate (realizations of) them. Discussing
these methods is well beyond our scope in this book, and the references in the
preceding paragraph could be consulted for many situations. As mentioned in
Section 6.2.3, Simio has a built-in method for an important one of these cases,
Remove Watermark Wondershare
PDFelement
Figure 6.23: Model 6-2 - Three servers in series using Input Parameters.
Figure 6.24 shows the completed Input Parameters definitions for Model 6-2.
Note that the Input Parameter definitions page is on the Data tab for the Model
object. The main window is split horizontally — the top part shows all four of
the defined Input Parameters, and the bottom part shows a sample histogram for
the selected parameter (note that there is no histogram displayed for Expression-
type parameters). The Properties window shows the properties for the selected
Remove Watermark Wondershare
PDFelement
Input Parameter. In Figure 6.24, the PTimes2 parameter (the processing time
parameter for Server2) is selected, so its histogram and properties are displayed
in the corresponding windows. In Model 6-2, we’ll use EntityArrivals for the
entity interarrival times and PTimes1, PTimes2, and PTimes3 for the processing
times for Server1, Server2, and Server3, respectively.
Parameter in this way provides the ability to re-use it at multiple points in the
model, as well as to take advantage of Sensitivity Analysis and Sample Size
Error estimation with respect to it, discussed in Sections 6.5.1 and 6.5.2.
Table Value –You specify a table column that contains a set of values from which
to sample. Figure 6.24 showed the PTimes2 Input Parameter for Model 6-2. The
Table Column property specifies the data table and column that contains the
data points (Table1.PTime in this case). The histogram for this parameter is
generated from the data in the specified Table column.
When specifying this Table Value type of Input Parameter, samples are drawn
randomly from these values in the Table column for this histogram, as well
as during the actual simulation run for use in driving the model, rather than
fitting or empirically specifying a distribution. So each generated variate will
technically always be equal to one of the observations from a discrete (not
continuous) distribution with possible values being all the distinct data points in
the table column, and their probabilities’ of being generated being the number
of times they appear in that table column, divided by the number of values
in the table column (300 in our example). If you look in Table1 in Model 6-2,
in the PTime columnn (the only one there), you’ll find, for instance, that the
value 2.21 appears 17 times, so that 2.21 will be generated with probability
17/300 = 0.0567 in this histogram as well as during the simulation. On the other
hand, the value 2.48 appears only once so will be generated with probability
1/300 = 0.0033. Moreover, this value 2.48 happens to be the largest value in
this column/dataset so no values greater than 2.48 can ever be generated, which
Remove Watermark Wondershare
PDFelement
may (or may not) be of concern to the modeler, depending on the model context,
and whether right-tail properties of the distribution are important.
So, there is no distribution-fitting or goodness-of-fit testing when using this
type of Input Parameter. Some researchers have suggested (Nelson, 2016) the
possibility of this approach (perhaps especially when distribution-fitting does
not produce a distribution that appears to fit the data acceptably), since there
is no concern about a poor fit to the data since you’re not “fitting” anything,
provided that the sample size of observed real-world observations in the table
column is reasonably large, and is believed to cover the correct range of values
to be generated. However, if the tails of the distribution are important (e.g., in
service-time distributions where the right tail can be important) then capping
the generated values at the maximum observed value in the data set could be
problematic for model validity, in that no extremely large service times (greater
than the maximum observed in the real-world data) can ever be generated, which
might downwardly bias congestion output metrics.
Expression – You specify an expression to use for the sampling. As shown
in Figure 6.24 the PTimes3 parameter is an expression-type parameter uses
the expression 1 + Random.Lognormal(0.0694, 0.5545). For this type of
parameter, samples are generated by simply evaluating the expression (in this
case, sampling from a shifted lognormal distribution). Note that there is no
histogram of 10,000 sample values provided with this type of Input Parameter.
In order to use an Input Parameter with an object instance, simply enter the
Input Parameter name as the corresponding property value (see Figure 6.26).
Figure 6.26: Server3 with the Processing Time property value set to PTimes3
(the Input Parameter name) in Model 6-2.
Note that you can also right-click on the property name and use the Set Input
Parameter list from the context menu (similar to the method for setting Reference
Properties). In Model 6-2, we made the corresponding Input Parameter property
assignments for Source1, Server1, and Server2.
Remove Watermark Wondershare
PDFelement
Using Input Parameters can simplify modeling by allowing you to use the same
expressions for multiple inputs, but the more important use of them involves
the input analyses discussed in the following two sections. Simio’s Response
Sensitivity (Section 6.5.1) analysis provides a measurement of the sensitivity of
each experiment response to each of the Input Parameters; you would typically
use this analysis before significant “real-world” data in model inputs are collected
as a guide to help you allocate your data-collection efforts (some inputs may
be more important to model responses than other inputs). Simio’s Sample
Size Error Estimation (Section 6.5.2) analysis uses a confidence-interval-based
approach to estimate the overall impact of estimated (and thus uncertain) Input
Parameters on the uncertainty in the experiment responses.
sensitivity for each experiment response, with blue horizontal bars’ extending to
the left of the vertical zero line indicating negative sensitivity coefficients, and
bars’ extending to the right indicating positive sensitivity coefficients. You can
mouse-hover over an individual bar and a tool tip will pop up to show the actual
numerical sensitivity coefficient value for the corresponding Input Parameter and
experiment response, as approximated by the fitted linear-regression model. The
Bar Charts and Pie Charts provide the same information in different graphical
formats and the Raw Data view gives the data used to construct the charts.
From the Tornado Chart, we see that this TIS response is relatively (compared
to the other three Input Parameters) highly sensitive to PTimes3 (processing
times at Server3) in a positive way, i.e., TIS increases relatively markedly as
PTimes3 increases. TIS is also relatively highly sensitive to EntityArrivals but
in a negative way (i.e., TIS falls relatively substantially as EntityArrivals rises).
Further, TIS is relatively fairly sensitive to PTimes1 (processing times at Server
1) in a positive way. Finally, TIS is relatively insensitive to PTimes2 (processing
times at Server2). Thus, if you wanted to expend additional effort collecting
more re-world data to improve your input probability distributions (and thus
the quality/validity of your output performance metrics), this Tornado Chart
tells you that your efforts would be best spent on getting more data and better
estimates of PTimes3 and EntityArrivals, maybe some effort on collecting more
data on PTimes1, but not much effort on additional data on PTimes2. This is
only for the TIS Response, but you could repeat it for the other responses by
choosing them in the pull-down on the right of the Responses field at the top
(or, select Bar or Pie Charts to see all Responses at once).
As mentioned, if you mouse-hover over the horizontal blue sensitivity bars in
Figure 6.27, the numerical values for the fitted linear-regression β̂j coefficient
Remove Watermark Wondershare
PDFelement
intuitive. This TIS response is the mean time in system of entities, one of several
congestion output metrics of queueing systems (other such metrics include the
time-average number of entities in system, and the utilization of the servers).
The Input Parameter EntityArrivals refers to the inter-arrival times between
successive entities to the system (and not the arrival rate, which is the reciprocal
of the mean interarrival time), and so if the interarrival times were to increase
(with a +1 change in this Input Parameter), this means that entities would
be showing up spaced further apart in time, which will naturally decrease
(negative change) congestion in the system. On the other hand, the other three
Input Parameters all refer to the service times (not service rates), and if we
were to increase service times then we would expect that system congestion
would increase (positive change). Thus, the signs (positive or negative) of these
Response Sensitivities might provide a quick check on your model’s validity (not to
mention the correctness of your Simio “code”); surprises in the signs of Response
Sensitivities, however, might not necessarily prove that there’s something wrong
with your model or code, but might warrant further investigation (maybe such
a “surprise,” if not the result of a modeling or coding error, might teach you
something new about your model/system). While it’s true that the signs of the
Response Sensitivities are often intuitive and thus guessable, their magnitudes
are generally not guessable, so there could be considerable value in having them
quickly approximately quantified like this.
For instance, in Model 6-2 we specified the processing (service) times at Server2
to be Triangular(1 Minutes, 2.25 Minutes, 3 Minutes), based on having
fit this distribution to a sample of 300 real-world observations on this service time
(see Figure 6.25). In statistical output analysis we often focus on the standard
deviations (or confidence-interval half-widths) of an output performance-metric
response (like TIS, the mean time in system), and to reduce that imprecision we
could do more (or longer) replications of the model than the 100 replications
Remove Watermark Wondershare
PDFelement
of length 500 simulated hours each that we did. But this assumes that all the
input probability distributions (like this triangular distribution with parameters
(1, 2.25, 3) minutes) are really exactly right, including the numerical values (1,
2.25, 3), vis-‘a-vis the target real-world system. So we’re actually making a
conditional uncertainty assessment, conditional on all the input distributions’
and parameters’ being really exactly right as they’ve been estimated. But,
of course, such input distributions (and their parameters) aren’t really really
exactly right, in the larger sense of unconditional variance of our output metrics
vs. the real-world target system of interest. So when we get our results, some
of the uncertainty we have in them vs. the real-world target system is due to
the built-in structural uncertainty (and input distributions) in the given model,
and some of it is due to our having gotten those input distributions (including
their parameters) at least somewhat wrong in the first place (in this example,
we had only 300 data points, not an infinite number). Simio’s Sample Size
Error Estimation quantifies this, and might guide your further efforts in terms
of additional simulation runs, or additional real-world data collection, to reduce
your overall unconditional uncertainty.
Figure 6.28 shows the Sample Size Error Estimation analysis for the TIS (mean
time in system) response in Model 6-2. Note that, unlike Response Sensitivity
analysis discussed earlier, Sample Size Error Estimation analysis requires addi-
tional model runs and is not run automatically as part of an experimental run.
Use the Run Analysis item from the Sample Size Error ribbon to run this
analysis. The output shown in Figure 6.28 includes three components:
• The Half-Width Expansion Factor (this value is 5.49 for this TIS response
in Model 6-2), meaning that we have about 5.49 times as much uncertainty
from the inputs’ being estimated (as opposed to known with certainty) as
we do from the model’s being run for only finitely many replications;
• A bar chart that shows the relative percentage of overall unconditional
uncertainty contribution attributable to each Input Parameter, so uncer-
tainty about EntityArrivals is the biggest cause of uncertainty relative to
the other two inputs;
• An expanded SMORE plot (tan) that overlays an expanded confidence in-
terval (blue) due to uncertainty caused by estimating (rather than knowing
with certainty) the input parameters.
Mouse-hovering over the standard SMORE confidence interval (the tan box)
gives the confidence interval half-width as 0.3537 and mouse-hovering over the
expanded confidence interval (the blue box) gives the expanded confidence
interval half-width as 1.9415. The expansion factor indicates that the input-
related uncertainty (caused by estimating the input probability distributions as
opposed to knowing them with certainty) is approximately 1.9415/0.3537 ≈ 5.49
times as large as the experimental uncertainty (i.e., sampling error from running
only a finite number of replications). Thus, our major uncertainty problem
is not so much that we haven’t run the simulation for enough replications (or
Remove Watermark Wondershare
PDFelement
Figure 6.28: Sample size error analysis for the TIS response in Model 6-2.
long enough), but rather that our sample size of 300 from the real world is
not enough to provide sufficiently precise definitions of the input probability
distributions. So our next move to improve precision in estimating the real-world
TIS performance might not be to run more or longer replications of our current
simulation model, but rather to go back to the field and collect more data on the
input distributions, perhaps especially on EntityArrivals, and refine the Input
Parameter definitions accordingly.
6.6 Problems
1. The Excel file Problem_Dataset_06_01.xls, available for download in the
student area on the book’s website as described in the Preface, contains
42 observations on interarrival times (in minutes) to a call center. Use
Stat::Fit (or other software) to fit one or more probability distributions to
these data, including goodness-of-fit testing and probability plots. What’s
your recommendation for a distribution to be used in the simulation model
from which to generate these interarrival times? Provide the correct Simio
expression, heeding any parameterization-difference issues.
2. The Excel file Problem_Dataset_06_02.xls, available for download in the
student area on the book’s website as described in the Preface, contains 47
observations on call durations (in minutes) at the call center of Problem 1.
Use Stat::Fit (or other software) to fit one or more probability distribu-
tions to these data, including goodness-of-fit testing and probability plots.
What’s your recommendation for a distribution to be used in the simula-
Remove Watermark Wondershare
PDFelement
tion model from which to generate these call-duration times? Provide the
correct Simio expression, heeding any parameterization-difference issues.
3. The Excel file Problem_Dataset_06_03.xls, available for download in the
student area on the book’s website as described in the Preface, contains 45
observations on the number of extra tech-support people (beyond the initial
person who originally took the call) needed to resolve the problem on a call
to the call center of Problems 1 and 2. Use Stat::Fit (or other software) to
fit one or more probability distributions to these data, including goodness-
of-fit testing and probability plots. What’s your recommendation for a
distribution to be used in the simulation model from which to generate
the number of extra tech-support people needed for a call? Provide the
correct Simio expression, heeding any parameterization-difference issues.
4. Derive the inverse-CDF formula for generating random variates from a
continuous uniform distribution between real numbers a and b (a < b).
5. Derive the inverse-CDF formula for generating random variates from a
Weibull distribution. Look up its definition (including its CDF) in one
of the references, either book or online, cited in this chapter. Check the
Simio definition in its documentation to be sure you have your formula
parameterized properly.
6. Derive the inverse-CDF formula for generating triangular variates between
a and b with mode m (a < m < b). Take care to break your formula into
different parts, as needed. Check the Simio definition in its documentation
to be sure you have your formula parameterized properly.
7. Recall the general inverse-CDF method for generating arbitrary discrete
random variates, discussed in Section 6.4 and shown in Figure 6.22. Let X
be a discrete random variable with possible values (or support) 0, 0.5, 1.0,
1.5, 2.0, 3.0, 4.0, 5.0, 7.5, and 10.0, with respective probabilities 0.05, 0.07,
0.09, 0.11, 0.15, 0.25, 0.10, 0.09, 0.06, and 0.03. Compute the exact (to
four decimal places) expected value and standard deviation of X. Then,
write a program in your favorite programming language, or use Excel, to
generate first n = 100 and then a separate n = 1000 IID variates, and for
each value of n, compute the sample mean and standard deviation and
compare with the exact values by both error and percent error; comment.
Use whatever random-number generator is built-in or convenient, which is
good enough for this purpose. If you use Excel, you might consider the
VLOOKUP function.
8. Re-do the produce-stand spreadsheet simulation (Problem 18 from Chapter
3), but now use more precise probability mass functions for daily demand;
Walther has taken good data over recent years on this, and he also now
allows customers to buy only in certain pre-packaged weights. For oats,
use the distribution in Problem 7 in the present chapter; note that the
pre-packaged sizes are (in pounds), 0 (meaning that a customer chooses not
to buy any packages of oats), 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.5, and 10.0.
Remove Watermark Wondershare
PDFelement
For peas, the pre-packaged sizes are 0, 0.5, 1.0, 1.5, 2.0, and 3.0 pounds
with respective demand probabilities 0.1, 0.2, 0.2, 0.3, 0.1, and 0.1. For
beans, the pre-packaged sizes are 0, 1.0, 3.0, and 4.5 pounds with respective
demand probabilities 0.2, 0.4, 0.3, and 0.1. For barley, the pre-packaged
sizes are 0, 0.5, 1.0, and 3.5 pounds with respective demand probabilities
0.2, 0.4, 0.3, and 0.1. Refer to Problem 7 in the present chapter for the
method to generate simulated daily demands on each product.
9. Write out a step-by-step algorithm, using only random numbers as input,
to generate a random variate representing the interest paid on a monthly
credit-card bill. There’s a 60% chance that the interest will be zero, i.e.,
the cardholder pays off the entire balance by the due date. If that doesn’t
happen, the interest paid is a uniform random variate between $20 and
$200. Then, develop a Simio expression to accomplish this, using relevant
built-in Simio random-variate expressions.
10. Show that the method developed in Section 3.2.3 for generating demands
for hats distributed uniformly on the integers 1000, 1001, . . . , 5000 is exactly
the same thing as the inverse-CDF algorithm for this distribution, except
implemented more efficiently in a search-free way.
Remove Watermark Wondershare
PDFelement
Chapter 7
There are many different types of data used in a model. So far we’ve largely
entered our data directly into the properties of Standard Library objects. For
example, we entered the mean interarrival time directly into a Source object and
entered the parameters of the processing-time distribution directly into a Server
object. While this is fine for some types of data, there are many cases where
other mechanisms are necessary. Specific types of data, such as time-varying
arrival patterns, require a unique data representation. In other situations, the
volume of data is large enough that it’s necessary to represent the data in a
more convenient form, and in fact even import the data from an external source.
And in situations where the analyst using the model may not be the same as the
modeler who builds the model, it may be necessary to consolidate the data rather
than having them scattered around the model. In this chapter we’ll discuss
many different types of data and explore some of the Simio constructs available
to represent those types of data best.
275
Remove Watermark Wondershare
PDFelement
Simio also has Sequence Tables and Arrival Tables, each a specialization of the
basic table. All of these topics will be discussed in this section.
While reading and writing disk files interactively during a run can significantly
slow execution speed, tables hold their data in memory and so the data can be
accessed very quickly. Within Simio you can define as many tables as you like,
and each table can have any number of columns of different types. And you can
have as many rows as needed - limited only by your system memory. You’ll find
tables to be valuable in organizing, representing, and using your data as well as
interfacing with external data.
Use an Object Reference when you want a table to reference an object instance
or list of objects such as an Entity, Node, Transporter, or other model object.
Likewise use an Element Reference if you want a table to reference a specific
element like a TallyStatistic or Material. As you are defining the name, posi-
tioning, data type, and other properties of each column, you are defining the
Schema of the data table. Simio allows you to define any schema you need –
you might choose a schema for convenience accessing in Simio, or you might
define a schema matching that of an external file so you can import and use that
external data without converting or transforming it.
The first steps in building our model involve defining the model entities and the
data table:
1. Load Simio and start a new model as we’ve done before. The first thing
we’ll do is drag four instances of ModelEntity into the model facility view.
Click on each one and use the properties or the F2 key to rename them to
Routine, Moderate, Severe, and Urgent, respectively.
Remove Watermark Wondershare
PDFelement
2. Let’s take a minute to animate those entities a little better, so that we can
tell them apart. Follow the same procedure described in Section 4.8. Click
on an entity instance, and then click on the symbol library. Scroll down to
the People category and select Man6. Repeat this using Man6 for all four
entity instances. Although all entities will use the same symbol, we can
tell them apart by giving each person a different shirt color. Zoom in so
you can see your new symbols clearly. Click on the Routine entity. On
the right side of the Symbols ribbon is a Color button. Clicking the lower
half of the color button will display a color pallet. Select a green color
and then apply it to Routine by clicking on the shirt of the man symbol.
Repeat this procedure to apply a light blue to the Severe patients and
Red to the Urgent patients. We’ll leave Moderate with the default color.
3. Next, let’s create the data table. Select the Data tab just under the ribbon,
and then select the Tables panel on the left if it’s not already selected.
The Table ribbon1 will appear, although the majority will be unavailable
(grayed out) because we don’t yet have an active table. Click on the Add
Data Table button to add a blank table, then click on the Name property
in the properties window and change the name to PatientData (no spaces
are allowed in Simio names).
4. Now we’ll add our three columns of data. Our first column will reference
an entity type (an object), so click on Object Reference on the ribbon
and then select Entity from that list. You’ve now created a column that
will hold an Entity Instance. Go to the Name property (not the Display
Name property) in the properties window and change it to PatientType.
Our second column will be an integer, so click on Standard Property in
the ribbon and select Integer. Go to the Name property and rename
it to Priority. Finally, our third column will be an expression so click
on Standard Property in the ribbon and select Expression. Go to the
Name property and rename it to TreatmentTime. Since this represents a
time, we need a couple of extra steps here: In the Logic category of the
properties window, specify a Unit Type of Time and specify Default Units
of Minutes.
5. Now that we have the structure of the table, let’s add our four rows of
data. You can add the data from Table 7.2. You can enter the data a row
at a time or a column at a time; here we’ll do the former. Click on the
upper left cell and you’ll see a list containing our four entity types. (If
you don’t see that list, go back two steps.) Select Routine as the Patient
Type for row 1. Move to the Priority column, type 1 and press enter
and you’ll be moved to the TreatmentTime column. Here we’ll type in
the expression from Table 7.2, Random.Triangular(3,5,10). Tip: If the
values of your data are partially hidden, you can double click on the right
edge of the column name and it will expand to full width. Move to the
1 The table ribbons were being redesigned as this book went to press, so the software you
next row in the PatientData table and follow a similar process to enter the
remaining data from Table 7.2.
When you’re finished your table should look similar to Figure 7.1.
We’ve now defined the patient-related data that our model will use. In the next
section, we’ll demonstrate how to access the data from the table.
as we have in our model. It’s also common to have the entity type be selected
randomly. Simio allows you to do both within the same construct. You can add
a numeric column to your table that specifies the relative weight for each row
(or entity type). Then you can specify that you’ll randomly select a row based
on that column by using the function TableName.ColumnName.RandomRow.
Let’s follow a few final steps to complete our model.
1. In our ED, historical information suggests that our patient mix is Routine
(40%), Moderate (31%), Severe (24%), and Urgent (5%). We need to
add this new information to our table. Return to the Data tab and the
Tables panel. Click Standard Property and select Real. Go to the Name
property and rename it to PatientMix. Then add the above data to
that new column. When you’re finished your table should now look like
Figure 7.3. Note that, as noted in Section 5.2, the values in the Patient
Mix column are interpreted by Simio only in relation to their relative
proportions. While we entered the values here thinking of the percent
of patients of each type, they could have equivalently been entered as
probabilities (0.40, 0.31, 0.24, 0.05), or as any other positive multiple of
the values we used (e.g., 4000, 3100, 2400, 500).
2. Now we can continue building our model. The last change we made allows
us to have a single Source that will produce the specified distribution
of our four patient types. Place a Source in your model and specify
an Interarrival Time of Random.Exponential(4) and units of Minutes.
Instead of specifying one patient type in the Entity Type property with a
specific row number as we did in Figure 7.2, we’ll let Simio pick the row
number and then we’ll select the Entity Type based on the PatientType
specified in that row. We must select the table row before we create the
Remove Watermark Wondershare
PDFelement
entity; otherwise the entity would already be created by the time we decide
what type it is. So in the Table Reference Assignment, Before Creating
Entities category, we will specify the Table Name of PatientData and the
Row Number of PatientData.PatientMix.RandomRow. After the row is
selected, the Source will go to the Entity Type property to determine which
Entity Type to create. There we can select PatientData.PatientType
from the pull-down list. This is illustrated in Figure 7.4.
3. Completing our model is pretty painless. Add a Server, set its Initial Capac-
ity to 3, and specify a Processing Time of PatientData.TreatmentTime.
We’re using the data in the table for this field, but note that we’re using the
short reference method. Since no explicit row is specified, we’re telling Simio
to use the row that’s already associated with each specific entity. When
an entity of type Routine arrives, it will use row one and a treatment time
sampled from the distribution Random.Triangular(3,5,10). However,
when an entity of type Severe arrives, it will use row three and a treatment
time sampled from the distribution Random.Triangular(10,15,30). Add
a Sink, then connect Source to Server and Server to Sink with Paths. Your
model should look something like Figure 7.5.
Before enhancing our model, we’ll do a small verification step so that we’ll be
confident that we’ve correctly implemented the data table. Using the proportions
of patient types and the expected service times for each patient type, we can
compute the overall expected service time (11.96 minutes). With the overall
arrival rate of 15 patients/hour, we expect a steady-state server utilization
Remove Watermark Wondershare
PDFelement
of 99.64%. We ran Model 7-1 for 25 replications of length 200 days with
a 25-day warmup period and the resulting average scheduled utilization was
99.67% ± 0.1043 (the 95% confidence interval half-width). This illustrates an
important point about model verification — it’s often much easier to verify the
model as you build it rather than waiting until the model is “finished.” Since
our sampled utilization matched our expectation quite well, we’re now confident
that we’ve properly implemented the patient data table and can move on to our
model enhancements.
through the same objects. They’re both used in the same way, but differ in how
the tables are configured. We’ll start by explaining how to configure and use
simple sequence tables.
Each simple sequence table defines one routing plan. If you have multiple routing
plans (e.g., several bus routes), then each would be defined in its own sequence
table. Each row in the sequence table corresponds to a specific location. The
data items in that row are usually used for location-specific properties, for
example the processing time, priority, or other properties required at a particular
location.
After your sequence table has been created, you must create an association
between the entity and the sequence table (in other words, you need to tell
the entity which sequence to follow). There are various ways to do that, but
the easiest is to do so on an entity instance you’ve placed in a model. It will
have a property named Initial Sequence in its Routing Logic category. Specify
the sequence table name in this property. The entity will start at row one in
this sequence table and work its way through the rows as stations are visited.
Although this happens automatically, it’s possible to change the current row,
and in fact even change the sequence being followed. This can be done at any
time using the SetRow step in an add-on process.
At this point the astute reader (that’s you, we hope) will be asking “But how
does the entity know when to move to the next step in its sequence?” You must
tell the entity when to go to the next step in its sequence. The most common
place to do that is in the Routing Logic category of a Transfer Node (recall
that the outbound node from every Standard Library object is a Transfer Node).
Here you would specify that the Entity Destination Type is By Sequence. This
causes three things to happen:
1. The next table row in the entity’s sequence table is made current.
3. Any other table properties you’ve specified (e.g., ProcessingTime) will now
look to the new current row for their values.
Because you’re explicitly telling the entity when to move to the next sequence,
you also have the option to visit other stations in between sequences if you
choose — simply specify the Entity Destination Type as anything other than By
Sequence (e.g., Specific). You can do this as many times as you wish. The
next time you leave an object and you want to move sequentially, just again use
By Sequence and it will pick up exactly where you left off.
Remove Watermark Wondershare
PDFelement
repeat this process for each outbound node, but Simio provides a shortcut.
In our case all movements will be by sequence, so we can change them all
at once. Click on any blue node, then Ctrl-click one at a time on every
other blue node (you should have six total). Now that you’ve selected all
six transfer nodes you can change the Entity Destination Type of all six
nodes at once.
11. Connect the nodes with all the paths that will be used. If you add
unnecessary paths, it adds clutter, but does no harm — for example a path
from Registration to TraumaRooms would never be used because Urgent
patients bypass Registration.
12. We’ve not yet told the Servers how long a patient will stay with them — the
Process Time property on the servers. For all servers, the answer will be
the same — use the information specified in the sequence associated with
that specific patient and the sequence step that’s active. The expression
for this is in the form TableName.PropertyName, or specifically in this
case it’s Treatments.ServiceTime. Enter that value for Process Time on
each server. Note that the entity (the patient) carries with it current table
and row associations.
13. Some patients are more important than others. No, we’re not talking
about politicians and sports stars, but rather patient severity. For example,
we don’t want to spend time treating a chest cold while another patient
may be suffering from a severe heart attack. We already have patient
priority information in our patient table, but we need to change the server-
Remove Watermark Wondershare
PDFelement
selection priority from its default First In First Out (FIFO). For each
server you need to change the Ranking Rule property to Largest Value
First. That will expose a Ranking Expression property that should point
to our table: PatientData.Priority. This will guarantee that an Urgent
patient (priority 4) will be treated before all other patients (priorities 1-3).
14. Each of our servers actually represents an area of the ED, not just a single
server. We need to indicate that by specifying the Initial Capacity for
each Server. Click on each server and complete the Initial Capacity field
as indicated in Table 7.3. The green line above each server displays the
entities currently in process. You should extend those lines and make them
long enough to match the stated capacity. Likewise, the line to the left of
each server displays patients waiting for entry. Those lines may also need
to be extended. You can do this while the model is running to make it
easier to set the right size.
If you’ve followed all of the above steps you’ve completed the model. Although
you’ve probably arranged your objects differently, it should look something like
Figure 7.7 (shown with Browse window collapsed).
Continuing our strategy of verifying our models as we go, we’ll use a queueing-
Remove Watermark Wondershare
PDFelement
Any other table, potentially multiple tables, may link to the main table by
including a column of type Foreign Key that specifies the main table and its
Table Key. Once that link is created, you can use any column of any linked
table without having to traverse the link explicitly. For example, in Model 7-2
our PatientData table specified PatientType as a Key and that key contained
four unique values. We then created our Treatments sequence table, which
used that PatientType in a Foreign Key column. When we associated an entity
with a particular row in PatientData, it was automatically associated with a
set of related rows in the Treatments table and allowed us to use the values in
Treatments.ServiceTime.
Under the Treatments tab, it displays all of the associated rows in the Treatments
table. In this case it’s showing you all of the locations and data associated with
the treatment sequence for a Moderate patient. You’ll notice that there is also a
TestArrivals tab. On that tab you’ll find the data for all of the Moderate arrivals
specified in the TestArrivals table. Click on the - to close the detail view and
you can open and close the different keys independently.
Relational tables provide a very powerful feature. They allow you to represent
your data set efficiently and reference it simply. Moreover, this feature is very
useful in linking to external data. For the same efficiency reasons, you may often
find that the external data needed to support your simulation is available in
a relational database. You can represent the same relationships in your data
tables.
Remove Watermark Wondershare
PDFelement
You can also import/export the data from CSV, Excel, or many common database
file formats into and out of the table by using the data connectors and binding
features. Data Connectors establish the file name and any other parameters
necessary to read or write the file. Binding (specifically the Create Binding
button) allows you to bind a table to one or more data connectors. Both of
these buttons are illustrated in Figure 7.12. The currently available importing
binding types are illustrated in Figure 7.13.
Before you can import or export you must first bind the table to the external
file, but the binding and the data connector can be created in any order. For
example you might first select each table and create a binding, then go to the
data connectors and specify the file names and parameters used with each data
connector. Figure 7.14 illustrates the data connector parameters for a CSV
connector.
Once you have bound the table to a specific file, you may also specify the
Binding Options (Figure 7.15). This provides you the option of importing the
data manually (only when you click the Import button) or automatically each
time you start a model run. The latter is desirable if the data collection is
something that changes frequently like initialization to current system status.
Other more advanced options are also available.
A similar procedure and set of options are available to export tables to files.
This is particular useful when you want to edit the data outside of Simio (e.g.,
export, edit, then re-import), record an enduring copy of your data table, or
export the results of a run. See the Importing and Binding to Tables topic in
Simio Help for details about setting up and configuring the bindings.
7.2 Schedules
As noted in Section 5.1.5, any object can be a resource. Those resources have a
capacity (e.g., the number of units available) that may possibly vary over time.
As introduced in Section 5.3.3, one way to model situations where the capacity
of an object varies over time is to use Schedules. Many objects support following
a Work Schedule that allows capacity to change automatically over time. The
numerical capacity is also used to determine if a resource is in the On-Shift state
(capacity greater than zero) or Off-Shift state (capacity equals zero). For some
objects (i.e., Worker), capacity can be only either 0 (off-shift) or 1 (on-shift).
For most objects, a schedule can represent a variable capacity (e.g., five for 8
hours, then four for 2 hours, then zero for 14 hours).
Remove Watermark Wondershare
PDFelement
Simio also includes a sample work schedule named Standard Week, illustrated
at the top of Figure 7.16. A Work Schedule includes a combination of Day
Patterns to make up a repeating work period. The repeating period can be
between 1 and 28 days; the typical situation is a seven-day week. A work period
may begin on any calendar day based on the Start Date. If all of your work
schedules are seven days long and start on the same day of the week (e.g., they
may all start on Monday), then the column labels will be the actual days of the
week. If you have schedules that start on different days of the week (e.g., one
Remove Watermark Wondershare
PDFelement
starts on Monday and another starts on Sunday), or you have any schedules
that are not seven days, the column labels will simply be Day 1, Day 2, . . . , Day
n. In this case, the days that do not apply to a given schedule will be grayed
out to prevent data entry.
Search for “Schedule” in the Simio Help or Simio Reference Guide for a full
explanation of how to configure and use calendar work schedules.
Remove Watermark Wondershare
PDFelement
Manual schedules also provide great flexibility. You can add as much detail as
you want, as well as add transition logic. For example, you might implement
logic that says at lunch, the resource would just immediately stop working or
Suspend any work in progress and then at the end of lunch he would Resume
that work where he left off. But you could also implement logic so that 30
minutes before the end of the shift, he’d stop accepting new work (to allow time
for cleanup), but if work was still in progress at the end of the shift he’d continue
working until it was complete. This was just one example, but with the full
power of processes available, sophisticated schedule behavior can be modeled.
You can make objects as intelligent as your model requires.
customers come into a bank more frequently during some periods than other
periods. Callers call for support more at certain times of the day than at others.
For previous models we’ve often assumed a stationary Poisson process, in which in-
dependent arrivals occurred one at a time according to an exponential interarrival-
time probability distribution with a fixed mean. To implement arrival rates
that vary over time, we need a nonstationary Poisson process. See Section 6.2.3
for a general discussion of this kind of arrival process, and the need to include
arrival-rate “peaks” and “valleys” in the model if they’re present in reality, for
the sake of model validity.
While you might think that you could stick with an exponential interarrival-time
distribution and simply specify the mean interarrival time as a state and vary the
value of that state at discrete points in time, you would be incorrect. Following
that approach yields incorrect results because it doesn’t properly account for
the transition from one period to the next. Use of the Rate Table provides the
correct time-varying arrival-rate capability that we need.
A Rate Table is used by the Source object to generate entities according to a
nonstationary Poisson process with a time-varying arrival rate. You can specify
the number of intervals as well as the interval time duration. The Rate Table
consists of a set of equal-duration time intervals and specification of the mean
arrival rate during each interval, which is assumed to stay constant during an
interval but can change at the start of the next interval. The rate for each
interval is expressed in Arrivals per Hour, regardless of the time units specified
for the intervals of the Rate Table (e.g., even if you specify a time interval of
ten minutes, the arrival rate for each of those ten-minute intervals must still be
expressed as a rate per hour). The Rate Table will automatically repeat from the
beginning once it reaches the end of the last time interval. Though it might seem
quite limiting to have to model an arrival-rate function as piecewise-constant in
this way, this actually has been shown to be a very good approximation of the
true underlying rate function in reality; see(Leemis, 1991).
To use a Rate Table with the standard Source object, set the Arrival Mode
property in the Source to Time Varying Arrival Rate and then select the
appropriate Rate Table for the Rate Table property.
Let’s illustrate this concept by enhancing our ED Model 7-2 with more accurate
arrivals. While our initial model approximated our arrivals with a fixed mean
interarrival time of 4 minutes, we know that the arrival rate varies over the
day. More specifically, we have data on the average number of arrivals for each
four-hour period of the day as shown in Table 7.5.
4. We have one more task. We need to go back to the Facility Window and
change our Source to use this Rate Table. For the Arrival Mode property,
select Time Varying Arrival Rate. For the Rate Table property, select
ED_Arrivals as shown in Figure 7.20.
Now if you run the model you’ll see different results, not only because of the
overall lower patient load, but also because the model now has to deal with peak
arrival periods with a high incoming-patient load.
Although we did not use it in this model, the Source object also includes a Rate
Scale Factor property that can easily be used to modify the values within the
table by a given factor instead of changing the values separately. For example,
to increase the Rate Table values by 50%, simply specify the Rate Scale Factor
within the Source to 1.5. This makes it easy to experiment with changing service
Remove Watermark Wondershare
PDFelement
loads (e.g., how will the system respond if the average patient load increases by
50%?).
faster in the early morning and evening, but slower during mid-day, as shown in
Figure 7.21.
We’ll use a lookup table to apply an adjustment factor to the processing time to
account for that computer speed.
1. Start with Model 7-4. Select the Data window and the Lookup Tables
panel.
2. Click Lookup Table to add a new lookup table. Change the name to
ComputerAdjustment.
3. Add the data to represent what’s in Figure 7.21. You have only three data
points: At time 6 the value 0.5, at time 12 the value 1.9, and at time
18 the value 0.5. Any times before 6 or after 18 will return the first or
last value (in this case, both 0.5). A time of exactly 12 will produce the
exact value of 1.9. Any other times will interpolate linearly between the
specified values. For example at time 8, it’s 1/3 of the way between the
two x values, so it will return a value 1/3 of the way between the f (x)
values: 0.5 + 0.466 = 0.966.
4. The last thing we need to do is go back to the Registration server in the
Facility window and amend our Processing Time. Start by right clicking
on the Process Time property and selecting Reset. We want to multiply
the processing time specified in the Treatments table by the computer
responsiveness factor we can get from our new lookup table. We need to pass
the lookup table a value that represents the elapsed hours into the current
day. We can take advantage of Simio’s built-in set of DateTime functions
to use the one which returns the hour of the day. So the entire expression
for the Registration Process Time property is Treatments.ServiceTime
* ComputerAdjustment[DateTime.Hour(TimeNow)]
Now our revised model will shorten the registration time during the night and
Remove Watermark Wondershare
PDFelement
lengthen it during the day to account for the computer’s mid-day slow response.
or Urgent patient. Changeovers are built into the Task Sequences section of
Server (discussed in Section 10.3) and related objects, but can also be added to
other objects using add-on processes.
There are three types of changeovers: Specific, Change-Dependent, and Sequence-
Dependent. The simplest changeover is Specific, where every entity uses the same
expression. It could be a simple constant-value expression (e.g., 5.2 minutes) or
a more complex expression perhaps involving an entity state or table lookup
(e.g., Entity.MySetuptime or MyDataTable.ThisSetupTime). The other types
of changeovers require that you keep track of some information about the last
entity that was processed and compare that to the entity about to be processed.
In Change-Dependent we don’t care what the exact values are, just if it has
changed. For example, if the color as changed we need one changeover time,
and if it has not changed we need another (possibly 0.0) changeover time. In
Sequence-Dependent, we’re usually tracking change between a discrete set of
values. That set of values is typically defined in a Simio List (e.g., Small, Medium,
and Large). Each unique combination of these from and to values might have a
unique changeover time. This requires another Data Window feature called a
Changeover Matrix.
A Changeover Matrix has a matrix based on a list. In many cases the list will be
a list of Strings that identify the characteristic by name (e.g., a List named Colors
that contains items Red, Green, Blue, and Yellow). The entity will typically
have a property or state (e.g., Color) that contains a value from the list. The
Changeover Matrix starts with the values in the specified list and displays it as
a from/to matrix. In each cell you’d place the corresponding changeover time
required to change from an entity with the From value to an entity with the To
value. When the changeover Matrix is applied, the row is selected based on this
value for the previous entity, and the column is selected based on this value for
the current entity.
You can define a changeover matrix on the Changeover Matrices panel of the
Data window. Click the Changeover Matrix button on the ribbon to add a new
changeover. Then specify the name of your previously created list in the List
Name property. At this point the lower window will expand to show a matrix of
all the members of your list. You can then change the value at each intersection
to indicate the transition time between pairs. In Figure 7.23 it shows a 10 minute
delay to change to Yellow, but only a 2 minute delay to change to any other
color, and no delay if the color remains the same.
property. If the Dimension property is set to Vector (or a 1 is typed into the
Dimension property), the State is one-dimensional and the Rows property will
determine the number of rows in the array. If the Dimension property is set to
Matrix (or a 2 is typed into the Dimension property), the Rows and Columns
properties will determine the number of rows and columns in the matrix. If
you’d like an array larger than 2 dimensions, Simio supports up to 10 dimensions
— just type an integer up to 10 into the Dimension property.
for example, to specify the list of employees or equipment (resources) that are
needed to treat or escort each type of patient. Likewise element references specify
an element such as a material or statistic. This would allow you to specify any
extra materials (like a surgery pack) needed by a patient or perhaps the specific
statistic where a patient’s data should be recorded.
6. Now that we have created and populated our table, we can use it by using
the same Referenced Property feature we have previously used. Go to the
Source object in the Facility view and right click on the property name
of the Before Exiting property under State Assignments. Instead of
creating a new referenced property, you will see that we can select the table
we just defined – it’s already on the list (Figure 7.26. After you select it,
you will see the same green arrow we have seen with referenced properties
and the context is the same – indicating the place to go to get the data,
this time referring to a collection of data in one or more rows of a table.
Figure 7.26: Referenced property specifies table data for a repeat group.
While this was just a very simple use of a table to populate a repeat group,
when this technique is combined with the use of relational data tables it opens
up many new possibilities of linking objects and data tables together to more
Remove Watermark Wondershare
PDFelement
7.9 Summary
Importing, storing, and accessing data is a very important part of most models.
We’ve discussed several different types of data and several ways to store data
in Simio. The table constructs, and particularly the relational tables, provide
extremely flexible ways of handling data and a way to abstract the data from
the model objects for easier model use and maintenance. Because models are so
data-intensive, it is worth exploring the options to import data and even import
entire models whenever possible.
Remove Watermark Wondershare
PDFelement
7.10 Problems
1. Adjust the Server capacity of example Model 7-1 to 4. Create an experiment
containing responses for Utilization (Server1.Capacity.ScheduledUtilization)
and Length of Stay (Sink1.TimeInSystem.Average). Run it for 25 replica-
tions of 100 days with a 10-day warmup period. Compare patient waiting
times if the Patient Mix of the modified example Model 7-1 changed season-
ally so that Urgent patients increased to 10%, Severe patients to 30%, and
Moderate and Routine patients decreased to 24% and 36% respectively.
2. In addition to the patient categories of modified example Model 7-1, a small-
town emergency hospital also caters to a general category of presenting
patients who are called “Returns.” These are previous patients returning
for dressing changes, adjustment of braces, removal of casts and stitches,
and the like. Include this category into the Patient Mix of Model 7-1
such that proportions now become Returns 8%, Routine 30%, Moderate
26%, Severe 26%, and Urgent 10%. The treatment time for this category
can vary anywhere from three minutes to thirty minutes. Compare the
performance with that of Problem 1.
3. More realistically, about two thirds of the patients of Problem 2 arrive
during the daytime (8:00 a.m. – 8:00 p.m.). Without changing the overall
daily arrival rate, modify the model of Problem 2 to accommodate this
updated arrival pattern. Compare the performance with that of Problem 2.
Collect Length of Stay (LOS) for daytime separate from night time. What
change would you make to minimize staffing, while keeping average LOS
for both periods under 0.5 hour?
4. On further analysis it is found that only 10% of returning patients of
Problem 2 require treatment times between twenty and thirty minutes; the
balance require between 3 and 20 minutes. What is the new LOS? Offer
suggestions to management as to how to improve staff efficiency while
keeping the LOS under the target of 0.5 hour.
5. Routine and Return patients have a somewhat low tolerance (30 to 90
minutes) for waiting for treatment and will sometimes leave without being
seen (LWBS). The other categories of “really sick” patients will always wait
until they are treated. Modify the model of Problem 2 so that any patient
who waits more than his or her tolerance will exit the system. Report on
the waiting times and the percentage of total patients who left without
treatment.
6. A small free clinic has a single doctor who sees patients between 8:00
a.m. and noon. She spends 6 to 14 minutes (an average of 10) with each
patient and so can theoretically see 6 patients per hour or a total of 24
each day. Staff is currently scheduling patient arrivals every 10 minutes,
but have found that patients arrive as much as 15 minutes early or 30
minutes late, thus causing disruption to other patients. Worse, about 10
Remove Watermark Wondershare
PDFelement
polishing and re-grading (see Figure 7.28 for a flow diagram). The facility
works on a 24x7, three-shift basis and the stone arrivals (from the mine)
are nonstationary. Table 7.7 gives the start and end times and stone arrival
rates for the three shifts (note that we ignore breaks and meal times in this
model and assume that there is no loss in productivity during shift-changes).
You should assume that the arrival process is a non-stationary Poisson
process (NSPP). The processing characteristics are given in Table 7.8. All
processes have a single operator (c = 1), but re-polishing and re-grading
only work during first shift. In addition to the non-stationary arrivals and
resource schedules, your model should have the following features:
a. Entities representing the stones should have the default green color
when they enter the process. Those stones that require re-polishing
should switch to red until they (eventually) get to Finishing, where
they should switch back to green.
b. Create a status plot that displays the numbers of entities in the
polishing and re-polishing queues along with the average number of
stones in the system (3 separate items in the same plot) over time.
Make the time range for your plot 24 hours.
c. Create a user-specified statistic that tracks the number of stones in
the “re-” area — re-polishing and re-grading combined — over time.
d. Create a user-specified statistic that tracks the number of times each
stone goes through the re-polishing process (including those stones
that don’t go through re-polishing at all).
e. Create a user-specified statistic that tracks the time-in-system for
those stones that require re-polishing (regardless of the number of
times).
f. Create an experiment that includes 15 replications of length 200
days (each). The experiment should have the following experimental
responses:
i. Average number of stones in the “re-” area;
ii. Maximum number of stones in the “re-” area;
iii. Average number of times stones go through re-polishing;
iv. Average time-in-system for those stones that go through re-
polishing;
v. Utilization of polishing.
Remove Watermark Wondershare
PDFelement
Figure 7.28: Gem processing system flow diagram for Problem 10.
Table 7.7: Shift times and stone arrival rates (in stones per hour)
for Problem 10.
Chapter 8
The goal of this chapter is to expand our knowledge of animation and entity
movement by adding more context and additional concepts to what you’ve seen
in earlier chapters. We’ll start by exploring the value of 2D and 3D animation
to a typical project. Then we’ll discuss some additional animation tools that
are at our disposal. At that point we’ll “move” on to discuss the various types
of entity movement, providing a brief introduction to free space (off-network)
movement, and a somewhat more detailed exploration into the Standard Library
objects that support entity movement.
8.1 Animation
In Section 4.8 we introduced some basic animation concepts so that we could
animate our early models. In this section we’ll revisit and expand on those
topics. We’ll start by discussing animation, why it’s important, and how much is
enough. Later in this section we’ll introduce some additional tools and techniques
available to produce the animations you need.
315
Remove Watermark Wondershare
PDFelement
8.1.1.2 Communication
Two common high-level simulation goals are to understand the system and to
provide benefit to stakeholders. Animation helps with both. If you provide
a page of numbers or a diagram of model logic to a stakeholder, the typical
response will involve eyes glazing over, often quickly followed by entry into
a near-catatonic state. But show them an animation that looks familiar and
they’ll instantly perk up. They’ll immediately start comparing the components,
movements, and situations in the animation to their own knowledge of the facility.
They may start discussing design aspects amongst themselves just as though
they were looking through a window at the real system. At this point, you’re
well along the way to having delivered on both high-level objectives. At the top
end, animation quality may be good enough for the stakeholders to use it for
outside communication — not only promoting the project, but often even using
it to promote the organization.
Of course getting to this point is rarely free. Depending on the modeling software
you use, building an animation suitable for use with stakeholders may be quite
involved, especially with products for which animation is built independent of
the modeling. Sometimes animations are created in a totally separate animation
product. And sometimes the animation can only be run in a post-process mode
after the model run has completed. Such a post-process analysis severely limits
the level of model experimentation possible.
Fortunately, the animation that Simio creates by default is often fairly close to
“stakeholder ready.” Simio’s animation is built-in, in fact created automatically
as you build the model. And it runs concurrently so you have full interactive
Remove Watermark Wondershare
PDFelement
right click on the background object and enable the Lock Edits option to
prevent that object from moving.
• If you have a mouse with a scroll wheel (highly recommended) you can
zoom the view in and out by scrolling the mouse wheel. If you don’t, then
you can accomplish the same action with a Control-Right Click and move
the mouse up and down.
• You can resize or rotate an object using its handles, the green dots that
appear when you select an item. If you click and drag one of the handles,
it will resize the object. If you Control-Left Click on a handle you can
rotate the object.
• Clicking the View All button on the View ribbon will resize the Facility
window so that your entire model is in view. This is particularly useful to
return to a familiar view if you’ve been zooming and panning and “lost”
your model objects.
• The Background Color button on the View ribbon changes the background
color of both 2D and 3D views. Although some older models may have a
black background in the 3D view, it is no longer possible to create different
background colors for 2D and 3D.
• The Skybox and Day/Night Cycle buttons control how the background
above your animation looks and changes. This is particularly useful for
outdoor models like ports and transportation networks.
There are a few actions applicable only when you’re in the 3D view:
• Right-click and drag left and right to rotate the view in 3D.
• Right-click and drag up and down to zoom in and out.
• Hold down the Shift key while moving an object and you’ll move it up
and down in relation to the floor.
• Hold down the Control key while moving an object and you can stack it
on top of other objects rather than overlapping it.
• Pressing the R key in the 3D view or clicking the Auto Rotate button on
the View ribbon will start the 3D view rotating. Pressing Escape will stop
the rotation.
The Visibility ribbon illustrated in Figure 8.2 helps you fine tune the look of the
animation:
• The Visibility group contains buttons that toggle on and off specific display
components. In many cases you may want to disable display of most or
all of those items to make your animation look more realistic. Note that
you may have to enable some of those buttons later if you want to interact
Remove Watermark Wondershare
PDFelement
with the model. For example, you cannot select a node if Nodes animation
is disabled.
• The Direct Shadows and Diffuse Shadows buttons in the Visibility
group provide finer control over how shadows appear around your ob-
jects.
• The buttons in the Networks grouping provide a flexible way to see indi-
vidual or sets of networks of your travel paths.
• The Layers subsection allows for objects, animations, and graphics to be
placed on different defined layers in the model.
Refer to the Simio Help for more information on the use of these features.
When you have your model ready to show, there are a few more helpful features
on the View ribbon:
In addition to the options on the View and Visibility ribbons, there is one more
viewing option of interest that is located over on the Project Home ribbon. The
Render to Oculus button will enable or disable rendering the active 3D view
to an attached Oculus HMD device. While this technology is still somewhat new
and expensive, the animation can produce compelling effects, letting you walk
through a model almost like being there.
Remove Watermark Wondershare
PDFelement
The Drawing Group on the left side of Figure 8.3 starts with six drawing tools
to create some basic objects: Polyline, Rectangle, Polygon, Curve, Ellipse,
and Closed Curve. If you’re unfamiliar with any of these shapes, we suggest
that you experiment with them to see how they work. When you’re drawing
most shapes, after you click the last point, right-click to end. Hitting the Escape
key will abort the attempt and erase your drawn points. You may notice that
many of them appear to have an extra point. That’s the rotation point. You
may move that rotation point to any position. If you Ctrl-click and drag any of
the other points, the entire object will rotate around that rotation point.
If you skip over to the Decoration and Object groups in the drawing ribbon,
you’ll see tools to change the looks of these basic objects including the color,
texture (pattern), options to tile or stretch that texture, line style and width, and
object height. We’ll leave it to you to explore the full capabilities of these tools,
but here are a few applications and tricks that might stimulate your imagination:
• Making a wall: Add a line the length of the wall. Set the Line Width to
perhaps 0.1 meter. Set the Object Height to perhaps 2 meters. Go to 3D
view. Click on the Texture button and select a texture (perhaps a brick
pattern), then click on the wall object to apply the texture.
• Creating a company logo: Find a .jpg file with the logo you want. Save that
file in your Public Documents (the exact name of this varies depending
on your operating system) .. Simio .. Skins folder. This will then
automatically appear as a choice under the Textures button. Draw a
rectangle similar in shape to the logo. Apply your logo texture to the
top of your rectangle. Another approach is to make your rectangle tall
and skinny, then apply the logo or any texture to the flat side and it will
appear like a sign, billboard or TV monitor.
• Creating a simple building: Create a rectangle. Give it height. Apply a
Remove Watermark Wondershare
PDFelement
texture to the sides. Extra credit — take a photo of the face of your favorite
building and apply it to your building. (Of course you can get much better
buildings, perhaps even your own, from Trimble 3D Warehouse or Google
Maps.)
Speaking of maps, if you look on the View ribbon, you will see that Simio also
supports Graphic Information System (GIS) maps. You must first select the map
view and set the map location by address or lattitude/longitude. An interactive
background will then fill your screen. Not only can you draw on this, but you
can place nodes on this, highlight any two nodes, and have the GIS system
connect the nodes using the displayed road system. This system requires an
active internet connection, so if you subsequently load the model without an
internet connection, your background will be blank.
To finish our discussion of the Drawing ribbon, there are three buttons we’ve
skipped. Floating Label creates a simple label that “floats” in the air and
will always face you no matter your viewing direction. It also always displays
at the same size regardless of zoom level. A Floor Label, as the name might
imply, appears as though it has been painted on the floor. It can have multiple
lines and you can choose color, size, and formatting options. Don’t miss the fact
that you can embed expressions inside the text so you can create dynamic and
informative labels.
We saved the best button for last. Place Symbol provides many different
options to place a symbol as part of your model background. The top part of
the button provides easy access to place another of the last symbol you selected
(if any). The bottom part of the Place Symbol button brings up a large dialog
that provides three main choices:
• You can scroll around in the built-in Simio symbol library to select a
symbol to place, similarly to what we did in Section 4.8.
• You can Import Symbol from a local file already available to you. Perhaps
this is a file you’ve created using Sketchup, or maybe a DXF file exported
from some CAD program. Or you can import an image file like a JPG,
BMP, or PNG file. A caution here is that DXF files can be quite large.
They are often created at a detail inappropriate for simulation (e.g., they
contain things like the threads on the nuts and bolts that hold the building
structure together). If you plan to use a DXF file, it’s best to delete the
unnecessary detail before you export to the DXF file. Tip: Often, a 2D
building layout as found in a JPG or even .pdf file is a good basis for
an animation. It’s a very efficient way to provide scale and background
and then you can add 3D objects (possibly including walls) to provide the
depth.
• You can Download Symbol from Google 3D Warehouse as we also discussed
in Section 4.8. Tip: When possible, search for low poly symbols. This refers
to symbols with a low polygon count (a measure of display complexity).
Even some Google 3D Warehouse symbols have the same problem as
DXF files — their complexity and detail is inappropriate for simulation
Remove Watermark Wondershare
PDFelement
animation. So you might select a very nice picture of the “perfect” fork
lift truck only to find that it inflates your model size by 10 MB because
it’s detailed down to the bolts that hold the muffler bracket in place. In
some cases you can load such a symbol into Sketchup and remove the
unnecessary detail.
from the Facility window Drawing ribbon we discussed in Section 8.1.3. If you
want to add status objects to your Facility window you’ll have to click on the
Animation ribbon (Figure 8.5).
You’ll note that the tool set in each of these two ribbons is very similar:
• Status Label: Displays static text or the value of any expression.
• Status Plot: Displays one or more values as they change over time.
• Status Pie: Compares two or more values as a proportion of the total.
• Circular Gauge and Linear Gauge: Provide a more visually compelling
display of a model value.
• Button: Provides a way for a user to interact with the model. Each time
the button is clicked an Event is triggered, which could be linked to a
process.
• Floor Label (Console only): Similar to the Floor Label we discussed in
Section 8.1.3
• Detached Queue (Facility only): Adds animation to show entities that
are waiting in a queue.
ribbon to select a new ATM Customer. And the Import Symbol and Go To 3D
Warehouse ribbon buttons are similar to options on the Place Symbol button
we discussed on the Drawing ribbon. Likewise, the items in the Decoration group
are identical to those in the Drawing ribbon Decoration group.
• The green horizontal line across the default Vehicle symbol is an attached
queue that animates RideStation.Contents to show the entities that are
being carried by (i.e., riding on) the vehicle.
• In a similar fashion, if you’re grouping your entities by using the Combiner
object, you can display the group members by adding an attached queue to
your parent entity object. If you animate the BatchMembers queue you’ll
see the members currently in the batch of the parent. You can find examples
of this in SimBits CombineThenSeparate and RegeneratingCombiner.
• You can also display text or numeric information with an entity. In
SimBit OverflowWIP, we wanted to be able to verify the creation time
of each entity, so we added an attached status label using the expression
TimeCreated on the entity. We also rotated the label so we could still read
it when it’s in a queue.
Adding attached information can be both visually compelling and valuable for
verifying your model. Since attached animation becomes part of (or even “inside”)
the object, the scope for attached animation is the object itself. The advantage
of this is that you can reference any expression from the perspective of the object.
So in the first bullet above, for example, we referenced RideStation.Contents,
not Vehicle1.RideStation.Contents. The latter wouldn’t work because it
would be at the scope of the containing model, rather than the object itself.
Remove Watermark Wondershare
PDFelement
that contains properties Current Symbol Index and Random Symbol. Note that
these properties are disabled unless you’ve added at least one additional symbol
to your object. Using these properties allows you to select from between the
specified symbols.
The Random Symbol property is looked at when an object is first created. If
this is set to True, then it will automatically select one symbol from the set
of defined symbols. For example, in case 1 above, if you had defined 3 person
Remove Watermark Wondershare
PDFelement
symbols: a man, a woman, and a child, then setting Random Symbol to True
would result in each entity having a 1/3 chance of using each symbol.
The Current Symbol Index property is used to tell Simio where to look to
determine that object’s symbol number. Symbols are numbered starting at 0,
so if you have 5 symbols they’ll be numbered 0 through 4. To animate case
two above, set Current Symbol Index to ModelEntity.Picture and then assign
that entity state to the index of the picture you want to display as the entity
progresses through the model.
The Current Symbol Index property doesn’t have to be an object state — it can
be any expression. For example in SimBit OverflowWIP, we wanted an obvious
visual cue to show in which hour a part was created, so we used the Current
Symbol Index expression of \ Math.Floor(ModelEntity.TimeCreated) on the
entity. Since time is in hours, it uses a new symbol for each hour of the day. %
newline added before Capacity. If the text in this paragraph changes, delete the
\ in the formula.
The default Current Symbol Index property for a Server is _ServerName_.ResourceState.
This assumes nine symbols that are supplied with the library, one for each
of the standard resource states 0 through 8 for Starved, Processing, Blocked,
Failed, OffShift, FailedProcessing, OffShiftProcessing, Setup, and OffShiftSetup
respectively. Tip: View the “List States” topic in help to see the state definitions
for other objects.
(recall that this is a small board with computer chips on it). Unfortunately
nothing appears to be close, so let’s keep looking.
• Again click on the PCB object and then click on the Download Symbol
button. If you’re on-line, this will bring up the Trimble 3D Warehouse
search screen. Do a search on PCB. In our search we found over 1400
symbols involving that term (most having nothing to do with our topic)
but there were several good candidates. Select the symbol named Gumstix
Basix R1161 and then select Download Model. TIP: You might think
that other symbols like Nat's PCB is an appropriate symbol, and it could
be. But after you download it you would find that your model size has
increased by several megabytes. This is because that symbol has a very
high polygon count - a measure of the complexity of the symbol. If you
happen to download such a large symbol and you do not want it bloating
your model, you can replace the symbol with a smaller one and then delete
the large symbol from the Project → Symbols window.
• After the symbol downloads it will be displayed in the Simio Import
window. Here you have a chance to rotate, resize, and document the
symbol. Let’s do all those. Use the Rotate button to rotate it so the
short edge is to the right. We want the longest dimension to be 0.3 meters,
so change the Width to be 0.3 (you’ll note that the other dimensions
change proportionally). And finally we’ll change the Name to PCB and the
Description to Gumstix Basix.
• The symbol will appear quite small, but no worries — we’ll deal with that
later.
Let’s follow a similar process to change our chip-placement machine.
• Since there are no placement machines in the Simio symbol library, we’ll
skip that step. Click on the Placement object and then click on the
Download Symbol button to bring up the Trimble 3D Warehouse search
screen. Do a search on placement machine.
• We selected the Fuji QP351 and downloaded it. It downloaded in the
correct orientation and size, so we can just click OK to accept it as is and
apply it to the Placement object.
The three parallel stations are also placement machines, so we could simply use
the same symbol for them. But they actually represent higher-tech machines that
do more accurate placement, so let’s pick a different symbol for those machines.
Repeat the above process starting on the upper machine. Select a different
machine (we chose the Fuji QP 242e because it looks high-tech) and download
it. Adjust the rotation and size of your selection appropriately — we had to
rotate ours 180 degrees and change the width to 1.5 meters.
You may have noticed that each time you download a symbol, it gets added
to your project library. So now you can click on each of the other two parallel
machines and apply the same placement symbol you just downloaded. Both the
inspection and the rework are manual operations, so we’ll animate both of them
using a suitable table symbol. You can download another symbol if you like,
Remove Watermark Wondershare
PDFelement
but we think the TableSaw in the symbol library under the Equipment category
looks close enough to a work table to meet our needs, so we just applied that to
both manual stations.
If you’ve followed along as instructed, you may be feeling unhappy now. Our
symbols don’t look very nice at all against the white background and in fact
they look pretty small. The problem is one of model detail. In our earlier models
we were not concerned about the details of part and machine sizes and their
proximity because we were making the simplifying assumption of instantaneous
movement between stations. While this is often a very good assumption at the
beginning of a modeling project, you’ll usually come to a point where it does
matter — that’s where we are now.
In many cases you’ll have a JPG or other image file of the system layout that
you could use as a background image. That can then be used for sizing and
placing your equipment appropriately. In this case we don’t have that. As we
were selecting symbols, we’ve been providing some selected dimensions. But in
our original model we placed the machines arbitrarily about 10 meters apart and
in the real system they are only about 1-2 meters apart. Before we start moving
machines around, let’s clean up the associated objects for each of our servers:
• Zoom into the three parallel stations so they fill the screen.
• Start at the bottom of the screen (the easiest to see) and click on the input
node (the one named Input@FinepitchSlowStation) and drag it so that
it’s adjacent to the input side of the placement machine symbol. Repeat
that with the output node. It may look good in the 3D view, but we often
flip back and forth between 2D and 3D to fine tune the adjustments to
look good in both views. The nodes and paths in your animation should
now look similar to those in Figure 8.11.
• The queue named Processing.Contents (the green line above the machine
in the 2D view) shows what’s currently processing on the machine. It
would look better if this were on (or actually inside) the machine. In the
2D view, drag the queue so it looks like it’s in the bed of the placement
machine. At this point, it’s still on the floor. Move to the 3D view and use
the Shift-Drag to lift the queue up so it’s visible above the bed. Then move
both ends of the line so the queue is centered on the bed as illustrated
in Figure 8.11. Tip: It’s easy to “lose” a small symbol inside of a large
one, so it’s generally best to leave the queue longer than the object on
which you’re displaying it until you’re sure it’s in the right place. Only
then should you adjust the length.
• Shorten the length of the Output Buffer queue and move it adjacent to
the output side. Since we’re using a zero capacity input buffer, the queue
on the input side will never be used — delete it to avoid confusion.
• Now repeat that whole process (the above three steps) with the other two
placement machines.
• Follow the same process for Placement, Inspection, and Rework except
that you should not delete their input-buffer-queue animations because
Remove Watermark Wondershare
PDFelement
After completing all of the above, your model still looks odd. If you run it now,
the PCB symbols that are moving around will look like little dots. We’ve fixed
the scale of the symbols and their associated objects, but we’ve not yet adjusted
the scale of the layout to reality. Let’s take care of that now:
• In the 2D view, select FinepitchSlowStation and drag it upwards
so it’s parallel to and about 1 meter away from FinepitchMediumSta-
tion. (You can take advantage of the grid lines to help.) Then select
FinepitchFastStation and drag it downwards so it’s parallel to and
about 2 meters away from FinepitchMediumStation. Note that your
queues and nodes will move along with each object. Consider why that is.
• Move the rest of the objects so that there is approximately 2 meters of
horizontal distance between the objects.
• The objects that are still using the standard library symbols now appear
quite large. You may replace them with other symbols if you wish. We just
dragged a corner of the symbol to reduce the sizes an appropriate amount.
As a last quick enhancement, let’s add a floor and some walls:
• In the 2D Facility view, use the Rectangle button on the Drawing ribbon
to draw a rectangle that completely covers the floor area of the equipment.
Use the Color button to make it gray. If you’d like the floor grid to show
through, go to the 3D view and use Shift-drag to move the floor slightly
down. Now right-click on the floor and enable Lock Edits to prevent
accidentally moving it.
Remove Watermark Wondershare
PDFelement
• Back in the 2D view, draw a polyline around the left, back, and right edges
of the floor. Still in the Drawing panel, give the wall a Width of 0.2 and a
Height of 1 meter (so we can still easily see over it). In the 3D view, select
an interesting texture from the Texture button and apply it to the wall.
Again, right click to Lock Edits and prevent accidental movement of the
wall.
In this section we’ve used some of the simple techniques we learned in earlier
sections to improve our animation a bit and make it roughly to scale (Figure
8.12).
Sometimes it’s convenient to do this “after the fact” as we just did, but generally
it’s easiest to build the model at least roughly to scale from the start (preferably
starting with some sort of scale drawing). But either way, you can see that, with
just a little effort, we’ve converted a rather plain engineering tool into one that’s
a bit more realistic as in Figure 8.13.
We could continue improving our animation with more attention to the detail
(perhaps upgrade our “table saw”), but we’ll leave that as an exercise for you.
But we’ll come back for some additional enhancements later.
time discussing each of those in the following sections. But we’ll start with a
very brief introduction into movements not relying on those networks.
8.2.2.2 Connectors
Connectors are the simplest type of link. They connect two objects directly with
no internal time delay (e.g., in zero-time). Since the movement is instantaneous
there is no interference between entities; in fact, only one entity at a time is
traversing the link. It works as though the entity were transferring directly from
the start node to the end node, or directly to the object associated with the end
node. Connectors have a Selection Weight property that can be used to select
between outbound links when more than one outbound link is connected to a
node. We used this feature in Model 5-1, discussed in Section 5.2.
8.2.2.3 TimePaths
TimePaths have all of the basic link capabilities including the Selection Weight
discussed above. But instead of being a zero-time transfer like a Connector, it
has a Travel Time property to designate the time the entity should take to travel
the length of the path. It also has a Traveler Capacity so you can limit the
number of entities concurrently traveling on the path. Because of that capacity
limitation, it also has an Entry Ranking Rule to use in selecting which of the
potential waiting entities should be granted access next.
TimePaths also have a Type, which determines the travel direction. This can
be either Unidirectional or Bidirectional. Unidirectional allows travel
only from the start node to the end node. Bidirectional allows travel in either
direction, but only in one direction at a time, much like a one-lane bridge
on a two lane road. If you want to model a fully bidirectional path (e.g., a
two-lane road) you’d need to model each lane as a separate unidirectional path.
For a bidirectional path you can control the direction in your logic by assign-
ing the path state DesiredDirection to: Enum.TrafficDirection.Forward,
Enum.TrafficDirection.Reverse, Enum.TrafficDirection.Either, or
Enum.TrafficDirection.None.
Note that TimePaths support State Assignments for On Entering and Before
Exiting the path. They also support a set of Add-on Process Triggers to allow
you to execute logic at key situations. These are very powerful features for
customizing links’ behavior and their interaction with surrounding objects.
8.2.2.4 Paths
The Standard Library Path object has all the features of the TimePath except
for the TravelTime property. Instead of that, the Path calculates the travel time
based on each individual entity’s DesiredSpeed and the length of the Path (for
example, an entity with Desired speed of 2 meters/minute would require at least
3 minutes to traverse a path of 6 meters). There are other parameters that can
also affect the travel time. If the Allow Passing2 parameter is set to False, then
2 Allow Passing permits one entity to pass through another. This has an interesting side
effect in that two entities can actually occupy the same space. So if multple entities enter a
path at the same time, the default allow passing of True means that they might all occupy the
Remove Watermark Wondershare
PDFelement
if a faster entity catches up to a slower entity, the fast entity will automatically
slow to follow (see SimBit VehiclesPassingOnRoadway for an example of this).
Also, the path itself may impose a Speed Limit that may prevent the entity from
traveling at its Desired Speed.
Path also has a Drawn To Scale property. If you set Drawn To Scale to False,
you can specify a logical length that’s different from the drawn length. This
is useful in situations where you need an exact length, or in situations where
you want to compress the drawn length for animation purposes (e.g., if you’re
modeling movement within and between departments, but the departments are
a long distance away from each other).
The reverse process occurs when the entity at the end moves off the conveyor.
The blockage is removed and the second entity will attempt to re-engage. If the
Entity Alignment is Any Location, then that attempt will always be immediately
successful. If the Entity Alignment is Cell Location, then the second entity
must wait until its leading edge is aligned with a cell boundary, then it can
re-engage and start moving.
A final way in which a conveyor differs from a Path is that, because a conveyor
represents a device, it has Reliability properties (similar to those of a Server, dis-
cussed in Section 5.3.4) and it has additional Add-on Process Triggers associated
with reliability.
• Right click on any object in the group, then select Convert to Type →
Conveyor to convert all six connectors to conveyors.
• Change the Desired Speed to 1 Meters per Minute.
• We’d like to make it look like a conveyor. We could apply the Simio built-in
conveyor path decorators, but they are too large for our use. So we’ll just
make the line that represents the conveyor path look more realistic.
Remove Watermark Wondershare
PDFelement
The Inspector can store only three parts on his table. All other parts must
remain on the incoming conveyors. Set the Inspector InputBuffer to 3. Adjust
the Inspection input-buffer queue InputBuffer.Contents so that it’s a short
line just large enough to display three parts and arrange it on top of the back
edge of the inspector’s table as in Figure 8.16.
Run the model and study the behavior closely. Notice that, on accumulating
conveyors, parts can be stopped at the delivery end, while other parts are
still moving along the conveyor. Note that you’ll start to see backups on the
Inspector’s incoming conveyors, especially when it goes Off-Shift. And because
Remove Watermark Wondershare
PDFelement
and the current location and other properties/states of that device are important.
The Simio Standard Library provides two objects for just that purpose: Worker
and Vehicle. Both Workers and Vehicles are derived from Entity so they have
all the capabilities and behaviors of entities, and more. They can move across
networks similarly to entities, except that their behavior when reaching a node
may be a bit different.
8.2.5.1 Workers
A Worker is an entity with additional capabilities to carry other entities. It’s
dynamic, in that the runtime object (the RunSpace) is created during the run.
By specifying the Initial Number in System, you can determine how many
Worker copies will be available. Each copy (a separate object) would represent
an individual, so Worker doesn’t have an Initial Capacity property; nor will it
allow assigning a capacity greater than one. Since Worker is intended primarily
to represent a person, it doesn’t have device-specific properties like Reliability,
but it does support Work Schedules as would normally be followed by a person.
Please consult Figure 8.17 as we review some of the key properties of Worker.
Like entities, workers may travel on a designated network or through free space –
the default is to follow a network, if possible, otherwise use free space. Under
the Routing Logic Category, Workers must be provided a value for Default
Node (Home) to specify where on the network the Worker starts and where to
return to if directed to its “Home” location. There are two actions that must
Remove Watermark Wondershare
PDFelement
be specified. Idle Action specifies the action to take when the worker runs out
of work and work requests. OffShift Action specifies the action to take when
the worker becomes Off-Shift (capacity is zero). For both of these actions, you
have two choices. The first choice is whether to remain at your present node
location, or return to the designated home-node location. The second choice is
whether to Park (move off the network into a parking area that may or may not
be animated), or to stay on the network, potentially blocking any traffic that
may want to pass.
Under the Transport Logic Category, a Worker has a Ride Capacity that specifies
how many entities it can concurrently carry. It also has a Load Time and Unload
Time, which determine how long is required per entity for loading and unloading.
Just like an entity, under Population a Worker has a Maximum Number in
System, which is provided as a validation tool. You can set this to the maximum
number of Workers that you might expect, and if you dynamically create Workers
beyond this limit, Simio will generate an error. Under Advanced Options, there
is also a Can Transfer In & Out Of Objects property that controls whether
a Worker can enter an object through its external nodes (e.g., whether it’s
permitted to enter a server). This defaults to False because in most cases
Workers may provide a service to an entity or other object, but they usually
don’t execute the same processing logic at a server that an entity would.
The Worker has dual modes: as a moveable resource that’s seized and released
and travels between model locations, and as a transporter that can pick up,
carry, and drop off entities at different locations.
If moving the resource to a location is important, you can specify ToNode for
the Request Move property, and then the location the resource should visit in
the Destination Node property, as illustrated in Figure 8.18. While you may use
any node as a destination, it’s often simpler to add a node adjacent to the fixed
object, and request that the resource use this new node as a destination for that
moveable resource.
Requesting a visit works only for moveable resources – either an Entity or an
object derived from an entity like a Worker or Vehicle. When you specify a
Request Move, the token will not leave the Seize step until the resource has
been seized and moved to the specified node. When the resource is eventually
released, it will either get automatically reallocated to another task, or start its
Idle or OffShift action if appropriate.
• The Reservation Method specifies how you wish to select and reserve a
transporter. There are three possible values:
– Reserve Closest — Select the transporter that’s currently the closest
and use the Selection Goal to break any ties. Then Reserve that
transporter. A Reservation is a two-way commitment: the transporter
commits that it will go there (although possibly not immediately),
and the entity commits that it will wait for the reserved transporter.
– Reserve Best — Select the best transporter using the Selection Goal
and use the closest to break any ties. Then Reserve that transporter.
– First Available at Location — Don’t make a reservation, but
instead just wait until the first appropriate transporter arrives for a
pickup. Note that it’s possible that no transporter will ever arrive
unless the transporter is following a sequence (like a bus schedule) or
directed via custom logic.
model to represent each bed individually, we don’t yet need that level of detail.
Instead let’s just create a slightly better animation symbol to represent a suite
of beds.
Figure 8.20: Model 8-3 with new object symbols for multi-bed rooms.
Initial Node (Home) to AideStation; set the Idle Action and Off Shift
Action to Park At Home. In the Population category set the Initial Number
in System to 6 to indicate that we will have six aides.
Figure 8.21: Nurse station with node and attached parking queue.
Remove Watermark Wondershare
PDFelement
• A list is defined using the Lists panel in the Definitions window. To add a
new list you click on the type of list you want to create in the Create section
of the List Data ribbon. Referring again to Table 8.1, there are three lists
from which we’ll need to choose for an escort: AideOnly, AidePreferred,
and NursePreferred. Click on the Transporter button three times to
create those three lists, then name them AideOnly, AidePreferred, and
NursePreferred.
• When you select the AideOnly list, the lower part of the screen will display
the (currently empty) list of transporters in that list. Click on the right
side of the first cell (it may require several clicks) and select Aide from
the pull-down list of transporters. Since there’s only a single choice in the
AideOnly list, we’re done defining this list.
• Repeat the above process for the AidePreferred list, putting Aide in the
first row and Nurse in the second row. This list order means that when you
select from this list using the Preferred Order rule, you’ll select an Aide
if available, otherwise select a Nurse if available. (If neither is available,
you’ll select the first one that becomes available.)
• Repeat the above process one final time for the NursePreferred list,
putting Nurse in the first row and Aide in the second row.
Now that we’ve created our lists, we can add data to our Treatments table. In
the Tables panel of the Data window, select the interior tab labeled Treatments.
Recall that this table is referenced by the patients to determine which location
they should visit next, and what properties to use while traveling to and at that
location. This covers all of the locations visited, not just the exam-room and
treatment locations. We’ll add a property for the transportation: % and another
property for the treatment.
• Click on the Object Reference button and select the Transporter List
type. Name that property EscortType. We’ll use this to specify which
worker group from which we want to select for escort to each location.
• Use the data from Table 8.1 to complete the data in the new column.
When completed it should look like Figure 8.22.
Now we’re ready to enhance our network. Although our staff will be escorting
patients on the existing network, they’ll also be traveling on their own paths to
move between locations. And they need to be able to travel freely from any input
or output node to any other input or output node. So we’ll add an additional
set of paths to facilitate staff movement.
There are several ways to approach the creation of this network. One extreme
approach is to draw two paths (one in each direction) between every pair of
nodes. This would obviously be quite tedious, but complete. Another extreme
would be to have a unidirectional cycle of paths. This would likely represent
the fewest number of paths, but would also result in inefficient and unrealistic
movements. We’ll adopt a middle approach — we’ll have a cycle of unidirectional
paths, but add extra nodes to support paths to connect the destination nodes as
well as support some shortcuts to make travel more efficient.
We’ve added that set of nodes and paths for the “middle approach” as shown in
the highlighted paths in Figure 8.23.
Add paths and nodes to your model in the same fashion. In case you’re wondering,
we achieved the highlighting by selecting all the new paths and then right clicking
to add them to a network called StaffNetwork. While a network can be used
Remove Watermark Wondershare
PDFelement
to limit access to only certain entities, in this case we don’t need that capability.
But when your path networks start to get complex, assigning them to a named
network can be handy for visualization and debugging. To highlight those paths
as we’ve done here, go to the View ribbon and select the View Networks button.
So far we’ve created our staff, created lists of them to support selection, added
data to our tables so we know what to select, and we now have our paths set up
to support escorting. With all that groundwork in place, we just need to tell our
entities when to wait for an escort. That’s done on the transfer nodes.
Lets start with our new node, WaitUrgentEscort. Select it and set Ride On
Transporter to True. Set Transporter Type to From List. We want to get the
list for this patient and location from our table, so for Transporter List select
the value Treatments.EscortType. And finally set the Reservation Method to
Reserve Best, leaving the Selection Goal (e.g., how we define “Best”) set to
Preferred Order.
Select the three other output nodes where we need escort (Registration,
ExamRooms, and TraumaRooms) and make the identical changes to those proper-
ties as well. Note that you can do them individually, or do a group-select and
then do them all at once.
If you’ve not already done so, now would be a good time to save and run the
model. If you’ve done everything right, you should see your patients moving just
as they did in earlier versions of this model, but they’ll now be accompanied by
staff in some of their movements. You can adjust the location of the RideStation
queues on your workers so that the patients travel beside the workers rather
than in front of them.
At this point, you’re probably thinking something like — “So what about the
actual treatment – are the patients treating themselves? The staff escorts patients,
but isn’t involved in patient treatment!” We will add this functionality to the
model in Chapter 9. Also, there are many ways that we could enhance the
animation and patient movement (the things we focused on in this chapter) but,
as authors like to say, we’ll leave such enhancements as an exercise for the reader.
8.3 Summary
In this chapter we have illustrated the value of 2D and 3D animation and some
of its uses in verification and communication. We also discussed some pitfalls
in placing too much emphasis on animation to the exclusion of higher-priority
project tasks and other analysis techniques. We briefly explored many of the
basic animation and viewing options to give you a sound basis for animating
your own models. Then we discussed how to animate dynamic objects (e.g.,
entities) when they are moving through free space, on links, on conveyors, or
being assisted by other dynamic objects like the Standard Library Worker or
Vehicle.
Remove Watermark Wondershare
PDFelement
In addition to the above topics there are other modeling situations and approaches
that will be discussed in Chapter 10.
8.4 Problems
The goal for the first four problems is to better understand animation issues, not
necessarily to generate a useful analysis. To this end, unless otherwise specified
you can make up reasonable model parameters to help you illustrate the assigned
task.
type of customer. Both on-screen and in the output, report the number of
premium customers who received a discount, the total discounts paid, and
the net profit (after discounts and costs) of the system.
• Scenario a) Assume that each agent only handles customers of his
designated type.
• Scenario b) Relax the above assumption. Consider alternate work
rules (who services which customer under which conditions) for this
same staff. Evaluate each proposed scenario to see the impact on the
metrics.
• Scenario c) Model other possible solutions to improve the system.
You may use links if that helps.
Remove Watermark Wondershare
PDFelement
Chapter 9
The goal of this chapter is to discuss several advanced Simio modeling concepts
not covered in the previous four chapters. The chapter is comprised of three
separate models, each of which demonstrates one or more advanced concept. One
common thread throughout the chapter is the comprehensive experimentation
and use of simulation-based optimization with the OptQuest®add-in. In Section
9.1 we revisit the Emergency Department model originally introduced in Chapter
8 and focus on the decision-making aspects of the problem. As part of the
decision-making function, we develop a single total cost metric and use the
metric to evaluate alternative system configurations. In this section, we also
introduce the use of the OptQuest simulation-based optimization add-in and
illustrate how to use this add-in. In Section 9.2 we introduce a Pizza Take-out
restaurant model and incorporate a Worker object to demonstrate a pooled
resource system. We then use the model to evaluate several alternative resource
allocations, first using a manually-defined experiment, and then using OptQuest
to seek optimal resource levels. Finally, in Section 9.3, we develop a model of
an assembly line with finite capacity buffers between stations and demonstrate
how to set up an experiment that estimates line throughput for different buffer
allocations. Of course there are many, many advanced features/concepts that
we are not able to discuss here so this chapter should be considered as a starting
point for your advanced studies. Many other simulation and Simio-specific
concepts are demonstrated in Simio’s SimBits (as described in the Preface)
and in other venues such as the proceedings of the annual Winter Simulation
Conference (www.wintersim.org) and other simulation-related conferences.
357
Remove Watermark Wondershare
PDFelement
Model 9-1 maintains the same basic problem structure where patients of four
basic types arrive and follow different paths through the system using a Sequence
Table to specify their routes. The only difference in the patient routing is that
Remove Watermark Wondershare
PDFelement
Urgent patients now exit through the NormalExit object whereas in Model 8-3
they exited through the TraumaExit object. Figure 9.2 shows the updated
PatientData data table and Treatment Sequences table for Model 9-1. Note that
the Escort Type column has been removed from the Treatments table and a
Waiting Time column has been added to the PatientData table. As part of
our resource allocation model, we track patient waiting time — defined as any
time that the patient is waiting to see a doctor or nurse (including the interval
from when the patient first arrives to when they first see a doctor or nurse). We
will use the waiting time to determine patient service level and to balance the
desire to minimize the resource and staffing costs. The Waiting Time entries
in the PatientData table allow us to track waiting time by patient type. We
removed the Escort Type column as we are no longer modeling the physical
movement of patients and staff.
Figure 9.2: PatientData and Treatment data tables for Model 9-1.
When a patient arrives to a particular room (as specified in the Sequence table),
the patient will seize the Doctor and/or Nurse resource(s) required for treatment.
If the resources aren’t available, the patient will wait in the respective room
until the resources are available (much as it works in a real emergency room!).
As such, we separate the physical room resources (modeled using Server objects)
from the exam/treatment resources (modeled as Resource objects) so that we
can evaluate system configurations with different numbers of each – think of a
typical doctor’s office that has more exam/treatment rooms that it has doctors.
As one would expect in an emergency room, priority for the Doctor and Nurse
resources should be based on the priority level specified in the PatientData table
(as we did in Model 8-3). So, for example if there are Routine and Moderate
patients waiting for a doctor and an Urgent patient arrives, the Urgent patient
should move to the front of the queue waiting for the doctor. Similarly, if there
are only Routine patients waiting and a Severe or Moderate patient arrives, that
patient should also move to the front of the doctor queue. We can implement
this using the RankingRule property for the Doctor and Nurse resources. Figure
9.3 shows the properties for the Doctor resource. Setting the Ranking Rule
property to Largest Value First and the Ranking Expression property to
PatientData.Priority tells Simio to order (or rank) the queue of entities
waiting for the resource based on the value stored in the PatientData.Priority
field 1 . One might also consider allowing Urgent patients to preempt a doctor or
nurse from a Routine patient, but we will leave this as an exercise for the reader.
internal queue for the waiting entities. This simplifies implementing the type of global priority
that we need for this case.
Remove Watermark Wondershare
PDFelement
patient will wait in the room until the “treatment resources” arrive. The current
Server object logic that we have seen handles the allocation of room capacity,
but not the treatment resources. As such, we will add-on a process that calls
the treatment resource(s) once the room is available.
Figure 9.4 shows the two add-on processes for the ExamRooms object. The
process ExamRooms_Processing is executed when an entity has been allocated
server capacity (the ExamRooms Server) and is about to start processing and
the ExamRooms_AfterProcessing add-on process is executed when an entity
has completed processing and is about to release the server capacity.
When a patient enters the ExamRooms server, we do two things — seize the
exam/treatment resource and record the waiting time once the resource is
allocated to the patient. As shown in Table 9.1, patients in the exam room
need either a doctor or a nurse, with the preference being a doctor if both
are available. In Section 8.2.7.3 we demonstrated how to use Simio Lists and
the PreferredOrder option for an entity to select from multiple alternatives
with a preferred order. We use that same mechanism here — we defined a list
(DoctorNurse) that includes the Doctor and Nurse objects (with the Doctor
objects being first in the list) and seize a resource from this list in the Seize step
in the add-on process. Figure 9.5 shows the DoctorNurse list and the details of
the Seize step. Note that we specified the Preferred Order for the Selection
Goal property so that the Doctor will have higher priority to be selected. Note
that we could also have used the Server object’s Secondary Resources properties
to achieve this same functionality, but wanted to explicitly discuss how these
secondary resource allocations work “under the hood.”
The Assign step, Assign2 is used to record the initial component of the patient
waiting time and the Assign step, Assign1 is used to mark the time that the
patient leaves the Exam room (more on this later). The Assign2 step will
execute when the doctor or nurse resource has been allocated to the entity.
Recall that we would like to track all of the time that a given patient waits for a
doctor or a nurse. Since patients can potentially wait in multiple locations, we
will use an entity state (WaitingTime) to accumulate the total waiting time for
each patient. Figure 9.6 shows the properties for the the two Assign steps.
Remove Watermark Wondershare
PDFelement
Figure 9.5: List and Seize details for the ‘ExamRooms‘ add-on process.
Figure 9.8 shows the add-on processes for the TreatmentRooms object. Patients
come to the treatment from either the trauma room (Urgent patients) or from
the exam room (Moderate and Severe patients) so we cannot use the entity
creation time to track the patient waiting time (as we did before). Instead,
we use the previously stored time (ModelEntity.tmp) and use a second Assign
immediately after the Seize in order to add the waiting time in the treatment
room to the patient’s total waiting time (recall that an entity (technically, it’s a
token that waits at the Seize step, but the token represents the entity) remains
in the Seize step until the resource is available — the queue time).
Figure 9.9 shows the properties for the first and second Assign steps in the
TreatmentRooms_Processing add-on process. The basic concept of marking an
entity with the simulation time at one point in the model, then recording the
Remove Watermark Wondershare
PDFelement
time interval between the marked time and the later time in a tally statistic,
is quite common in situations where we want to record a time interval as a
performance metric. While Simio and other simulation packages can easily track
some intervals (e.g., the interval between when an entity is created and when it
is destroyed), the package has no way to know which intervals will be important
for a specific problem. As such, you definitely want to know how to tell the
model to track these types of user-defined statistics yourself.
Figure 9.9: Assign step properties for adding the second entity wait component.
Figure 9.10 shows the add-on processes for the NormalExit object. When a
patient leaves the system, we will update our waiting time statistics that we will
use in our resource allocation analysis.
The Tally step (see Figure 9.11 for the properties) records the waiting time for
the patient (stored in the WaitingTime entity state).
The PatientData.WaitingTime value for the TallyStatisticName property indi-
cates that the observation should be recorded in the tally statistic object specified
in the WaitingTime column of the PatientData table (Figure 9.2 shows the data
tables and Figure 9.12 shows the tally and output statistics for the model). As
such, the waiting times will be tallied by patient type. This is another example
of the power of Simio data tables — Simio will look up the tally statistic in the
table for us and, more importantly, if we add patient types in the future, the
reference does not need to be updated. The Assign step adds the waiting time
for the entity (stored in the WaitingTime entity state) to model state TotalWait
Remove Watermark Wondershare
PDFelement
so that we can easily track the total waiting time for all entities.
The final set of steps in the process are used to track the patient service level. For
our ED example, we define service level as the proportion of Routine patients
whose total waiting time is less than one-half hour (note that we arbitrarily
chose one half hour for the default value). So the first thing we need to do is
identify the Routine patients — the first Decide step does this (see Figure 9.13
for the step properties).
Next, we need to determine if the current patient is “satisfied” based on that
patient’s waiting time. The second Decide step does this (see Figure 9.14 for the
step properties).
Note that we used a referenced property (SatisfactionThreshold) rather than a
fixed value (0.5 for one-half hour) to simplify the experimentation with different
threshold values. If the patient is satisfied, we increment a model state for
counting satisfied customers (SatisfiedRoutine). Otherwise, we increment a
model state for counting unsatisfied customers (UnsatisfiedRoutine). The two
Assign steps do this. We will use an output statistic to compute the overall
service level for a run. Figure 9.12 shows the model output statistics and Figure
9.15 shows the properties for the Satisfaction output statistic where we compute
the proportion of satisfied patients.
Finally, we will use several referenced properties to support our resource allocation
Remove Watermark Wondershare
PDFelement
Figure 9.13: Decide step properties for identifying ‘Routine‘ patient objects.
Figure 9.14: Decide step properties for determining whether the patient is
satisfied based on waiting time.
Figure 9.17 shows a portion of an example experiment for Model 9-1. Note that
the referenced properties show up as Controls in the experiment. As such we can
easily compare alternative allocation configurations using different experiment
scenarios without having to change the model since these values can be changed
for individual scenarios in an experiment.
Table 9.2: Weekly costs for each unit of the resources for Model
9-1.
Since our model tabulates the total waiting time already, we can simply set
our replication length to one week and can then calculate the total cost of a
configuration as an output statistic. The expression that we use for the TotalCost
output statistic is:
2000 x ExamCapacity + 2500 x TreatmentCapacity + 4000 x TraumaCapacity
+ 4000 x NurseCapacity + 12000 x DoctorCapacity + 250 x TotalWaiting-
Time.Value
Now we have two output statistics that we can use to evaluate system configura-
tions — total cost and service level – total cost we want to be as low as possible
and service level we want to meet a minimum value set by the stakeholders.
Figure 9.18 shows a sample experiment (InitialExperiment) with four scenarios
and the two output statistics defined as experiment Responses (TC for Total Cost
and Satisfaction for the service level). Note that we just made up all of the
costs in our model so that the model would be interesting. In the real world,
these are often difficult values to determine/identify. In fact, one of the most
important things to which to expose students in an educational environment is
the difficulty in finding or collecting accurate model data.
(except that Trauma could be as low as one); management also wants to limit
the capacities of Doctor to at most ten and Nurse to at most fifteen, and the
capacities of Exam and Treatment to at most ten each, and Trauma to at most
five.
Let’s think for a moment about what all this means. We’re trying to minimize
total cost, an output response from the Simio model, so at first blush it might
seem that the best thing to do from that standpoint alone would be to set each
of the five capacity levels to the minimum allowed, which is two for each, except
one for Trauma. However, remember that total cost includes a penalty of $250
for each hour of patient waiting time, which drives up total cost if we choose
such rock-bottom capacity levels that, in turn, lengthen the queues (so maybe
that’s not such a good idea after all, from the total-cost viewpoint). Likewise,
we need to meet the service-level-satisfaction requirement, that it be at least 0.8,
which may imply staffing some capacity levels above their bare-minimum values.
It helps our understanding of the situation to write all this out as a formal
optimization problem, even though standard mathematical-programming methods
(like linear programming, nonlinear programming, or integer programming) can’t
even come close to actually solving it, since the objective function is an output
Response from the simulation, so is stochastic (i.e., is subject to sampling error
so we can’t even measure it exactly — more on this later). But, we can still at
least express formally what we’d like to do:
min T otalCost
Subject to:
2 ≤ DoctorCapacity ≤ 10
2 ≤ ExamCapacity ≤ 10
2 ≤ T reatmentCapacity ≤ 10
1 ≤ T raumaCapacity ≤ 5
2 ≤ N urseCapacity ≤ 15
All five of the above capacities are integers
Satisf action ≥ 0.8,
until after we run the simulation whether we’re obeying our requirement that it
ends up being at least 0.8 (so this is sometimes called a requirement, rather
than a constraint, since it’s on another output rather than on an input).
Well, it’s fine and useful to write all this out, but how are you going to go about
actually solving the optimization-problem formulation stated above? You might
first think of expanding the sample Experiment in Figure 9.18 for more Scenario
rows to explore more (all, if possible) of the options in terms of the capacity-level
controls, then sort on the TC (total-cost) response from smallest to largest, then
go down that column until you hit the first “legal” scenario, i.e., the first scenario
that satisfies the service-level Satisfaction requirement (the Satisfaction response
is at least 0.8). Looking at the range and integrality constraints on the staffing
Capacity levels, the number of possible (legal) scenarios is 9 x 9 x 9 x 5 x 14
= 51,030, a lot of Scenario rows for you to type into your Experiment (and
to run). And, we need to replicate each scenario some number of times to get
decent (sufficiently precise) estimates of TotalCost and Satisfaction. Some initial
experimentation indicated that to get an estimate of TotalCost that’s reasonably
precise (say, the half width of a 95% confidence interval on the expected value
is less than 10% of the average) would require about 120 replications for some
combinations of staffing capacities, each of duration ten simulated days — for
each scenario. On a quad-core 3.0GHz laptop, each of these replications takes
about 1.7 seconds, so to run this experiment (even if you could type in 51,030
Scenario rows in the Experiment Design) would take 51,030 × 1.7 × 120 seconds,
which is some 120 days, or about four months. And, bear in mind that this is
just a small made-up illustrative example — in practice you’ll typically encounter
much larger problems for which this kind of exhaustive, complete-enumeration
strategy is ridiculously unworkable in terms of run time.
So we need to be smarter than that, especially since nearly all of the four months’
of computation would be spent simulating scenarios that are either inferior in
terms of (high) TotalCost, or unacceptable (i.e., infeasible) due to their resulting
in a Satisfaction proportion less than the required 0.8. If you think of our
optimization formulation above in terms of just the five input capacity-level
controls, you’re searching through the integer-lattice points in a five-dimensional
box, and maybe if you start somewhere in there, and then simulate at “nearby”
points in the box, you could get an idea of which way to move, both to decrease
TotalCost, and to stay feasible on the Satisfaction requirement. It turns out
that there’s been a lot of research done on such heuristic-search methods to
try to find optima, mostly in the world of optimizing difficult deterministic
functions, rather than trying to find an optimal simulation-model configuration,
and software packages for this have been developed. One of them, OptQuest
(from OptTek Systems, Inc., www.opttek.com), has been adapted to work with
Simio and other simulation-modeling packages, to search for a near-optimal
feasible solution to problems like our hospital-capacities problem. There’s a
large literature on all this, and a good place to start is the open-access Winter
Simulation Conference tutorial (Glover et al., 1999); for more, see the handbook
(Glover and Kochenberger, 2003).
Remove Watermark Wondershare
PDFelement
Using results and recommendations from this body of research, OptQuest inter-
nally decides which way to move from a particular point (the user must provide
a starting point, i.e. five initial capacities in our problem) in the five-dimensional
box to try to improve the objective-function value (reduce total cost in our
example), while obeying the constraints on the input parameters (the ranges
on our five capacities) and also obeying any constraints/requirements on other
outputs (checking that Satisfaction ≥ 0.8 for us). Though our example doesn’t
have it, OptQuest also allows you to specify constraints on linear combinations of
the five capacities, e.g., 5 ≤ DoctorCapacity + N urseCapacity ≤ 20, for which
we’d need to specify two constraints with a single inequality in each. OptQuest
uses a combination of heuristic search techniques (including methods known as
scatter search, tabu search, and neural networks) to find a much more efficient
route through the 5D box toward an optimal point — or, at least a good point
that’s almost certainly better than we could ever find by just trying scenarios
haphazardly on our own, as these methods cannot absolutely guarantee that
they’ll find a provably optimal solution. As stated in (Glover et al., 1999),
. . . a long standing goal in both the optimization and simulation
communities has been to create a way to guide a series of simulations
to produce high quality solutions . . . The optimization procedure
uses the outputs from the simulation model which evaluate the
outcomes of the inputs that were fed into the model. On the basis
of this evaluation, and on the basis of the past evaluations which
are integrated and analyzed with the present simulation outputs,
the optimization procedure decides upon a new set of input values
. . . The optimization procedure is designed to carry out a special
“non-monotonic search,” where the successively generated inputs
produce varying evaluations, not all of them improving, but which
over time provide a highly efficient trajectory to the best solutions.
The process continues until an appropriate termination criterion is
satisfied (usually given by the user’s preference for the amount of
time to be devoted to the search).
For a deeper discussion of scatter search, tabu search, neural networks, and how
OptQuest uses them, see (Glover et al., 1999) and (Glover and Kochenberger,
2003).
The way OptQuest works with Simio is that you describe the optimization formu-
lation in a Simio Experiment, including identifying what you want to minimize
or maximize (we want to minimize total cost), the input constraints (the capacity
ranges for us, and that they must be integers), and any other requirements on
other, non-objective-function outputs (the Satisfaction-proportion lower bound of
0.8). Then, you turn over execution of your Experiment and model to OptQuest,
which goes to work and decides which scenarios to run, and in what order, to
get you to a good (even if not provably optimal) solution in a lot less than four
months’ worth of nonstop computing. One of the time-saving strategies that
OptQuest uses is to stop replicating on a particular scenario if it appears pretty
Remove Watermark Wondershare
PDFelement
certain that this scenario is inferior to one that it’s already simulated — there’s
no need to get a high-precision estimate of a loser.
Here’s how you set things up for OptQuest in a Simio experiment. First,
we’ll create a new Simio Experiment (choose the New Experiment button from
the Project Home ribbon) so that we can experiment both with and without
OptQuest. We named the experiment OptQuest1. Next, we need to tell Simio to
attach the OptQuest for Simio add-in. An experimentation add-in is an extension
to Simio (written by the user or someone else — see the Simio documentation
for details about creating add-ins) that adds additional design-time or run-
time capability to experiments. Such an add-in can be used for setting up
new scenarios (possibly from external data), running scenarios, or interpreting
scenario results. Combining all three technologies can provide powerful tools, as
illustrated by the OptQuest for Simio add-in. To attach the add-in, select the
Add-In button on the experiment Design ribbon and choose the OptQuest for
Simio option from the list (see Figure 9.19).
Note that when you select OptQuest, you may get a warning similar to “Setting
an add-in on an experiment cannot be undone. If you set the add-in, the current
undo history will be cleared. Do you want to continue?” If you need to keep the
undo history (and we can’t think of a reason why this would ever be the case,
but you never know!), you should answer No, make a copy of the model, and
open the copy to set up for OptQuest. Otherwise, just answer Yes and Simio
will load the add-in (and, of course, clear the undo history). Once you’ve the
added OptQuest add-in, your experiment will have some additional properties
that control how OptQuest works (see Figure 9.20).
The OptQuest-related properties are:
• Min Replications: The minimum number of replications Simio should run
for each OptQuest-defined scenario.
Remove Watermark Wondershare
PDFelement
Figure 9.20: Experiment properties for OptQuest1 after attaching the OptQuest
Add-in.
Figure 9.21: Properties for the Doctor Capacity control after attaching OptQuest.
The “new” control properties tell OptQuest whether it should manipulate the
control to search the feasible region (Include in Optimization), the “legal” values
for the control (between and including the Minimum Value and Maximum Value
property values), and the increment (Increment property value) to use when
searching the feasible region from one point to the next. The control properties
shown in Figure 9.21 specify the constraint on the Doctor Capacity from the
optimization model above (i.e., integers between 2 and 10, inclusive). The
corresponding properties for the Exam Capacity, Treatment Capacity, Trauma
Capacity, and Nurse Capacity controls are set similarly. Since we’re not using
the Satisfaction Threshold control in our optimization (recall that we used a
referenced property to specify the threshold), we set the Include in Optimization
property to No. For a control that’s not used in the optimization, Simio will use
the default value (0.5 in this case) for the property in all scenarios.
The only remaining “constraint” from our optimization above is the requirement
on the Satisfaction level (recall that we called this a requirement rather than
a constraint since Satisfaction is an output rather than an input). Figure 9.22
shows the properties for the Satisfaction response (note that, with the exception
Remove Watermark Wondershare
PDFelement
of setting the Lower Bound property to 0.8, this response is the same as the
corresponding Satisfaction response in the previous experiment).
The final step for setting up OptQuest is to define the objective function — i.e.,
tell OptQuest the criterion for optimization. Since we’d like to minimize the total
cost, we’ll define the TC response (as we did before) and specify the Objective
property as Minimize (see Figure 9.23).
Note that we divided the TotalCost model state value by 10, 000 in the definition
of the TC response so that it would be easier to compare the results visually
in the experiment table (clearly, the division merely changes the measurement
units and does not alter the comparative relationship between scenarios in any
way). Finally, we’ll set the experiment property Primary Response to TC to tell
OptQuest that the TC response (minimizing TC in this case) is the objective of
the optimization.
Now you can click the Run button and sit back and watch OptQuest perform the
Remove Watermark Wondershare
PDFelement
experiment. Figure 9.24 shows the “top” several scenarios from the OptQuest
run (we sorted in increasing order of Total Cost, so the top scenario has the
minimum total cost of the scenarios tested) Note: Depending on the specific
version of Simio that you are running, you may see different scenarios in the list,
but specific configurations should have similar responses values.These differences
can be caused by differences in the number of processors/cores, processor speed,
and computational load at the time of the run.
The top scenario in the list is scenario 051, which has 6 Doctors, 8 Exam Rooms,
7 Treatment Rooms, 2 Trauma Room and 10 Nurses, a Total Cost of 23.592
(in ten-thousands) and a Satisfaction of 0.995. Note that all of the Satisfaction
values are quite high – you have to go down the list of scenarios to scenario 060
before you find an infeasible solution (one where the 80% satisfaction requirement
is not met — note that the Satisfaction value has red background and scenario
is unchecked, indicating infeasibility). Naturally, the next question should be
“Is this really the truly optimal solution?” Unfortunately, the answer is that
we’re not sure (actually, we do know that this is not the optimal solution for
this problem, but we cheated a bit — described below — and we will not know
the answer in general). As mentioned earlier, OptQuest uses a combination
of heuristic-search procedures, so there is no way (in general) to tell for sure
whether the solution that it finds is truly optimal. Remember that we identified
51, 030 possible configurations for our system and that we limited OptQuest to
testing 100 of these. It turns out that, in this case, it seems that OptQuest did
Remove Watermark Wondershare
PDFelement
Figure 9.25: SMORE plots for the top five scenarios from the OptQuest run of
Model 9-1.
Figure 9.26 shows the results from changing the upper limit on the Trauma
Room to 2 and running the Subset Selection Analysis function (by clicking
its icon on the Design ribbon). This function considers the replication results
for all scenarios and divides the scenarios into two groups: the “possible best”
group, consisting of the scenarios with responses shaded darker brown and whose
sample means are statistically indistinguishable from the best sample mean;
and the “rejects” group, consisting of the scenarios whose responses are shaded
lighter brown. Based on this initial experimentation of ten replications per
scenario, the scenarios in the “possible best” group warrant further study, while
those in the “rejects” group are statistically “worse” and do not need further
consideration (with respect to the given response). You should not interpret
the scenarios in the “possible best” group as having in some sense “proven”
themselves as “good” — it’s just that they have not (yet) been rejected. This
asymmetry is akin to classical hypothesis testing where failure to reject the null
hypothesis in no way connotes any sort of “proof” of its truth — we just don’t
have the evidence to reject it; on the other hand, rejecting the null hypothesis
implies fairly convincing evidence that it’s false. Note that if no scenarios in
your experiment are identified as “rejects,” it is likely that your experiment does
not include enough replications for the Subset Selection procedure to identify
statistically different groups. In this case, running additional replications should
Remove Watermark Wondershare
PDFelement
fix this problem (unless there actually are no differences between the scenarios).
Figure 9.26: Results for the initial OptQuest run (OptQuest1) after running
Subset Selection Analysis.
In our example, the dark-brown “possible best” group includes eleven feasible
scenarios (see Figure 9.26);Further down on the table, Scenario 090 has a dark-
brown-shaded response but is infeasible due to the red shading in the Satisfaction
column because this output was required in our problem formulation to be at
least 0.8. Clearly, the question at this point is “What now?” We have a choice
between two basic options: Declare that we have eleven “good” configurations,
or do additional experimentation. Assuming that we want to continue to try to
find the single best configuration (or at least a smaller number of possible-best
scenarios), we could run additional replications of just the eleven scenarios in the
current “possible best” group and re-run the Subset Selection Analysis to see if
we could identify a smaller “possible best” group (or, with some luck, the single
“best” scenario). We unselected the scenarios in the current “rejects” group
from the experiment and ran the remaining eleven scenarios for an additional
40 replications each (for a total of 50 replications each), and the resulting new
“possible best” group (not shown) contained only four feasible scenarios; note
that you must “Clear” the OptQuest add-in prior to running the additional
scenarios, by clicking on the Clear icon in the Add-ins section of the Ribbon.
As before, we can either declare that we have four “good” configurations, or do
additional experimentation. If we want to continue searching for the single “best”
configuration, we could repeat the previous process — delete the scenarios in the
most recent “rejects” group and run additional replications with the remaining
scenarios. Instead, we will use another Simio Add-in to assist in the process.
Remove Watermark Wondershare
PDFelement
The add-in Select Best Scenario using KN, based on~(Kim and Nelson, 2001)
by Kim and Nelson, is designed to identify the “best” scenario from a given
set of scenarios, as mentioned in Section 5.5. The add-in continues to run
additional replications of the candidate scenarios, one replication at a time, until
it either determines the “best” or exhausts the user-specified maximum number
of scenarios. To run the KN add-in, choose Select Best Scenario using KN
using the Select Add-In icon in the Design ribbon, just as we did when we used
OptQuest earlier (see Figure 9.19). This will expose some additional experiment
properties related to the add-in (see Figure 9.27).
Figure 9.27: Experiment properties after including the Select Best Scenario using
KN add-in.
In addition to the Confidence Level property (that specifies the level to use
for confidence intervals), you also specify the Indifference Zone and Replication
Limit. The Indifference Zone is the smallest “important” difference that
should be detected. For example, 21.65 and 21.68 are numerically different, but
the difference of 0.03 may be unimportant for the particular problem (clearly the
appropriate choice of an indifference-zone value depends on what the response
is measuring, and on the context of the study). An indifference zone of 0.10
would cause the add-in not to differentiate between these values during the
experimentation. While it might be tempting to declare a very small indifference
zone, in effect saying that you’re a demanding perfectionist and care about even
tiny suboptimalities, you should be aware that you’ll pay a potentially heavy price
for this in terms of large numbers of replications, and thus very long computing
times, required to achieve such high resolution (the amount of computing can
grow superlinearly as the indifference zone is squeezed down tighter). The
Replication Limit tells the add-in the maximum number of replications to run
before “giving up” on finding the best scenario (and declaring the remaining
scenarios “not statistically different”).
Figure 9.28 shows the experiment after running the add-in, which identified
Remove Watermark Wondershare
PDFelement
scenarios 037, 097, and 099 as the “best” configurations, per the checked box
in the leftmost column, after running these scenarios for 100 replications (the
KN procedure, not the user, determined these numbers of replications). If
the add-in terminates with multiple scenarios checked, it cannot differentiate
between the checked scenarios based on the maximum number of replications
(which we specified to be 100 in this example) and the Indifference Zone. Note
that this is the same scenario that had minimum average total cost after our
second OptQuest run (Figure 9.26), but the the total cost for Scenario 099 is
higher (23.759 here vs.~23.181 earlier) after running the additional replications.
A quick glance at the SMORE plots (not shown) shows a fairly small confidence
interval around our sample mean, indicating that the initial results from our
ten replications in the OptQuest experiment very likely resulted in a low value
for their sample mean. This illustrates the need to pay close attention to the
confidence intervals and run more replications where necessary before using the
experiment results to make decisions.
Figure 9.28: Experiment results after running the Select Best Scenario using KN
add-in.
1.5 and 2.5 minutes. When an employee takes an order, the shop’s computer
system prints a “customer ticket” that is placed near the cash register to wait
for the pizzas comprising the order. In our simplified system, individual pizzas
are made, cooked, and boxed for the customer. Employees do the making and
boxing tasks and a semi-automated oven cooks the pizzas.
The make station has room for employees to work on three pizzas at the same
time although each employee can only work on one pizza at a time. The times
to make a pizza are triangularly distributed with parameters 2, 3, and 4 minutes.
When an employee finishes making a pizza, the pizza is placed in the oven for
cooking. The cooking times are triangularly distributed with parameters 6, 8
and 10 minutes. The oven has room for eight pizzas to be cooking simultaneously.
When a pizza is finished cooking, the pizza is automatically moved out of the
oven into a queue where it awaits boxing (this is the “semi-automated” part of
the oven). The boxing station has room for up to three employees to work on
pizzas at the same time. As with the make process, each employee can only be
working on one pizza at a time. The boxing times are triangularly distributed
with parameters 0.5, 0.8, and 1 minutes (the employee also cuts the pizza before
boxing it). Once all of the pizzas for an order are ready, the order is considered
to be complete. Note that we could also model the customer pick-up process or
model a home delivery process, but we will leave this to the interested reader.
The pizza shop currently uses a pooled employee strategy for the order-taking,
pizza making, and pizza boxing processes. This means that all of the employees
are cross-trained and can perform any of the tasks. For the make and box
operations, employees need to be physically located at the respective stations to
perform the task. The shop has cordless phones and hand-held computers, so
employees can take orders from anywhere in the shop (i.e., there is no need for a
physical order-taking station).
Figure 9.29 shows the Facility view of the completed version of Model 9-2. Note
that we have defined Customer and Pizza entity types and have labeled the
entities using Floor Labels. The Floor Labels allow us to display model and
entity states on the labels. Floor Labels that are attached to entities will travel
with the entities.
To create a Floor label for an entity, simply select the entity, in the Facility view,
click on the Floor Label icon on the Symbols ribbon, and place the label by
clicking, dragging, and clicking on the Facility view where you would like the label.
This will create a label with default text including instructions for formatting
the label. Clicking on the Edit icon in the Appearance ribbon will bring up an
edit dialog box (see Figure 9.30) for the Pizza entity Floor label. Note the use
of the OrderNumber entity state set off by braces. As the model executes, this
place-holder will be replaced with the entity state value (the order number for
the specific pizza). The model also has a Source object (CustomerCall) and
Server objects for the order taking (TakeOrder), making (Make), and boxing
(Box) processes and the oven (PizzaOven). The model includes a Combiner
object (Register) for matching the Customer objects with the Pizza objects
Remove Watermark Wondershare
PDFelement
representing the pizzas in the order and a single Sink object where entities depart.
Finally, in addition to the Connector objects that facilitate the Customer and
Pizza entity flow, we add a Path loop between two Node objects (BasicNode1 and
BasicNode2) that will facilitate employee movement between the make station
and the box station. If you are following along, you should now place all of the
objects in your model so that the Facility view looks approximately like that in
Figure 9.29.
Figure 9.30: Edit dialog box for the Pizza entity Floor Label.
The CustomerCall Source object creates the customer calls based on the specific
customer arrival process described above (the Interarrival Time property is set
to Random.Exponential(5) minutes). Note that the model includes Customer
Remove Watermark Wondershare
PDFelement
and Pizza entity types so that Entity Type property for the Source object is set
to Customer. Customer calls are then sent to the TakeOrder Server object for
potential processing. Recall that if there are already four callers in the system,
the potential customer receives a busy signal and hangs up. We will model this
capacity limitation using an add-on process. Since we need to make a yes/no
decision before processing the customer order, we will use an add-on process
associated with the Input node for the TakeOrder object and will reject the
call if the call system is at capacity. We will use the Entered trigger so that
the process is executed when an entity enters the node. Figure 9.31 shows the
Input_TakeOrder_Entered add-on process.
Figure 9.31: Add-on process for the input node of the TakeOrder object.
Worker object will allow us to model workers that move and have an associated
physical location within the model. Below, we will define locations for the make
and box stations and will track the location of each of the employees. As such,
we set the Initial Desired Speed property to 1 meter per second, the Initial
Network to the WorkerNetwork, and the Initial Node (Home) to BasicNode2
(we defined the WorkerNetwork using BasicNode2 below the box station and
BasicNode1 below the make station along with the Path objects comprising
the loop that the Worker objects use to move between the two stations). Note
that we also used a referenced property (NumWorkers) for the Initial Number In
System property so that we can easily manipulate the number of workers during
experimentation. As we did in Model 9-1, we will use a Seize step to seize a
Worker1 resource in the Processing add-on process for the TakeOrder object
(see Figure 9.32). If a Worker1 resource is not available, the entity will wait
at the Seize step. Since the employee can take the order from anywhere in the
shop, we have no requirement to request the Worker1 object to actually move
anywhere, we simply need the resource to be allocated to the order taking task.
In the real pizza shop, this would be equivalent to the employee answering the
cordless phone and entering the order via the hand-held computer from wherever
she/he is in the shop. This will not be the case when we get to the Make and
Box stations below.
Once the Worker1 resource is allocated, the entity is delayed for the processing
time associated with actually taking the customer order. At this point, we need
to create the associated Pizza entities and send them to the make station and
send the Customer entity to wait for the completed Pizza entities to complete
the order. This is done in the TakeOrder_AfterProcessing add-on process (see
Remove Watermark Wondershare
PDFelement
Figure 9.34).
The first step in the process releases the Worker1 resource (since the call has
been processed by the time the process executes). The first Assign step makes
the following state assignments:
• HightestOrderNumber=HighestOrderNumber+1 — Increment the model
state HighestOrderNumber to reflect the arrival of the current order
• ModelEntity.OrderNumber=HighestOrderNumber — Assigns the current
order number to the Customer entity
• ModelEntity.NumberOrdered=Random.Discrete(1,.5,2,.8,3,.95,4,1)
— Determine the number of pizzas in this order and store the value in the
entity state NumberOrdered
• NumberOrdered[ModelEntity.NumberOrdered]= NumberOrdered[ModelEntity.NumberOrdered
— This assignment increments a model state that tracks the number of
orders at each size (number of pizzas in the order). Figure 9.35 shows the
properties for the NumberOrdered model state. Note that it is a vector
of size 4 – one state for each of the four potential order sizes. At any
point in simulation time, the values will be the numbers of orders taken at
each order size. Figure 9.36 shows the Status Pie chart along with the
properties and repeat group used for the chart.
The Create step creates the Pizza entity objects using the NumberOrdered state
to determine how many entities to create (see Figure 9.37 for the Create step prop-
erties). Leaving the Create step, the original entity will move to the SetNode step
and the newly created Pizza objects will move to the Assign step. The Set Node
step assigns the destination Node Name property to ParentInput@Register,
so that when the entity object leaves the TakeOrder object, it will be trans-
ferred to the Register object to wait for the Pizza entity objects that belong
to the order (the Customer object represents the “customer ticket” described
above). The Assign step assigns the ModelEntity.OrderNumber state the value
HighestOrderNumber. Recall that the Customer object entity state OrderNum-
ber was also assigned this value (see above). So the OrderNumber state can
be used to match-up the Customer object with the Pizza objects representing
pizzas in the customer order. The SetNode step for the newly created Pizza
entity objects sets the destination Node Name property to Input@Make so that
the objects will be transferred to the Make object. Finally, we have to tell Simio
where to put the newly created objects (the Create step simply creates the
objects in free space). The Transfer step will immediately transfer the object
to the node specified in the Node Name property (Output@TakeOrder, in this
case). So at this point, the Customer object will be sent to the register to wait
for Pizza objects, the Pizza objects will be sent to the make station and all of
the objects associated with the customer order can be identified and matched
using the OrderNumber respective entity states.
situation – 1 pizzas in in customer order 3, with the pizza boxed and waiting.
When the final Pizza object arrives to the Combiner object, it will be combined
with the other Pizza objects and the Customer object and the order will be
complete. When this happens, the Customer object will leave the Combiner
object and be transferred to the Sink object.
The Make Server object models the pizza making station. Since the make station
has room for three employees to be making pizzas simultaneously, we set the
Initial Capacity property to 3. We also set the Processing Time property to
Random.Triangular(2,3,4) minutes. Since the make process also requires an
employee, we will use the Processing add-on process to seize the Worker object
and the Processed add-on process to release the worker as we have done previously
with the TakeOrder object. The difference here is that the make process requires
that the employee be physically present at the make station in order to make the
pizza. As such, we need to request that the Worker object travel to BasicNode2
(the node in the WorkerNetwork designated for the make station). Luckily
we can make this request directly when we seize the Worker object. Figure
9.40 shows the Seizes property editor associated with the Seize step in the
Make_Processing add-on process. Here, in addition to specifying the Object
Name property (Worker1), we also set the Request Visit property to ToNode
and the Node Name property to BasicNode1 indicating that when we seize the
object, the object should be sent to the BasicNode1 node. When the add-on
process executes, the token will remain in the Seize step until the Worker object
arrives at BasicNode. Finally, we set the Box Server object up similarly (except
we set the Processing Time property to Random.Triangular(0.5,0.8,1) and
specify that the Worker object should visit BasicNode2).
So our model is now complete — if a phone line is available when a customer
call arrives, the first available employee takes the call and records the order. The
corresponding Customer Order entity then creates the Pizza entities associated
with the orders. The Customer Order entity is then sent to wait for the Pizza
Remove Watermark Wondershare
PDFelement
Figure 9.39: Combiner object with one parent and two member objects in queue.
Figure 9.40: Seizes property editor for the Seize step in the Make Processing
add-on process.
Remove Watermark Wondershare
PDFelement
orders that comprise the order and the Pizza entities are sent for processing at
the Make, Oven, and Box stations. Once all Pizza entities complete processing at
the Box station, the Customer Order and Pizza entities for an order are combined
and the order is complete. To support our experimentation, we used referenced
properties to specify the number of phone lines (NumLines) and number of
employees (NumWorkers).
• CustTIS - the time (in minutes) that customer orders spend in the system.
Defined as Customer.Population.TimeInSystem.Average*60;
• Oven Util - the oven’s scheduled utilization. Defined as \ PizzaOven.Capacity.ScheduledUtilization;
and
• RejectionsPerHr - customer rejections (due to phone line capacity) per
hour. Defined using the user-defined output statistic NumRejections. See
Figure 9.42 for the properties of NumRejections. Note that since an output
statistic is evaluated at the end of a replication, dividing the total number
of phone rejections (stored in the model state PhoneRejections) by the
current time (TimeNow) results in the desired metric.
As set up, our experiment evaluates scenarios containing between 1 and 5 phone
lines and between 1 and 3 workers (for a total of 15 scenarios). The scenarios
Remove Watermark Wondershare
PDFelement
Figure 9.42: User-defined output statistic for phone rejections per hour.
Figure 9.44: Control and response properties for the OptQuest experiment with
Model 9-2.
times are highly variable and/or where the stations are unreliable, adding buffer
capacity can improve the process throughput by reducing blocking and starving
in the station. The buffer allocation problem involves determining where buffers
should be placed and the capacities of the buffers. Model 9-3 will allow us to
solve the buffer allocation problem (or, more specifically, will provide throughput
analysis that can be used to solve the buffer allocation problem). A more detailed
description of serial production lines and their analysis can be found in (Askin
and Standridge, 1993), but our brief description is sufficient for our needs.
Our goal for Model 9-3 is to be able to estimate the line’s maximum throughput
for a given buffer configuration (the set of the sizes of buffers between the stations).
Throughput in this context is defined as the number of items produced per
unit time. For simplicity, our model will consider the case where stations are
identical (i.e., the distributions of processing times are the same) and the buffers
between adjacent stations are all the same size so that the buffer configuration
is defined by a single number — the capacity of all of the buffers. Model 9-3 can
be used to replicate the analysis originally presented in (Conway et al., 1988)
and described in (Askin and Standridge, 1993). Figure 9.46 shows the Facility
view of Model 9-3.
From the Facility view, Model 9-3 looks much like Model 5-1 with three additional
stations added between the Source and Sink objects. There are, however some
subtle differences required to model our fixed-capacity buffer assembly line. We
will discuss these changes in the following paragraphs. In addition, we will also
demonstrate the use of referenced properties and the Simio Response Charts as
tools for experimentation and scenario comparison.
By default, when we connect two Server objects with a Connector or Path object,
entities are automatically transferred from the output node of one station to the
input node of the next station once processing is complete at the first station. If
the second station is busy, the transferred entity waits in a queue. When the
second server is available it removes the first entity waiting in the queue and
begins processing. This essentially models an infinite capacity buffer between two
stations and does not model the blocking effect associated with finite-capacity
buffers. Consider the simple case where we have a zero-capacity buffer (e.g., no
buffer) between two stations that we model as resources. What we need instead
of the default behavior is to ensure that the subsequent resource has available
capacity before we release the current resource (i.e., making sure that the entity
has somewhere to go before it starts going). This is described as overlapping
Remove Watermark Wondershare
PDFelement
Figure 9.50: Response chart for exponentially distributed processing times for
Model 9-3.
feature to track the states of the four servers in our serial line (see Figure 9.51).
Figure 9.51: Server state status pie charts for Model 9-3.
The Status Pie charts show the percentage of time that the given server was
in the respective states. Figure 9.52 shows the properties for the Status Pie
charts for Server1 and Server3. In both charts, the Data Type property is set to
ListState and the List State property points to the server’s ResourceState.
The difference between the two charts is that the Server3 chart is attached to
Server3 and so the List State property value does not need to reference Server3
whereas the Server1 chart is not attached to the server and so the property must
explicitly reference the server object (Server1.ResourceState). In addition,
since the Server3 chart is attached to the Server object, the chart will “move”
with the Server object in the Facility view. Notice that the first server in the line
is never starved and the last server is never blocked. This is exactly as we would
expect in a model designed for assessing maximum throughput. Comparing the
second and third stations, the second station has more blocking and the third
station has more starving. If we had a longer line, this pattern would continue —
stations nearer the start of the line experience more blocking and stations near
the end of the line experience more starving.
Remove Watermark Wondershare
PDFelement
Figure 9.52: Properties for the Status Pie Charts for Server1 (left) and Server3
(right).
Figure 9.53: Response chart for triangularly distributed processing times for
Model 9-3.
9.4 Summary
In this chapter we’ve looked at Simio models of three systems — each involving
one or more advanced simulation concepts. In addition to the modeling aspects,
we also focused on the experimentation with each of these models and introduced
the OptQuest simulation-based optimization add-in. Once the user defines
the appropriate objective, constraints, and requirements, OptQuest “drives”
Remove Watermark Wondershare
PDFelement
9.5 Problems
1. Modify Model 9-1 so that it includes the patient physical movement and
Nurse/Aide escort functionality from Model 8-3. Compare the resource
requirements with those of Model 9-1. Does including this level of detail
“improve” the validity of the results? If so, why? If not, why not?
2. Modify Model 9-1 to support preemption of the Doctor resource for Urgent
patients. In particular, if all doctors are busy when an Urgent patient
arrives, the Urgent patient should preempt a doctor from one of the other
non-Urgent patients. Compare the results of the models. Would you advise
that the emergency department make the corresponding change in the real
system?
3. In Model 9-2, we used a 1000 hour run length with no warm-up period
(and gave no explanation for these settings). Do they appear reasonable?
Why or why not? Could you achieve the same results with a shorter run
length? Would a longer run length improve the results?
4. In Section 9.2.1 we experimented with model 9-2 (manually and with Op-
tQuest), but we did not use the Subset Selection Analysis function and/or
Select Best Scenario using KN add-in to identify the “best” configuration(s)
from the identified set. Do this and make any necessary adjustments to
the numbers of replications required to identify the “best” configuration.
5. Many pizza take-out places around these days also deliver. Modify Model
9-2 to support the delivery of customer orders. Assume that 90% of
customers would like their pizzas delivered (the remaining 10% will pick
them up as we assumed in Model 9-2). The pizza shop has divided the
customer delivery area into four zones and a delivery person can take
multiple orders on the same delivery trip if the orders come from the same
2 Note that the ranking-and-selection process that we’ve described will work with any set of
scenarios regardless of how they were identified — there is no requirement that the scenarios
be generated by OptQuest.
Remove Watermark Wondershare
PDFelement
zone. Table 9.3 gives the delivery time distributions for each zone and
the proportion of customers from each zone. For simplicity, if a delivery
includes more than one order, simply add 4 minutes to the sampled delivery
time for each extra order. For example, if a delivery includes 3 orders
and the originally sampled delivery time is 8 minutes, you would use
8 + 4 + 4 = 12 minutes for the total delivery time instead. For customer
arrivals, processing times, and worker characteristics, use the same data as
was given for Model 9-2. Develop an experiment to determine how many
delivery people should be hired. Be sure to justify your solution (i.e., how
you decided the appropriate number of delivery people).
6. Modify the model from Problem 3 so that delivery people wait until there
are at least 2 orders waiting to be delivered to a given zone before they
start a delivery. Compare the results to the previous model. Is this a good
strategy? What about requiring at least 3 orders?
7. Consider a six-station serial manufacturing line similar to the assembly line
in Model 9-3. As with Model 9-3, there are finite-capacity buffers between
each pair of stations (assume that the first station is never starved and
the last station is never blocked). The difference in the current system
is that the stations are not identical in terms of the processing time
distributions and some are subject to random failures. The processing
time distributions and failure data are given in Table 9.4 (note that the
Lognormal distribution parameters (4, 3) for Station 5 are the mean and
standard deviation of the generated random variates while the arguments
for the Random.Lognormal() function are the mean and standard deviation
of the underlying normal random variates – see the Simio Help for details
about the required conversion). Develop a Simio model of the serial line
and create an experiment that will find a “good” allocation of 30 buffer
slots. For example, one allocation would be [6, 6, 6, 6, 6] (6 slots between
each pair of stations). The objective is to maximize the line throughput.
Does your experiment find the guaranteed optimal buffer allocation? If so,
why? If not, why not?
8. Modify Model 9-3 to use the On Event Arrival Mode property for the
Source object to create new entities for the first station rather than using
the add-on process associated with the Server1 object as described in
Section 9.3.
9. In the OptQuest-based experiment described in Section 9.2.1, we minimized
the customer time in system subject to a service level constraint. However,
we didn’t consider staffing costs. As an alternative, develop a single “total
cost” metric that incorporates customer waiting time, worker costs, and
customer service. Add the total cost metric as an output statistic and use
OptQuest to find the optimal configuration(s).
10. Model 9-2 uses a pooled employee strategy for taking orders, making pizzas
and boxing pizzas. Develop a model that uses a dedicated employee strategy
(i.e., each employee is dedicated to a task) and compare the results with
those of Model 9-2. Under what conditions is one strategy preferred over
the other? Justify your answer with experimentation.
Remove Watermark Wondershare
PDFelement
Chapter 10
Miscellaneous Modeling
Topics
The goal of this chapter is to discuss several modeling concepts and related Simio
features that will enhance your modeling skills. The sections in this chapter
will generally stand on their own — there is no “central theme” that should
be followed from beginning to end and you can pick and choose the sections to
cover and the sequence based on your modeling needs.
407
Remove Watermark Wondershare
PDFelement
The queue state labeled Holding Station is associated with a Station Element
defined in the model (see Figure 10.2).
The queue in the Facility View is placed using the Detached Queue button from
the Animation ribbon (the queue state name is HoldingStation.Contents).
Entities are transferred from the Source1 object to the station using the
CreatedEntity add-on process trigger (see Figure 10.3).
Process1 uses the End Transfer step to finalize the transfer of the entity. Note
that this process is triggered by the event HoldingStation.Entered which is
automatically fired when an entity enters the station.
With the logic described so far, created entities would be transferred directly
to the holding station where they would remain indefinitely (until the end of
the simulation run). Since we want to periodically pull the entities out of the
holding station and process them, we will use a process triggered by a timer to
search the holding queue and transfer any entities to the input node of ProcessA
for processing. Figure 10.4 shows this process (PullEntities). In the Search
step, we set the Collection Type to QueueState, the Queue State Name to
HoldingStation.Contents, and the Limit to Infinity. With these property
settings, the Search step will search the HoldingStation queue for all entities.
Remove Watermark Wondershare
PDFelement
Figure 10.3: The two processes associated with transferring entities from ‘Source1‘
to ‘HoldingStation‘.
Each found entity is then transferred to the input node of the ProcessA object.
Note also that the process is triggered by the timer event (Timer1.Event – see
Figure 10.2 for the timer definion). While this simple example uses a timer to
periodically pull entities from the station, the same search logic could be used
with many other pull or push mechanisms.
Figure 10.4: Process for searching the holding queue and transferring the entities
to ‘ProcessA‘.
The combiner (Combiner1) object batches one type A entity with five type B
entities. Hence, we would like for the processing time for the batch at Server1
to be the sum of the five values assigned to the type B entities prior to batching.
We use the Processing add-on process trigger with Combiner1 so that the batch
will be formed before the associated process is executed. Figure 10.6 shows the
process. Here we use the Search step to find all entities in the batch queue
(ModelEntity.BatchMembers) and sum the values of the expression specified
in the Search Expression property (Candidate.ModelEntity.ProcessTime).
This will sum the values of the specified expression and store the sum in the
token return value. We can then assign this sum (Token.ReturnValue) to the
ProcessTime state of the batch in the subsequent Assign step and use this state
for the Processing Time property in Server1. As a result, the individual batch
components of type B will each have a sampled process time and the batch will
have the sum of these times as its process time.
Figure 10.6: Add-on process for summing the process times in Model 10-2.
Before we leave discussion of the Search step, a warning is in order. The Search
step is very powerful and can do many things, but there is a downside - the
potential for overuse. Say, for example, that you have a table of 10,000 rows
or a collection of 10,000 entities that you perhaps want to search at every time
advance to determine the next appropriate action. While Simio can do this
Remove Watermark Wondershare
PDFelement
for you easily, you might notice that your execution speed becomes noticeably
slower. Overuse of searches is a common cause of execution speed problems.
The reneging behavior is specified by the Renege Triggers property group (see Fig-
Remove Watermark Wondershare
PDFelement
ure 10.8. Here we specify that after waiting for 3 minutes, the entity should renege
with probability 0.5. Those entities that do renege are sent to Input@Reneges
(the input node to the sink). The entities that “fail” the probability test will
simply remain in the queue.
While the balking and reneging behaviors in Model 10-3 are quite basic, similar
methods can be used to develop quite complex (and comprehensive) balking,
reneging, and jockeying behavior in models. As with most other Simio-specific
topics, there are several SimBit Solutions that demonstrate the use of balking
and reneging, including:
• BalkingOnSourceBlockingOnServer - Simple balking on a source with no
buffer space.
• ChangingQueuesWhenServerFails - Entities waiting at one server change
to another server when their server fails.
• ServerQueueWithBalkingAndReneging - Entities have individual number
in line tolerances which causes balking as well as individual waiting time
tolerances which cause them to renege IF they are not close (within their
personal stay zone) to being served.
• MultiServerSystemWithJockeying - Whenever another line becomes shorter
than the one entity is waiting in, it will move (jockey) to a shorter line.
Figure 10.9: Task Sequences repeat group for Model 10-4 (Initial).
If you go to the server and reopen the Task Sequences repeat group, you will
note a Resource Requirements section that is similar to the previously resource
specifications. Change both tasks (the first is illustrated in Figure 10.10 so that
you request the appropriate worker and have him come to the WorkPlace node
to do the work. Now when you run the model, you should see the Prepper
approach from the left to do the Prepare task and then immediately see the
Painter approach from the right to do the Paint task.
Every task also has a Branch Type that helps determine under what circum-
stances the task should be done. In our above example, we used the default of
Always, indicating, as the name implies that we will always do both of those
tasks. But other choices include Conditional, Probabilistic, and Independent
Probabilistic. For example, we might have specified the Probabilistic branch type
on Preparation if that task only needed to be done, say 45% of the time. Note
that at the beginning of this paragraph we used the phrase “helps determine” if
the task should be done. Another consideration on whether a task should be done
is based on if its previous task was cancelled (e.g., if Preparation isn’t needed,
should I still do Paint anyway?). The Auto Cancel Trigger property defaults
to cancelling the task if All Immediate Predecessors Cancelled, but can
also let the task proceed if you choose None for the action.
When you have more than one task, you must specify in what order to process
them. In our model above, we just specified sequential task numbers (e.g., 10
and 20). For relative simple sequences, this is probably the easiest way. If you
refer back to the server, you will see an Other Task Sequence Options grouping
which contains a Task Precedence Method property. In addition to the Sequence
Remove Watermark Wondershare
PDFelement
Figure 10.10: Task Sequences repeat group for Model 10-4 (Final).
Remove Watermark Wondershare
PDFelement
Number Method which we already used, you can also choose from Immediate
Successor and Immediate Predecessor. These latter two options often are
much easier to use to create complex sequence diagrams like Figure 10.11.
Recall that when we introduced the server, we skipped over the Process Type
property and just used Specific Time, until we thought you were ready to learn
about Task Sequences. Well, we’ve done it again. Each task in the sequence has
a Process Type that we skipped over until now. We are still not going to cover
the details here, but it is worth mentioning that a task is not limited to a simple
processing time. You can also select Process Name to execute a process of any
length; Submodel to send an entity clone to a submodel (e.g., a set of objects)
and wait for it to complete; or Sequence Dependent Setup to automatically
calculate processing time based on data specified in a Changeover Logic element.
One final note on task sequences . . . in some applications there are many,
perhaps hundreds, of tasks completed at a single station. For example, when
you are assembling an airplane, the plane might move to position one and have
dozens of crews execute hundreds of tasks over several days, then the plane moves
to position two for more work. Manually entering that into a task sequences
like we have illustrated above would be tedious. Many such models are data
driven as described in Section 7.7 The Other Task Sequence Options in the
server properties contains some additional options to support data driven task
sequences. We suggest reviewing the following models for more information:
With all of those combinations, you might begin to realize that you can make
a lot of dynamic decisions based on using properties in the Standard Library
objects and the automatic events they generate. But before we demonstrate
that, let’s go one level deeper. In addition to all these automatic events, you can
define your own events and trigger them in very flexible ways using elements
and steps. Elements and steps trigger and respond to events in a similar fashion
to the Standard Library, but you have even more flexibility and control. And
we can even define our own user-defined events on the Events window of the
Definitions tab. Let’s examine some ways we can trigger, or “fire” our own
events:
• Station element - used to define a capacity constrained location for holding
entities representing discrete items. Generates Entered, Exited, and
CapacityChanged events.
• Timer element- fires a stream of events according to a specified IntervalType.
Generates event named Event each time the timer matures. The timer
can also respond to external events to trigger future timer events or reset
the timer.
• Monitor element - used to detect a discrete value change or threshold
crossing of a specified state variable or group of state variables. Generates
event named Event each time the monitor detects a monitored state change.
• Fire step - used to fire a user-defined event.
As we discussed above, many Standard Library objects have properties that
allow them to act when an event is received. But we are not limited to those
predefined reactions – we can define our own reactions. The two common ways
of doing this are using the Wait step inside a process or triggering the Process
itself.
So far all the processes we have used have been started or triggered automatically
by Simio (e.g., OnRunInitialized) or by the object they are defined in (e.g., an
Add-On Process). But another very useful way of triggering the start of a
process is by using the property named Triggering Event Name to subscribe
to a specific event. As the name implies, when the specified event is received,
this process will start and a token is created which starts executing the triggered
process (note that if a Triggering Event Condition is specified, then it must
evaluate to True before the process is started). The Subscribe step allows you to
dynamically make the same sort of relationship – typically with a specific entity.
And you can dynamically cancel that relationship using the Unsubscribe step.
Another, even finer way of reacting to an event is using the Wait step. In this
case, the step is inactive (e.g., it ignores all events) until a token executes the
Wait step. That token will then “wait” in the Wait step until one or more 1 of
1 Although the common case is that Wait specifies only a single event, you can specify
multiple events and the option of whether to wait on just one or all of the events to occur
before the token is released.
Remove Watermark Wondershare
PDFelement
the specified events has occurred. This is commonly used to force a token (and
possibly its associated object) to wait at a certain point in the model until a
condition has occurred. For example, you might have all priority 2 parts wait at
a node, perhaps on a conveyor, until all the priority 1 parts, perhaps on another
conveyor, have been completed. The last priority 1 part might Fire an “AllDone”
event that the priority 2 parts are waiting on.
While there are many simple applications of Wait and Fire, an interesting and
fairly common application is the coordination or synchronization of two entities,
when either entity could arrive to the coordination point first. For example
perhaps we have a patient waiting to proceed to imaging (e.g., an MRI) but he
cannot proceed until his insurance paperwork is approved. But the insurance
paperwork cannot continue until the patient is prepared and ready to enter the
MRI. It’s easy to consider having PatientReady and PaperworkReady events
where each entity waits for the other. But if you don’t know which entity will
arrive first that presents the problem of prematurely firing an event, before the
other entity is waiting for it. The solution is to use a state variable to indicate
the presence or ready state of either object, a Decide step to check that state,
and then either Fire or Wait on the other entity. We will leave this to you to
explore the details in the homework problems. One final note in this section is
to consider alternatives to event-based logic. While the event-based approaches
are generally very efficient, sometimes you need additional flexibility.
• The Scan step may be used to hold a process token at a step until a specified
condition is true. When a token arrives at a Scan step, the scan condition
is evaluated. If the condition is true, then the token is permitted to exit
the step without delay. Otherwise, the token is held at the Scan step until
the condition is detected to be true. While monitoring the value of any
expression offers considerable flexibility, it comes with two caveats. The
condition is only checked at time advances, so it is possible that momentary
(e.g., time zero) conditions can be missed and in fact, the condition itself
will not be recognized until a time advance. The second caveat is that
monitoring an expression is slower than an event-based approach — in
most models this will not be noticeable, but in some models it could cause
a slower execution speed.
• The Search step discussed earlier in this chapter can often be used as a
companion to event-based logic. For example when an event of potential
interest is triggered, you might search a set of candidates to determine
appropriate action (if any).
particular the Flow Library and the Extras Library that are supplied by Simio.
And going beyond that, the Shared Items user forum has many interesting items
contributed by other users.
While a few other simulation products also have flow capability, Simio’s capability
is comprehensive. And unlike most products, Simio’s flow and discrete modeling
integrate seamlessly in a single model. You can see one indication of this by
examining the physical characteristics of any entity – you will find that in
addition to having a 3 dimensional physical size (e.g., a volume) discrete entities
also have a density. This dual representation of an entity as either a discrete item
(e.g., a barrel or a pile) or as a quantity of fluid or other mass (e.g., 100 liters of
oil or 100 tons of coal) allows a discrete entity to arrive to a flow construct and
start converting its volume to or from flow. It also allows assigning and tracking
the attributes of entities representing material flow on a link or in a tank – for
each component of a flow you can track attributes like product type, routing
destination, and composition data. The Flow library includes the following
objects:
up and down to the appropriate shelf height when placing and removing
entities onto and off of a shelf. In addition to the normal vehicle properties,
it has two additional properties that specify the vertical lift speed and the
lift travel height.
• Elevator - The Elevator is a transporter that moves up and down in the
vertical direction and picks up and drops off entities at its associated
Elevator Nodes.
• ElevatorNode - Each Elevator Node represents a destination for a specific
elevator and references its associated Elevator.
There are several SimBits that demonstrate the use of the Extras Library
objects – to find them, simply open the Support Ribbon, click on Sample
SimBitSolutions, and enter Extras Library in the search box. There is also
an example model (EngineRepairUsingExtrasLibrary) that demonstrates the
use of the library.
10.6 Experimentation
Let’s return to the topic of experimentation that we introduced in Section 4.2.3.
By now, you can fully appreciate the value of running multiple replications to
get a statistically valid answer and the value of running multiple scenarios in a
search for the best solution. And in Chapter 9 we studied how OptQuest can
help us find the best alternative from a large number of scenarios. Unfortunately
one aspect these all have in common is the need to run many replications. If your
replications require 1 second each and you need 100 replications, getting your
results in less than 2 minutes isn’t too bad. But we recently had an application
that required at least 5 replications for each of 500 scenarios for each of 9
experiments. At about 2.5 minutes per replication this called for over 900 hours
of processor time. Waiting over a month for the runs to process sequentially
is probably unacceptable. While this is a particularly large problem, large real
projects often encounter similar situations. In this section we will discuss how
to deal with such high processing demand.
If you have access to a server farm or many computers in your local network,
Simio also licenses the ability to do any number of concurrent replications. So,
for example if you license the ability to run an extra 100 processors (bringing
your total to 116) then you might generate results to that 900 hour problem in
less than 8 hours.
built-in rules in many locations. One example is the list of standard dispatching
rules in the Transfer nodes (See Figure 10.12). In addition to the built-in rules
users can create custom rules with process logic, or advanced users might use
the add-in structure to create new rules in .NET and add them to Simio. Such
rule-based models are a type of rule-based AI.
Figure 10.12: Example of some of the dispatching rules built into Simio Transfer
nodes.
Defining the custom logic for rules can be difficult. Consider selecting between
two lines in a factory, where each line consists of a dozen workstations in
sequence, and we would like to select the line that can complete the job the
soonest (i.e., smallest make span). Factors that influence make span include
status of downstream workstations, where the amount and type of work at each
workstation impacts the completion time. The downstream workstations along
each line might have sequence dependent setup times as well as work in progress,
all impacting the decision regarding which line can complete the job the soonest.
Knowing how to consider all these factors and construct the rule to select the
best line is difficult. We will next discuss a component of AI that can help.
tions. In simple terms, a neural network maps a set of numeric inputs into a set
of one or more outputs. In its most basic form, we have a single node called a
Perceptron (also called a neuron), with a set of inputs, X’s, a weight w assigned
to each input, a bias assigned to the node, an activation function, F (), on the
node, and a single output, Y , that is computed from the inputs, weights, bias,
and activation function. The output is a predicted value that the Perceptron
is making based on the current set of inputs. Figure 10.13 shows a Perceptron
with three inputs.
network and provide the core non-linear data manipulation to get the desired
predicted values. A network with at least two hidden layers is referred to as a
Deep Neural Network (DNN).
The output layer provides the final predicted values. If we are using the neural
network for regression (i.e., predict a single value) then there is only one output
node. However, often the output neurons each represent an object (e.g., an
image to be classified as a dog, cat, horse, or cow), and the predicted value for
each neuron is the probability that it is the object.
There have been many recent successful applications of DNN’s. Examples include
Apple Siri for recognizing and responding to voice request, and image processing
in Tesla self-driving cars. However, one of the big challenges in the application of
DNN’s is having sufficient high-quality training data to train the DNN. This is
where the merger of simulation and AI shows great promise since a high-fidelity
simulation model can generate unlimited amounts of synthetic training data for
the DNN.
Let us now return to our previous example of using a DNN to select between
two candidate production lines and discuss the problem of training our DNN
based on simulation generated data. In this example we use our DNN to predict
the make span for each candidate production line and select the line with the
smallest make span. At the time we make this selection we record the DNN
input values that were used to predict the make span. Within our model the
entity continues down the selected production line, and then at the end of the
line we tally the actual make span. The DNN input values and the model-based
actual value are then saved off as training data for our DNN.
Model generated synthetic training data is the key to unlocking the concept of
self-trained DNN’s for decision logic within a simulation model. However, the
process of saving off the DNN input values, matching them up with the recorded
Remove Watermark Wondershare
PDFelement
actual value, and then writing these values off as training data can be tedious.
For that reason, the recent focus for incorporating neural networks in Simio has
been on automating the recording of training data and its use in self-training
Simio models.
As of this writing, you can use the techniques discussed above to add AI
components to your models now, but it does require significant knowledge to do
so. Simio expects that features will be added in late 2021 to make this much
easier to do.
10.8 Summary
We started this chapter by discussing the Search step, a powerful mechanism
for selecting from sets of objects or table items. Then we discussed Balking
and Reneging, to make it easy to bypass, or remove an entity from processing
at a station. Then we introduced the concept of Task Sequences which lets
you implement very flexible parallel or serial sub-tasks in a Server-type object.
The discussion of event-based decision logic provides yet another set of tools for
controlling the processing logic.
We also briefly explored the Flow and Extras libraries that are provided by Simio
to cover many more areas that cannot be easily modeled with the Standard
Library. And we looked at the Shared Items forum for some useful user-provided
objects and tools. After exploring some important considerations when doing
experimentation, we briefly explored the emerging area of combining AI and
Neural Networks with simulation. In Chapter 11 we will discuss how you can
create your own custom rules, objects, and libraries.
10.9 Problems
1. Create a CONWIP (CONstant Work In Process) system of 3 sequential
servers each with capacity 2, with all times and buffer capacities at their
default values. We want to limit WIP to a constant value of 8 – we don’t
care where the 8 entities are in the system, but there should always be
exactly 8. Illustrate the desired behavior with statistics that show the
average and maximum number of entities in the system.
2. Consider the system illustrated in Figure 10.15. Entities enter at each
source with an interarrival time of exponential 2.5 minutes. Entities take a
uniform distribution between 1 and 3 minutes to travel to BasicNode1 and
exponential 1 minute to travel to BasicNode2. Each entity takes exactly 1
minute to travel from its respective basic node to the combiner. Entities
should arrive at the combiner completely synchronized so they never wait
at the combiner (where each parent is combined with any single member).
Add process logic for the basic nodes using events to force the lead entity
to wait for the trailing entity.
Remove Watermark Wondershare
PDFelement
3. Enhance problem 2 so that every entity has an order number and each
source creates entities with sequential order numbers starting at 1. We
now want to combine only like order numbers, so we must now synchronize
entities with identical order numbers at the basic nodes and only release
pairs together.
4. Consider a manufacturing system illustrated in Figure 10.16 where parts
arrive to Receiving approximately 8 minutes apart, are moved by an
overhead crane to Grinding, which requires 3-7 minutes. After leaving
Grinding, 80% of the time it is moved by crane to shipping, the other 20%
of the time it moves by crane to Rework. Parts leaving Rework always
return by crane to Grinding. The single overhead crane normally parks
near Receiving when idle. It has a load and unload time of 1.0 minute,
and a lateral movement speed of 1.0 meters per second. Run the model for
five 24-hour days and determine the expected utilization of the crane and
the machines.
Chapter 11
You may be able to solve many of your simulation problems using the Simio
Personal Edition which is limited to using only the Simio Standard Library. Or
you can solve many problems by supplementing with the add-on processes that
are available in the Simio Design Edition and above. But in some cases you may
need or want more capability than is offered by that approach. For example:
• You may find that you need more object customization than is easily
available using add-on processes.
• You might make repeated use of the same object enhancements and prefer
to create your own reusable objects.
• You might have a team of more advanced modelers who support the use of
simulation by occasional, less skilled users who merit their own customized
tool.
• You may desire to build commercial libraries that you market and sell to
others.
All of these may be accomplished by creating custom Simio objects and libraries.
If you have read the initial 9 chapters and worked along with the examples, you
actually know most of what you need to know in order to define custom objects
– the first part of this chapter will bring together concepts you already know and
fill in a few missing concepts. Even though custom objects are quite flexible and
powerful, a few motivated modelers may desire to go beyond what can be done
with objects. Simio also provides additional capabilities for more advanced users.
If you have some programming background (like Visual Basic, C++, C#, or any
.NET language), you can:
• Write your own design-time add-ons for example to automatically build a
model from external data.
431
Remove Watermark Wondershare
PDFelement
• Add new dynamic selection rules to those already available within Simio,
for example a comprehensive work selection rule for a Vehicle, Worker, or
Server.
• Add custom routines for importing and exporting tables.
• Add custom algorithms for designing (e.g., setting up or analyzing scenarios)
or running (e.g., optimizing) experiments.
• Add custom Steps and Elements to extend the capabilities of the Simio
engine.
• Customize the Simio ribbons to make it easier for a specific application or
even make it look like a totally different product.
An overview of these capabilities is provided near the end of this chapter. Some
of the material in this chapter has been adapted from Introduction to Simio
(Pegden and Sturrock, 2013) (the e-book included with the Simio software) and
used with permission.
are used to define the current state of the object. Anything that can change
during the execution of the simulation is represented in the object as a state.
Events are logical occurrences at an instant in time such as an entity entering
a station or departing a node. Objects may define and fire their own events
to notify other objects that something of interest has happened. The External
View is a graphical representation for instances of the object. The external view
is what someone sees when they place the object in their model. The Logic for
the object is simply a model that defines how the object reacts to events. The
logic gives the object its behavior. This logic can be built hierarchically using
existing objects, or can be defined with graphical process flows.
The external view is what a user sees when they place an instance of the object
in their model. The graphics for the external view can be composed of symbols
from the symbol library or downloaded from Trimble 3D Warehouse, as well
as static graphics drawn using the drawing tools on the Drawing ribbon. In
addition the view may contain attached animation components that are placed
Remove Watermark Wondershare
PDFelement
into the view from the Animation window. These animation components include
animated queues, status labels, plots, pie charts, linear/circular gauges, and
buttons. Note that in the case of dynamic objects (i.e. entities) these animated
objects are carried by each dynamic object in the system. For example an entity
could carry a status label showing the value of one of its states, or a button
that when clicked by the user causes some action to take place (as illustrated in
Model 9-2).
When you build a new fixed object you typically provide associated input/output
nodes for the object so that dynamic entities may enter and/or leave your fixed
object. For example a Server object has associated node objects for input and
output. The characteristics of these associated objects are also defined in the
external view of the object by placing external node symbols in the external view
using the Drawing ribbon. Note that these are not node objects but symbols
identifying the location where associated node objects will be created when this
object is placed.
When you place a node symbol in the external view you must also define its
properties. The Node Class specifies the type of node that should be created.
The drop list will give you a choice from all available node definitions which will
include Node (empty model), BasicNode (simple intersection), and TransferNode
(intersection with support for setting destination and selecting transporters on
which entities will ride), as well as any other node definitions that you have loaded
as libraries or are defined in your project. In the case of the Standard Library the
BasicNode class is always used for input nodes and the TransferNode is used for
output nodes. The Input Logic Type specifies how arriving entities attempting
to enter this object are to be handled by this object. The None option specifies
that entities are not permitted to enter the object. The ProcessStation option
specifies that the arriving entity may enter at a specified station, which fires
a station-entered event that can be used to trigger process logic. This is used
when defining the object logic using a process model. The FacilityNode option
specifies that the arriving entity is to be sent to a node inside the facility model
for the object. This option is used for defining object logic using a facility model.
In the General section the Name for the node symbol is specified. This node
symbol name is used to create the name of the associated node object that is
created at this symbol location when this object is instantiated using the format
NodeSymbolName@ObjectName. For example if the symbol name is Input and
the object name is Lathe, the associated object that is automatically created
is named Input@Lathe. In the Standard Library the input node symbols are
named Input and output node symbols are named Output.
object definition is updated, then the sub-classed object will inherit the new
behavior. However after sub-classing you can then hide or rename the inherited
properties, selectively override portions of the process logic that is inherited,
or add additional processes to extend the behavior. For example you might
create a new object definition named MRI that is sub-classed from Server and
incorporated into a library for modeling health care systems. You might hide
some of the normal Server properties (e.g., Capacity Type), and rename others
(e.g., rename Process Time to Treatment Time). You might also replace the
normal internal process that models a failure by a new process that models the
failure pattern for an MRI, while continuing to inherit the other processes from
the Server.
To sub-class an object definition, select the Project in the navigation window,
and then select the Models panel. The Edit ribbon (Figure 11.3) lets you add a
new blank model, create a sub-class of the selected model, or create a sub-class
from an object definition from a library. You can also sub-class a library object
using the right-click menu on the library object definition from within the Facility
window.
There are actually three ways to create new objects based on Library Objects:
• SubClass From Library subclasses (derives) an object from the library
object as described above. Changing the original will change the behavior
of the sub-classed object since it inherits process logic from its base object
definition
• Copy From Library for Edit creates a copy of the object without sub-
Remove Watermark Wondershare
PDFelement
classing. The newly created object definition is a copy of the library object,
but does not maintain an inherited relationship; hence if the original object
definition is changed the copy is not affected.
• Clone From Library creates an object that is identical to the original
(from Simio’s standpoint actually indistinguishable from the original). This
should be used when you want to rearrange how models are organized in
different libraries.
You can also protect an object definition with a password. In this case the
password is required to view or change the internal model for the object.
The model properties include the Model Name, Object Type (fixed, link, node,
entity, or transporter), Parent Class (from which this object was sub-classed),
Icon for displaying the model, along with the Author, Version number, and
Description. The properties also include Resource Object for specifying if the
object can be seized and released as a resource, and Runnable to specify if the
object can be run as a model or only used as a sub-model within other models.
In the case of an inherited property you can change the Visible flag along with
the Default Value, Display Name, Description, and Category. Hence you can hide
properties or change their general appearance. Although you can add additional
states and events to a model you cannot rename or hide inherited states and
events.
Remove Watermark Wondershare
PDFelement
• In the Properties panel of the Definitions window add two new Stan-
dard Properties of type Expression. Name them ProcessTimeOne and
ProcessTimeTwo, and set their Default Value, UnitType/Default Units,
Display Name, and Category Name as shown in Figure 11.5.
• Expand the inherited properties. Since the inherited properties named
CapacityType, WorkSchedule, and InitialCapacity are not relevant for
our TandemServer object, set the Visible characteristic in the General
category to False to hide each of these as shown in Figure 11.6.
Note that in our external view we are sending entities arriving to the associated
node that is created by the Input node symbol to the node named Input@Server1
in our facility model of the TandemServer. Here they will proceed through the
two Servers until they reach the output node of Server2, where we want to send
them back up to the associated node defined by the external node symbol named
Output. To inform Simio about the external output node, return to the Facility
window for TandemServer and right-click on the output node for Server2. From
the drop-down menu choose Bind to New External Output Node and specify
the External Node Name as Output. This will cause the departing entities to be
sent out from the associated output node that is created for the Output.
We will also edit the Processing Time for Server1 to be ProcessTimeOne and the
Remove Watermark Wondershare
PDFelement
objects, using this feature is often much simpler because it creates some framework for you
automatically. So you can better understand how that framework is created, we are not using
Processor in this example.
Remove Watermark Wondershare
PDFelement
that we will be using. While still in the Definitions window, click on the Elements
panel and add three station elements. Name them InputBuffer, Processing,
and OutputBuffer. Use Specify the Initial Capacity for the InputBuffer sta-
tion as the property named InputBufferCapacity (using the right click, Set
Referenced Property approach as we did earlier) and the Initial Capacity for the
OutputBuffer station as the property named OutputBufferCapacity. Specify
the Initial Capacity for the Processing station as 1.
Navigate to the Process window (still in the Lathe object). Now we will build
process flows for moving through each of the three stations we have defined.
Entities will enter our Lathe object and the InputBuffer station by executing
the process we will name InputBufferTransferIn.
• Click on the Create Process button to create our first process. Name
it InputBufferTransferIn. Set the Description to something like
Transfer in from outside the object. Hold the entity until
the processing capacity is available.
• The token that executes this process is triggered by the InputBuffer.Entered
event that is automatically generated each time an entity initiates en-
try into the station. Set the Triggering Event for the process to
InputBuffer.Entered.
• Click and drag to add a Delay step, an EndTransfer step and a Transfer
step to the process.
• Set the DelayTime to TransferInTime, the time each entity requires before
its transfer into the station is considered complete. Using F2, rename the
Delay step to TransferringIn. The EndTransfer step signals to the
outside world (perhaps a conveyor, robot, person, etc.) that the transfer is
now complete. Once the transfer is complete a new transfer can begin as
long as there is remaining space in the InputBuffer station. TIP: The step
“name” you changed is the unique label given to that step in that process.
Using meaningful names not only makes the process easier to understand,
but also makes the model trace easier to understand. You should use this
feature routinely.
• After the transfer in is complete, the token then initiates a transfer of
the entity from the InputBuffer station to the Processing station. Set
the Transfer step From property to CurrentStation, the To property to
Station, and the Station Name property to Processing.
The completed InputBufferTransferIn process is shown at the top of Figure 11.9.
The Processing station executes slightly different logic because it has no transfer
in time, but does have a processing time:
• Click on the Create Process button to create our next process. Name it
ProcessingTransferIn. Set the Description to something like Delay for
processing.
• The token that executes this process is triggered by the Processing.Entered
event that is automatically generated each time an entity initiates en-
Remove Watermark Wondershare
PDFelement
Figure 11.9: Three processes that define the behavior of the Lathe object.
try into the station. Set the Triggering Event for the process to
Processing.Entered.
• Click and drag to add an EndTransfer step, a Delay step, and a Transfer
step to the process.
• The EndTransfer step immediately ends the incoming transfer (there is
no transfer-in delay). Once the transfer is complete a new transfer could
potentially begin if there were any remaining space in the Processing
station. Since the capacity is fixed at one in our object, the next transfer
in cannot occur until the current entity has transferred out.
• Set the DelayTime to ProcessingTime, the time the user has specified for
processing. Using F2, rename the Delay step to Processing.
• After the processing delay is complete, the token then initiates a transfer
of the entity from the Processing station to the OutputBuffer station. Set
the Transfer step From property to CurrentStation, the To property to
Station, and the Station Name property to OutputBuffer.
The completed ProcessingTransferIn process is shown in bottom of Figure 11.9.
Our shortest and simplest process is for the OutputBuffer station which simply
passes the outgoing entity out of the object:
• Click on the Create Process button to create our last process. Name it
OutputBufferTransferIn. Set the Description to something like Wait
Remove Watermark Wondershare
PDFelement
MRI. We need to add a new property so that the user can specify which repair
person to use:
• Click on MRI to make it the active model, and then click on the Properties
panel in the Definitions window.
• Add a new Object Reference property, name it RepairPerson, and spec-
ify its category as Reliability Logic.
• Specify the Switch Property Name as Failure Type, the Switch Condition
as NotEqual, and the Switch Value as NoFailures. Hence this property
will not be visible if the NoFailures option is selected by the user.
• We will also set the Required Value flag to False for this property.
This property definition is shown in Figure 11.12.
We want to change the terminology used in this object from generic to medical.
Change the Display Name of the ProcessingTime property to Treatment Time,
and set the Description for this property to The time required to process
each patient. The Processing Time property should now look like Figure 11.13.
We will also hide the inherited properties named Capacity Type, WorkSchedule,
and InitialCapacity so they do not clutter the object.
Next we will modify the process logic that we have inherited to make use of the
repair person during maintenance. Click on the Processes window to display
the inherited processes from the base Server definition. Note that you cannot
edit any of the processes at this point because they are owned by the Server
and are inherited for use by the MRI. This inheritance is indicated by the green
arrow icon on the left that points up. We will select the first inherited process
in MRI named FailureOccurrenceLogic and then click on Override in the
Remove Watermark Wondershare
PDFelement
Process ribbon. This will make a copy of the inherited process from the Server
for use by the MRI in place of the same process that is owned by the Server. We
can then edit this overridden process in any way that we wish. This override
is indicated by the arrow icon on the left that is now pointed down. We could
also restore back to the original process by clicking on Restore in the Process
ribbon.
Now that we can change the logic in this process, we will add a Seize step im-
mediately before the TimeToRepair delay, and then a Release step immediately
after this delay. In both steps we will specify the RepairPerson property as the
object to seize/release (use the right-click and Set Reference Property). The
beginning of our revised process is shown in Figure 11.14.
Figure 11.15: New MRI object in use and illustrating custom properties.
simulation engine itself. Simio’s architecture provides many points where users
can integrate their own custom functionality written in a .NET language such
as Visual C# or Visual Basic .NET.
Simio’s extension points have been exposed as a set of interfaces that describe
the methods and calling conventions to be implemented by any user-extended
components. This set of interfaces is referred to as the Simio Application
Programming Interface (API). For detailed information on the Simio API,
see the file Simio API Reference Guide.chm located where Simio was installed
(typically C:/Program Files (x86)/Simio).
While you can create extensions using any .NET programming language, Simio
provides extra support for C# users. To help you get started creating Simio user
extensions, a number of predefined Simio project and project item templates
for Microsoft Visual Studio are available. These templates provide reusable
and customizable project and item stubs that may be used to accelerate the
development process, removing the need to create new projects and items from
scratch.
Remove Watermark Wondershare
PDFelement
In addition, several user extension examples are included with the Simio instal-
lation. You can explore these examples and possibly even customize them to
solve your own problems. The examples include:
• Binary Gate - An element and three steps for controlling flow through a
gate.
• TextFileReadWrite - An element and two steps for reading and writing
text files.
• DbReadWrite – An element and four steps for reading and writing database
files
• ExcelGridDataProvider - Supports import and export between tables and
Excel files.
• CSVGridDataProvider - Supports import and export between tables and
text files.
• SelectBestScenario - Illustrates an experiment data analysis add-in.
• SimioSelectionRules - Contains the implementation of all of Simio’s dynamic
selection rules.
• SourceServerSink - Illustrates a design time add-in that builds a simple
facility model from code.
• SimioTravelSteeringBehaviors – Supports guidance of entities moving
through free space.
• SimioScheduling – Configure resources, lists, and tables for scheduling
applications.
These examples can be found in a UserExtensions subfolder of the Simio example
models - typically under a Public or All Users folder.
11.6 Summary
In this chapter we have reviewed the basic concepts for building object definitions
in Simio. This is a key feature of Simio because it allows non-programmers to
build custom objects that are focused on a specific model or application area.
In our examples here we placed our objects from the Project Library. The other
alternative is to build the object definitions in their own project and then load
that project as a library from the Project Home ribbon.
With Simio you often have the choice to make between working with the Standard
Library embellished with add-on processes, and creating a new library with
custom logic. If you encounter the same applications over and over again it is
more convenient to build custom objects and thereby avoid the repeated need for
add-on processes. Of course you can also provide support for add-on processes
in your own objects by simply defining a property for the process name and
passing that property to an Execute step within your process.
With a bit of experience you will find object building to be a simple and powerful
capability for your modeling activities.
Remove Watermark Wondershare
PDFelement
11.7 Problems
1. Compare and contrast the three ways of creating model logic. What
determines your choice when creating a specific object?
2. What is the difference between the External View and the Console and
what are the limitations of each?
3. When you have built a model, say a paint line, what are the typical changes
required to make it suitable for reuse as an object in a larger model (e.g.,
a car plant containing many similar but not identical paint lines)?
4. Reproduce Model 11-2, but this time start with a Fixed Class - Processor.
What advantages and disadvantages does that approach provide?
5. Add a time-based failure to Model 11-2. Provide options for the Time
Between Failures, Time To Repair, and optional Repair Resource. Include
an external node where the repair operator will come to do the repair. Use
this object in a model demonstrating its full capability.
6. Create a Palletizer object with one input node for incoming boxes and
one output node for the outgoing palletized boxes. Pallets are created
on demand within the Palletizer. Boxes can be added to the pallet in a
user-specified quantity. Use appropriate animation. Demonstrate your
Palletizer object in a model with two types of boxes that cannot be mixed
on the same pallet. The full pallets are transported to shipping where the
boxes are removed from the pallets and all boxes and pallets are counted.
7. Create your own add-in for use in the experiment window. Your add-
in should read scenario data from an external data file and then create
appropriate scenarios in the Experiment Design view.
8. We have a brewing process for which we want to model discrete batch
processing. The full system will have many fermentation tanks with long
processing times. In order to more easily model the full system we want
to create a fermentation tank object. We will consider a small subset of
that system to make testing easier. Our subset of the brewing process
generates batches of beer according to the schedule in Figure 11.16. Each
batch in our test system takes a nominal 2 hours to ferment. (Note: The
real system requires many days to ferment). Our fermentation tank can
accept up to two batches of the same beer as long as the second batch
arrives within 60 minutes of the first batch. Both batches will finish at
the time the first batch would have finished alone. Different beer types
can never be fermented together. Create a FermentationTank object with
the above characteristics and then test it in a simple model with arrivals
driven by the schedule in Figure 11.16 and a single fermentation tank for
processing. Verify that your object produces the outcome specified in the
table comment.
Remove Watermark Wondershare
PDFelement
Chapter 12
Simulation-based
Scheduling in Industry 4.0
455
Remove Watermark Wondershare
PDFelement
Fourth Industrial Revolution. This statement was made at the beginning of 2017
but could just as well have been said 200 years ago, before the first industrial
revolution redefined civilization.
Before we discuss Industry 4.0, let’s take a brief look at the stages that brought
us to where we are today (Figure 12.1).
twin. This allows the model to react based on the changes in data – items like
adding a resource/machine and having that automatically created in the model
and schedules, by just importing the latest data.
In the current age of Industry 4.0, the exponential growth of technological
developments allows us to gather, store, and manipulate data like never before.
Smaller sensors, cheaper memory storage and faster processors, all wirelessly
connected to the network, facilitate dynamic simulation and modeling in order
to project the object into the digital world. This virtual model is then able to
receive operational, historical and environmental data.
Technological advancements have made the collection and sharing of large
volumes of data much easier, as well as facilitating its application to the model,
and evaluating various possible scenarios to predict and drive outcomes. Of
course, data security is an ever-important consideration with a Data Twin, as
with any digital modeling of critical resources. As a computerized version of a
physical asset, the Digital Twin can be used for various valuable purposes. It
can determine its remaining useful life, predict breakdowns, project performance
and estimate financial returns. Using this data, design, manufacturing, and
operation can be optimized in order to benefit from potential opportunities.
There is a three stage process to implement a useful Digital Twin:
Establish the model. More than just overlaying digital data on a physical item,
the subject is simulated using 3D software. Interactions then take place with
the model to communicate with it about all the relevant parameters. Data
is imposed and the model “learns”, through similarity, how it is supposed to
behave.
Make the model active. By running simulations, the model continuously updates
itself according to the data, both known and imposed. Taking information from
other sources including history, other models, connected devices, forecasts and
costs, the software runs permutations of options to provide insights, relative to
risk and confidence levels.
Learn from the model. Using the resulting prescriptions, plans can be im-
plemented to manipulate the situation to achieve optimal outcomes in terms
of utilization, costs, and performance, and avoid potential problem areas or
unprofitable situations.
A Digital Twin is more than just a blueprint or schematic of a device or system;
it is an actual virtual representation of all the elements involved in its operation,
including how these elements dynamically interact with each other and their
environment. The great benefits come through monitoring these elements,
improving diagnostics and prognostics, and investigating root causes of any
issues in order to increase efficiencies and overall productivity.
A correctly generated Digital Twin can be used to dynamically calibrate the
operational environment in order to positively impact every phase of the product
lifecycle; through design, building and operation. For any such application,
Remove Watermark Wondershare
PDFelement
before the digital twin model is created, the objectives and expectations must
be well understood. Only then can a model be created at the correct fidelity
to meet those objectives and provide the intended benefits. Examples of those
benefits include:
• Equipment monitors its own state and can even schedule maintenance and
order replacement parts when required.
• Mixed model production can be loaded and scheduled to maximize equip-
ment usage without compromising delivery times.
• Fast rescheduling in the event of resource changes reduces losses by re-
optimizing loading to meet important delivery dates.
works, more effectively participate in problem resolution, and hence have better
buy-in to the results.
Although time consuming, the modeling stage requires the involvement of op-
erators and personnel who are intimately familiar with the processes. This
involvement imparts an immediate sense of ownership that can help in the
later stage when implementing findings. To that end, a realistic simulation
proves to be a much easier and faster tool than alternatives like spreadsheets,
for testing and understanding performance improvements in the context of the
overall system. This is especially true when demonstrating to users and decision
makers.
In these ways, simulation assists with:
• predicting the resulting system performance,
• discovering how the various parts of the system interact,
• tracking statistics to measure and compare performance,
• providing a knowledgebase of system configuration and its overall perfor-
mance, and
• serving as a valuable communication tool.
In summary, use of simulation in its traditional design role can provide a strong
competitive advantage during development, deployment and execution of a smart
factory. It can yield a system that can be deployed in less time, with fewer
problems, and yield a faster path to optimal profitability.
factory. It can communicate with all of the critical sub-systems, collect planning
and real-time execution information, automatically create a short-term schedule,
and distribute the components and results of that schedule back to each sub-
system for further action.
made, when, where, and how, and what materials and resources will be required
to make it? Planning is typically done on an aggregate view of the capacity
assuming infinite material. Scheduling is concerned with the operational details
– given the current production situation, actual capacities, resource availabilities,
and work in progress (WIP), what priorities, sequencing, and tactical decisions
will result in best meeting the important goals? Where planning is required
days, weeks or months ahead of execution, scheduling is often done only minutes,
hours, or days ahead. In many applications, planning and scheduling tasks are
done separately. In fact, it is not unusual for only one to be done while the other
may be ignored, leaving significant unrealized potential performance.
One simple type of planning is based on lead times. For example, if averages have
historically indicated that most parts of a certain type are “normally” shipped 3
weeks after an order is released, it will be assumed that — regardless of other
factors — when we want to produce one, we should allow 3 weeks. This often
does not adequately account for resource utilization. If you have more parts in
process than “normal,” the lead times may be optimistic because it may actually
take much longer than predicted.
Another simple type of planning uses a magnetic board, white board, or a
spreadsheet to manually create a Gantt chart to show how parts move through
the system and how resources are utilized. This can be a very labor-intensive
operation, and the quality of the resulting plans may be highly variable, depending
on the complexity of the system and the experience level of the planners.
A third planning option is a purpose-built system - a system that is designed
and developed using custom algorithms usually expressed in a programming
language. These are highly customized to a particular domain and a particular
system. Although they have the potential to perform quite well, they often have
a very high cost and implementation time and low opportunity for reuse because
of the level of customization.
One of the most popular general techniques is Advanced Planning and Scheduling
(APS). APS is a process that allocates production capacity, resources, and
materials optimally to meet production demand. There are a number of APS
products on the market designed to integrate detailed production scheduling into
the overall Enterprise Resource Planning (ERP) solution, but these solutions
have some widely recognized shortcomings. For the most part the ERP system
and day-to-day production remain disconnected largely due to two limitations
that impede their success: complexity and variation.
Complexity. The first limitation is the inability to effectively deal with inde-
terminately complex systems. Although purpose-built systems can potentially
represent any system, the cost and time required to create a detailed, custom-
built system often prevents it from being a practical solution. Techniques such
as those discussed above tend to work well if the system is very close to a
standard benchmark implementation, but to the extent the system varies from
that benchmark, the tool may lack enough detail to provide an adequate solution.
Remove Watermark Wondershare
PDFelement
Critical situations that are not handled include complex material handing (e.g.,
cranes, robotic equipment, transporters, workers), specialized operations and
resource allocations (e.g., changeovers, sequence dependent setups, operators),
and experience-based decision logic and operating rules (e.g., order priorities,
work selection rules, buffering, order sequence).
Variation. A second limitation is the inability to effectively deal with variation
within the system. All processing times must be known and all other variability
is typically ignored. For example, unpredictable downtimes and machine failures
aren’t explicitly accounted for, problems with workers and materials never occur,
and other negative events don’t happen. The resulting plan is, by nature, overly
optimistic. Figure 12.3. illustrates a typical scheduling output in the form of a
Gantt chart, where the green dashed line indicates the slack between the (black)
planned completion date and the (gray) due date. Unfortunately, it is difficult
to determine if the planned slack is enough. It is common that what starts off as
a feasible schedule turns infeasible over time as variation and unplanned events
degrade performance. It is normal to have large discrepancies between predicted
schedules and actual performance. To protect against delays, the scheduler must
buffer with some combination of extra time, inventory, and capacity; all these
add cost to the system.
such as the highest priority job, or a more complex dynamic selection rule such
as a one that minimizes a sequence dependent setup time, or one that selects
the job based on urgency by picking the job with the smallest value of the time
remaining until the due date, divided by the work time remaining (critical ratio).
Many of the simulation-based scheduling systems have been developed around a
data-driven pre-existing, or “canned,” job shop model of the system. For example,
the system is viewed as a collection of workstations, where each workstation is
broken into a setup, processing, and teardown phase, and each job that moves
through the system follows a specific routing from workstation to workstation.
The software is configured using data to describe the workstations, materials,
and jobs. If the application is a good match for the canned model, it may provide
a good solution; if not, there is limited opportunity to customize the model to
your needs. You may be forced to ignore critical constraints that exist in the
real system but are not included in the canned model.
It is also possible to use a general purpose discrete event simulation (DES) product
for Finite Capacity Scheduling. Figure 12.4 illustrates a typical architecture
for using a DES engine at the core of a planning and scheduling system. The
advantages of this approach include:
• It is flexible. A general-purpose tool can model any important aspects of
the system, just like in a model built for system design.
• It is scalable. Again, similar to simulations for design, it can (and should)
be done iteratively. You can solve part of the problem and then start using
the solution. Iteratively add model breadth and depth as needed until the
model provides the schedule accuracy you desire.
• It can leverage previous work. Since the system model required for schedul-
ing is very similar to that which is needed (and hopefully was already used)
to fine tune your design, you can extend the use of that design model for
planning and scheduling.
• It can operate stochastically. Just as design models use stochastic analysis
to evaluate system configuration, a planning model can stochastically
evaluate work rules and other operational characteristics of a scheduling
system. This can result in a “smarter” scheduling system that makes better
decisions from the start.
• It can be deterministic. You can disable the stochastic capabilities while
you generate a deterministic schedule. This will still result in an optimistic
schedule as discussed above, but because of the high level of detail possible,
this will tend to be more accurate than a schedule based on other tools.
And you can evaluate how optimistic it is (see next point).
• It can evaluate risk. It can use the built-in stochastic capability to run
AFTER the deterministic plan has been generated. By again turning on
the variation – all the bad things that are likely to happen - and running
multiple replications against that plan, you can evaluate how likely you are
Remove Watermark Wondershare
PDFelement
However there are also some unique challenges in trying to use a general purpose
DES product for scheduling, since they have not been specifically designed for
that purpose. Some of the issues that might occur include the following:
• Scheduling Results: A general purpose DES typically presents summary
statistics on key system parameters such as throughput and utilization.
Although these are still relevant, the main focus in scheduling applications
is on individual jobs (entities) and resources, often presented in the form
of a Gantt chart or detailed tracking logs. This level of detail is typically
not automatically recorded in a general purpose DES product.
• Model Initialization: In design applications of simulation we often start the
model empty and idle and then discard the initial portion of the simulation
to eliminate bias. In scheduling applications, it is critical that we are able
Remove Watermark Wondershare
PDFelement
to initialize the model to the current state of the system – including jobs
that are in process and at different points in their routing through the
system. This is not easily done with most DES products.
• Controlling Randomness: Our DES model typically contains random times
(e.g. processing times) and events (e.g. machine breakdowns). During
generation of a plan, we want to be able to use the expected times, and
turn off all random events. However once the plan is generated, we would
like to include variation in the model to evaluate the risk with the plan. A
typical DES product is not designed to support both modes of operation.
• Interfacing to Enterprise Data: The information that is required to drive
a planning or scheduling model typically resides in the company’s ERP
system or databases. In either case, the information typically involves
complex data relations between multiple data tables. Most DES products
are not designed to interface to or work with relational data sources.
• Updating Status: The planning and scheduling model must continually
adjust to changes that take place in the actual system (e.g. machine
breakdowns). This requires an interactive interface for entering status
changes.
• Scheduling User Interface: A typical DES product has a user interface
that is designed to support the building and running of design models. In
scheduling and planning applications, a specialized user interface is required
by the staff that employs an existing model (developed by someone else)
to generate plans and evaluate risk across a set of potential operational
decisions (e.g. adding overtime or expediting material shipments).
A new approach, Risk-based Planning and Scheduling (RPS), is designed to
overcome these shortcomings to fully capitalize on the significant advantages of
a simulation approach.
complex workstations such as ovens and machining centers with tool changers.
RPS imposes no restrictions on the type and number of constraints included
in the model. You no longer have to assume away critical constraints in your
production system. You can generate both the deterministic plan and associated
risk analysis using a model that fully captures the realities of your complex
production and supply chain. You can also use the same model that is developed
for evaluating changes to your facility design to drive an RPS installation – a
single model can be used to drive improvements to your facility design as well as
to your day-to-day operations.
RPS implemented as a Digital Twin can be used as a continuous improvement
platform to continuously review operational strategies and perform “what-if”
analysis while generating the daily schedule. It can be used off-line to test things
like the introduction of a new part to be produced or a new machine/line to be
installed. “Go-live” of the updated system becomes easy – simply promote the
evaluation model to be the live operational model. The model used to prove
out the design will immediately affect the schedule based on the system changes
without having to re-implement the software or make costly updates or changes.
To ensure better supply chain performance, the model can be extended into
the planning horizon to ensure better alignment between the master plan and
the detailed factory schedule. The same model will run for 3 to 6 weeks for
planning and 1 to 3 weeks for scheduling and perhaps 1 or 2 days for the detailed
production schedule for execution. This will then ensure material availability as
procurement will be based on the correct requirement dates. This more accurate
information can then be used to update the ERP system, for example feeding
updates back to SAP.
RPS can even be linked to optimization programs like OptQuest. You can set
corporate KPIs and run automatic experiments to find the best configuration
for buffer sizes, resource schedules, dispatching rules, etc. to effectively run the
factory and then schedule accordingly. Combining the design and execution
modes of the simulation model, also makes it an ideal tool for configuring and
implementing a Demand Driven MRP (DDMRP) system. A simulation-based
DDMRP system has the added advantage of near instantaneous rescheduling
and dynamic configuration updates.
accessed within the Planning tab). The academic version of Simio RPS is very
similar to the commercial version, but the most commonly available version
allows only 20 resources to be logged and 2 targets to be monitored – sufficient
for learning, but generally insufficient for a commercial application.
Figure 12.6: The Planning tab provides access to RPS scheduling features.
Although the base model used to drive a Simio RPS solution can be built using
any of the Simio family of products, the Simio RPS features are required for
preparing the model for RPS deployment. This preparation includes enabling
activity logging, adding output states and scheduling targets to tables, and
customizing the user interface for the scheduler.
In traditional Simio applications, the data tables are only used to supply inputs
to the model. However in RPS applications, the data tables are also used to
record values during the running of the model. This is done by adding state
columns to table definitions, in addition to the standard property columns. For
example, a Date-Time table state might be used to record the ship date for a
job, and a Real table state value might be used to record the accumulated cost
for the job. Table states can be written to by using state assignments on the
objects in the Standard Library, or more flexibly by using the Assign step in
any process logic. Output state columns are added to tables using the States
ribbon or State button in the Data tab of the Simio RPS Edition.
A scheduling target is a value that corresponds to a desired outcome in the
schedule. A classic example of a target is the ship date for a job (we would like
to complete the job before its due date). However, targets are not limited to
completion dates. Targets can report on anything in the simulation that can be
measured (e.g., material arrivals, proficiency, cost, yield, quality, OEE) and at
any level (e.g., overall performance, departmental, orders, sub-assemblies, and
other milestones).
Targets are defined by an expression that specifies the value of the target, along
with upper and lower bounds on that value, and labels for each range relative
to these bounds. For example, a target for a due date might label the range
above the upper limit as Late, and the range below the upper limit as On
Time. Simio will then report statistics using the words Late and On Time.
Remove Watermark Wondershare
PDFelement
The standard Simio user interface is focused on model building and experimen-
tation. In RPS applications, there is a need for a different user interface that is
tailored for the planning and scheduling staff. Schedulers generally do not build
models, but instead use models in an operational setting to generate plans and
schedules. A separate and dedicated user interface is needed for the planning
and scheduling user. Simio RPS lets you easily tailor the user interface for the
planning and scheduling staff. You can fully configure the types of data that the
scheduler can view and edit, and fully customize the implementation to specific
application areas.
Remove Watermark Wondershare
PDFelement
planning period. Figure 12.10 shows an example of a resource dispatch list for
an operator. More examples of these reports will be covered in the following
examples.
Scheduler mode can also display custom dashboards that have been designed
using the design mode to summarize information on a specific job, machine,
worker, or material. These dashboards can combine several types of graphical
and tabular schedule information into a single summary view of a job or machine
to provide additional insights into a plan/schedule.
Scheduler mode allows the planners and schedulers to test alternatives to improve
a high risk schedule. Different plans can be evaluated to see the impact of
overtime, expediting of materials, or reprioritizing work on meeting specific
targets.
the schedule risk. Finally we will briefly explore some of the built-in analysis
tools that help us evaluate and use the schedule.
Figure 12.12: Model 12-1 Resource Plan zoomed to show entity details.
Remove Watermark Wondershare
PDFelement
entities listed (Figure 12.13). Note that the entity ID’s are sorted as strings (not
numerically) - so the first entity created (DefaultEntity.19) comes between
DefaultEntity.189 and DefaultEntity.190 – perhaps not intuitive, but we
will address that shortly.
Figure 12.13: Model 12-1 Entity Workflow Gantt zoomed to show resource
details.
Figure 12.14: Model 12-1 ArrivalsTable after import from CSV file.
In the Facility view select the Source1 object so we can configure it to create
entities using the new table. Set Arrival Mode to ArrivalTable and set the
Remove Watermark Wondershare
PDFelement
Figure 12.15: Model 12-1 Entity Workflow Gantt with better times and entity
labels.
Figure 12.16: Model 12-1 Resource Plan Gantt with better times and entity
labels.
Figure 12.17: Model 12-1 Higher variability system with risk analysis.
Although our example model so far doesn’t require it, clicking the + button
to the left side of a row displays more detail about the items in that row (like
Constraints). The buttons on the Gantt ribbon control which optional data can
be displayed. Both of these are illustrated in Figure 12.19.
The third button on the left displays Logs which record and display all of the
events in ten categories including resource-related, constraints, transporters,
materials, and statistics. The Gantt charts and many of the other analysis
features discussed below are built on the data in these logs. You can filter these
logs to make them easier to read. You can also add columns to the logs to better
Remove Watermark Wondershare
PDFelement
a model from B2MML data files (Section 7.8) and then explore how we might
enhance that model. The system we are modeling has two machines to choose
from for each of four operations as illustrated in Figure 12.21.
Each product will have its own routing through the machines. We will start by
using some built-in tools to setup the data tables and configure the model with
predefined objects that will be used by the imported data. Then we will import
a set of B2MML data files to populate our tables. We will also import some
dashboard reports and table reports to help us analyze the data.
Remove Watermark Wondershare
PDFelement
this model when you clicked the Configure Scheduling Resources button. If
you select the Shape1 object, you can see in the Properties window that it is a
SchedServer object and that many of the properties like the Work Schedule,
Processing Tasks, and Assignments have been preconfigured to draw data directly
from the tables.
While this was obviously a small example, it illustrates the potential for building
entire models from existing data sources such as B2MML, Wonderware MES,
and SAP ERP systems. This approach can provide an initial functioning model
with relatively low effort. Then the model can be enhanced with extra detail
and logic to provide better solutions. This is a very powerful approach!
Remove Watermark Wondershare
PDFelement
At the same location you can also find the e-book Deliver on Your Promise: How
Simulation-Based Scheduling will Change Your Business. This book is great for
managers who want a better understanding of the complex process of scheduling.
This provides more details on some of the topics discussed in this chapter as well
as describes a few case studies. You are encouraged to share this pdf (or the
printed version available on-line) with managers who are looking to solve their
scheduling problems.
entity for each order resides in the ParallelRouteController server until all
processing tasks are complete.
12.14 Summary
In this chapter we have discussed Industry 4.0 and its origins, and its needs
for a Digital Twin. We discussed the traditional role of simulation in analyzing
Industry 4.0 projects as well as simulation’s new role in helping to realize a Digital
Twin via planning and scheduling. We discussed some common approaches to
planning and scheduling and their strengths and weaknesses. Then we explored
new technology to use simulation in Risk-based Planning and Scheduling to
address many of those problems and provide important new capabilities to
schedulers. We briefly introduced some of the Simio features that make RPS
possible. We built one example in a more traditional fashion that was partly
data-driven. Then we built a second example that was not only data-driven,
but the model itself was entirely built (data-generated) from B2MML compliant
data files to illustrate the power of automated model building. We concluded
by mentioning three larger examples included with the Simio software that
illustrate still more concepts. Although this was only a brief introduction to
RPS, we hope that we have sparked your interest. There are many other potential
advantages to using RPS, and new application areas have opened up particularly
relating to designing, assessing, and implementing digital twins. In addition to
the commercial applications, RPS can be a rich area for student projects and
research.
12.15 Problems
1. Compare and contrast Industry 3.0 and Industry 4.0.
2. What is a digital twin? Describe the components of a digital twin and it’s
benefits.
3. Describe common problems with popular scheduling approaches and how
simulation and RPS can address those problems.
4. How does a Simio Dashboard differ from a Simio Table Report?
5. Start with (or rebuild) Model 12-01. Add an AGV (vehicle) with a
population of 2 and operating at 4 feet per minute that is required for part
movement between Cut and Drill operations. Produce screen shots from
both Resource and Entity Gantt charts illustrating the first entity that is
constrained by the AGV.
6. Consider Model 12-02. By modifying the data files and reimporting, add a
machine named Cut3 to the Cut routing destination. Use the Save for
Compare and Show Differences features on the Operational Planning
ribbon of the Planning tab to determine the change in schedule performance.
Remove Watermark Wondershare
PDFelement
Include a screen capture of the Target Detail report illustrating the impact
of the change.
7. Starting with the solution to Problem 6, if you could add one additional
machine of any type, what would it be and why?
Remove Watermark Wondershare
PDFelement
Appendix A
This chapter includes four “introductory” and two “advanced” case studies
involving the development and use of Simio models to analyze systems. These
problems are larger in scope and are not as well-defined as the Problems in
previous chapters. For the first two cases, we’ve also provided some analysis
results based on our sample models. However, unlike the models in previous
chapters, we do not provide detailed descriptions of the models themselves.
The first case (Section A.1) describes a manufacturing system with machining,
inspection, and cleaning operations, and involves analyzing the current system
configuration along with two proposed improvements. The second case (Section
A.2) analyzes an amusement park and considers a “Fast-Pass” ticket option and
the impact it might have on waiting times. The third case (Section A.3) models
a restaurant and asks about the important issues of staffing and capacity. The
fourth case (Section A.4) considers a branch office of a bank, with questions
about how scheduling and equipment choice affect costs.
The two advanced case studies are intended to represent larger realistic problems
that might be encountered in a non-academic setting. In the “real world,”
problems are typically not as well-formed, complete, or tidy as they are in typical
homework Problems. You often face missing or ambiguous information, tricky
situations, and multiple solutions based on problem interpretation. You may
expect the same from these cases. As these situations are encountered, you
should make and document reasonable assumptions.
Case Study videos suitable for featuring in a class can be found here: https:
//www.simio.com/resources/webinar/.
495
Remove Watermark Wondershare
PDFelement
In the current system, four different part types arrive to an automated machining
center, where they’re processed one part at a time. After completing machining,
parts are individually inspected by a human inspector. The inspection process is
subject to error — classifying “good” parts as “bad” (type I error) or classifying
“bad” parts as “good” (type II error). After inspection, parts classified as “good”
are sent to another zone in the plant for further processing, while parts classified
as “bad” must be cleaned in an automatic cleaner (with a capacity of one
part) and then re-processed by the machining center (using the same processing
parameters as “new” parts).
Additional details of the system include:
• Part arrival, machining time, and cleaning time process details are given
in Table A.1. All four arrival processes are stationary Poisson processes,
and independent of each other.
• All parts go to inspection immediately following machining. The time to
inspect a part is independent of the part type and follows an exponential
distribution with mean 2 minutes. 6% of inspected parts are found to be
“bad” and must be cleaned and then re-processed (this is independent of
the number of times a part has been cleaned and re-processed). Parts that
Remove Watermark Wondershare
PDFelement
fail inspection have priority over the “new” parts in the machining queue
after they’re cleaned. It takes 12 minutes to clean each part (the cleaning
time is also independent of part type).
• Out of all the parts that are deemed “good” and sent to another zone,
3% are later found to be “bad” (type II error). These parts are put on
a pallet in a central location where a forklift will periodically pick up
and deliver the pallet to the cleaning machine. These parts are given
priority in the automatic cleaner queue. The time between forklift pickups
is exponentially distributed with mean 3 hours.
• Out of all the parts that are deemed “bad” and sent to the automatic cleaner,
7% were actually good and did not require cleaning and re-machining (type
I error). The per-part cost associated with the unnecessary cleaning and
processing is given in Table A.2.
• The machining center and cleaning machine are both subject to random,
time-dependent failures. For both machines, the up times follow an expo-
nential distribution with mean 180 minutes, and the repair times follow an
exponential distribution with mean 15 minutes. If a part is being processed
when either of the machines fails, processing is interrupted but the part is
not destroyed.
• The system operates for two shifts per day, six days per week. Each shift
is eight hours long and work picks up where it left off at the end of the
previous shift (i.e., there’s no startup effect at the beginning of a shift).
Item Cost
Unnecessary cleaning due to type I error $5/part
Simple robot $1,200/week each
Complex robot $5,000/week
Holding cost per part $0.75/hour spent in system
Inspection worker $50/hour
The two scenarios you’ve been asked to evaluate both concern possible automation
of the inspection operation:
Remove Watermark Wondershare
PDFelement
1. Installation and use of four “simple” robots, one for each part type. These
robots inspect one part at a time. The probabilities of type I and type II
errors are 0.5% and 0.1%, respectively. The time for each “simple” robot
to inspect a part is independent of the part type and follows a triangular
distribution with parameters (5.5, 6.0, 6.5) minutes.
2. Installation and use of one “complex” robot that can inspect all four differ-
ent part types, but can inspect only one part at a time. The probabilities
of type I and type II errors are 0.5% and 0.1% respectively. The time
for the “complex” robot to inspect a part is independent of the part type
and follows the a triangular distribution with parameters (1.0, 2.0, 2.5)
minutes.
Since these robots are manufactured by the same company as the machining
center and automatic cleaner, the robots are assumed also to be subject to
random failures with the same probability distributions as given above for the
machining and cleaning machines. The cost data to be used in your analysis
are in Table A.2. Economic analysis for purchasing the robots has already been
developed, and the associated costs (purchase price, installation, operation and
maintenance, etc.) are given as a single weekly cost in Table A.2.
Using your Simio model, answer the following questions. Your answers should
be supported by results and analysis from your simulation experiment(s).
1. After looking at the specifications for the robots, the manager has noticed
that the average time of inspection for a “simple” robot is much higher
than that of the current process. He is nervous that changing the current
inspection process might actually decrease overall production (i.e., number
of completed parts per week). Will changing the method of inspection
change the number of parts that are completed each week? If so, describe
how the number of completed parts changes with respect to the current
system (i.e., amount of increase/decrease).
2. Given the three methods of inspection, which operation do you recommend
to minimize costs?
3. If you find that one or both of the automatic inspection processes costs the
same as, or more than, manual inspection, determine what would enable
that inspection process to operate at a weekly cost that’s lower than that
with manual inspection. Assume that all costs are fixed and can’t be
adjusted.
Remove Watermark Wondershare
PDFelement
checked, the property is given the value of True. The model references these
values in the selection-weight property of the connectors before the different
inspection processes. Two examples of this are called out in Figure A.2.
The expression that we use for the total weekly cost is:
TotalCost = WeeklyMachineCosts + WeeklyHoldingCost.Value
+ TotalTypeIErrors.Value*5 + InspectionWorkerHours*50
The methods for calculating each of the four sections of the above equation are:
1. WeeklyMachineCosts: These costs were given in the problem descrip-
tion. The property WeeklyMachineCosts is a standard numeric property
that’s controlled in the experiment.
2. WeeklyHoldingCost.Value: This is the value of the output statistic
that references the model state HoldCost. We increment the state HoldCost
each time an entity enters the sink (exits the system) using HoldCost =
(TimeNow-ModelEntity.ArrToSys)*0.75 + HoldCost which, in essence,
calculates the total time the entity spent in the system and multiplies that
value by the holding cost given in the problem description. The state is
then incremented using this value. Using this method, the output statistic
WeeklyHoldingCost will be the sum of the holding costs for all entities.
3. TotalTypeIErrors.Value x 5: The cost of $5 was given in the problem
description as the cost associated with a type I error. TotalTypeIErrors is
an output statistic that references the model state, TypeIError. This state
is incremented when a type I error is committed in the inspection process.
4. InspectionWorkerHours x 50: The cost of $50 per hour was given
in the problem description. The property InspectionWorkerHours is a
standard numeric property that’s controlled in the experiment.
Using the expression and the experiment parameters listed above, the average
weekly cost for each scenario was calculated. These results are shown in Table
A.3 (all half widths are of 95% confidence intervals on the expected value). The
average weekly totals of type I and type II errors for each inspection process are
given in Table A.4. The average total number of parts that finish processing
(exit the system) each week can be seen in Table A.5.
Remove Watermark Wondershare
PDFelement
Table A.4: Average type I and type II errors for each scenario.
Inspection scenario Type I errors [95% CI] Type II errors [95% CI]
Current manual 10.23 [10.09, 10.37] 69.93 [69.55, 70.31]
Automated: four “simple” robots 1.02 [0.97, 1.06] 2.26 [2.19, 2.32]
Automated: one “complex” robot 1.04 [1.00, 1.09] 2.24 [2.17, 2.30]
Although the answer to this question could be obtained through simple queueing
analysis (for any stable system, flow in equals flow out, so the expected number
of parts will simply be the arrival rate times the duration), we can use the results
from our simulation experiment to answer this question as well. As seen in
the SMORE plot in Figure A.4, it appears that the average total number of
parts processed per week does not vary much across the scenarios. To verify
that there is no statistically significant difference between the mean number of
completed parts per week in scenario 1 (current manual inspection) on the one
hand, vs. each of scenario 2 (automated inspection using four “simple” robots)
and scenario 3 (automated inspection using one “complex” robot), two different
paired t tests were conducted. The results from these tests are in Figures A.5
and A.6.
Remove Watermark Wondershare
PDFelement
Figure A.4: SMORE plot of the average number of completed parts per week
for each scenario.
Figure A.5: Minitab results for a paired t test comparing scenarios 1 and 2.
Figure A.6: Minitab results for a paired t test comparing scenarios 1 and 3.
Remove Watermark Wondershare
PDFelement
Since the 95% confidence interval of the mean difference, [−1.54, 4.38], contains
zero, we conclude that there is no statistically significant difference between
scenarios 1 and 2 with respect to the average numbers of parts processed per
week. The same determination can be made from Figure A.6, where scenarios 1
and 3 are compared. Again, there is no statistically significant difference between
scenarios 1 and 3 with respect to the average numbers of parts processed per
week since the 95% confidence interval of the mean difference, [−3.70, 2.38],
contains zero. With this statistical evidence, we can conclude that changing the
method of inspection will not significantly change the number of parts completed
each week.
Another approach to compare these scenarios involves Simio’s Scenario Subset
Selection capability. When the objective functions of the responses are set
according to Table A.6, and the “Subset Analysis” is activated, Simio uses a
ranking-and-selection procedure to group the response values into subgroups,
“Possible Best” and “Reject,” within each response. In the Experiment Window’s
Design window, the cells in a Response column will be highlighted brown if
they’re considered to be “Rejects,” leaving the “Possible Best” scenarios with
their intended coloring.
Response Objective
Total processed Maximize
Type I errors Minimize
Type II errors Minimize
Time in system (TIS) Minimize
Total cost Minimize
Holding cost per week Minimize
The results obtained through this analysis method are in Figure A.7.
Figure A.7: Results for analysis of several responses using Simio’s Subset Selec-
tion.
Simio’s analysis using Scenario Subset Selection gives us the same results as did
Remove Watermark Wondershare
PDFelement
our paired t tests. The response, TotalProcessed, for each scenario has not
been highlighted brown; therefore, Simio’s Subset Selection has identified each
of the three scenarios as a “Possible Best” for maximizing the average weekly
number of parts processed. This analysis verifies our expectation that there is
no significant difference in the numbers of parts that are processed each week.
By examining the SMORE plot shown in Figure A.8, it’s not clear which
inspection method would be the least expensive. To determine if there’s any
statistically significant difference between the weekly costs for the different
scenarios, we again use Simio’s Scenario Subset Selection. Figure A.7 shows that
the response values associated with the total cost of scenarios 1 and 2 are both
highlighted in brown, indicating a “Reject,” and the response value associated
with the total cost of scenario 3 has been identified as a “Possible Best.” Based
on this information, and the fact that the overall production does not decrease,
we can recommend that the company should change their inspection process to
use the one “complex” robot.
Figure A.8: SMORE plot of the total cost for each scenario.
Remove Watermark Wondershare
PDFelement
Table A.7: Scenarios for the new experiment to determine the effects
of changing the process time of the four simple machines.
As seen in Figure A.9, as the average processing time for the “simple” robots
decreases, the total cost decreases as well. As seen in Table A.7, scenarios 4–8
use “simple” robot inspection times with decrements of 0.1 minute. Using the
Simio Scenario Subset Selection, we can further analyze the effects of altering
the processing times for the “simple” robot. Figure A.10 provides the results of
the Subset Selection when the objectives of the Responses are set according to
Table A.6.
As shown in Figure A.10, the average total cost of scenario 1 is statistically
significantly different from that of scenarios 6–8. Therefore, if the manufacturer
Remove Watermark Wondershare
PDFelement
Figure A.9: SMORE plot for the total cost for each of the eight scenarios.
Remove Watermark Wondershare
PDFelement
of the robots can reduce the average processing time by 0.3 minute (through the
distribution tria(5.2, 5.7, 6.2)), the inspection operation using the four “simple”
robots will yield a lower weekly cost than that of manual inspection. Figure A.10
also shows that there are now four “Possible Best” scenarios: 3, 6, 7, and 8. If we
increase the number of replications from 2000 to 2500 for each of these scenarios,
and use Scenario Subset Selection, scenario 3 is removed from the subgroup of
“Possible Best” (see Figure A.11). The number of completed replications for
scenarios 3, 6, 7, and 8 were increased to 2500. With this information, it’s clear
that if the manufacturer of the robots can reduce the “simple” robot’s average
processing time by 0.3 minute (through the distribution tria(5.2, 5.7, 6.2)), we
could recommend the use of the four “simple” robots for part inspections.
Figure A.10: Results for analysis of several responses for eight scenarios using
Simio’s Scenario Subset Selection.
Figure A.11: Previous results with 2500 replications for selected scenarios.
Once a customer is admitted to the park, he/she has the opportunity to purchase
a“Fast Pass,” which allows the customer to have priority at the roller coaster and
ferris wheel. The manager of the park has had complaints about wait times from
customers since the addition of the Fast Pass and has requested assistance with
managing the Fast-Pass process. The manager’s objective is to maximize overall
profits of the Fast Pass, subject to the constraints of wait times for Fast-Pass
and regular customers.
Ride Available Cars/Buckets Ride Cap. Queue Cap. Ride Time Loading Unlo
Roller coaster 2 20 100 4 tria(5, 10, 13) 0.5
Ferris wheel 30 60 80 10 1.2 0.5
Figure A.13: Sample Simio model for the amusement park case.
Figure A.14: SMORE plots of average regular customer wait times by percentage
of Fast Pass customers.
Remove Watermark Wondershare
PDFelement
Figure A.15: SMORE plots of average Fast Pass customer wait times by per-
centage of Fast Pass customers.
estimates are based on a visual inspection of the SMORE plots in Figures A.14
and A.15, and additional, more detailed experimentation would be required to
get more precise results.
The make time for an order depends on the size of the group (e.g. the make time
for a group of three will be triple the make time for one order). See Table A.14 for
the distribution of service times and the possible number of workers performing
the respective tasks. Orders sent to the kitchen are grouped accordingly and
delivered together.
If the expected wait for a table is longer than 60 minutes or there are more than
Remove Watermark Wondershare
PDFelement
“unhappy customers.”
If there are more than 3 people in the ATM line and fewer than 3 people in the
teller line when an ATM customer arrives, there is an 85% chance he/she will
switch from being an ATM customer to being a teller customer, and will enter
the teller queue, but if the teller queue is occupied by 4 or more people there
is an 80% chance that this ATM customer will balk. If there are more than 4
people in the teller line when a teller customer arrives, he/she will balk 90%
of the time. There has recently been some economic analysis developed that
shows that each “unhappy customer” costs the bank approximately $100 for
each occurrence.
While most customers are finished and leave the bank after their respective
transaction, 2% of the ATM customers and 10% of the teller customers will need
to see the manager after completing service at the ATM or teller. In addition, if
a customer spends more than five minutes in the teller queue, there is a 50%
chance that he or she will get upset and want to see the manager after completing
service at the bank of tellers. If a customer spends more than 15 minutes in the
manager queue there is a 70% chance that he or she will get upset. All customers
who get upset as a result of waiting time should also considered as “unhappy
customers.” Customer travel times between areas of the bank are given in Table
A.16 and should be included in your model; assume they’re all deterministic.
complete the hard reset. These data can be found in the file ATMdata\_bank.xls
in the “students” section of this book’s website (see the Preface for instructions
on how to access this website). Two histograms in reference to these data for the
up times (times from the end of a hard reset to the next time the ATM jams)
and time required to reset are shown in Figures A.18 and A.19, respectively.
Figure A.18: A histogram of the data gathered for the ATM up times.
The manager can serve one customer at a time and there is one manager on
duty at all times. There are two types of tellers, classified as either “experienced”
or “inexperienced.” The bank of tellers has a single queue and each teller can
serve only one customer at a time. The hourly costs associated with experienced
and inexperienced tellers are $65 and $45, respectively. This cost includes the
teller’s hourly pay as well as overhead costs (workers compensation, benefits,
401K plans, vacation pay, etc.). Customer service times follow the distributions
given in Table A.17.
For the manager, the service times are independent of whether the customer has
been to the ATM or the teller prior to visiting the manager.
By convention, the bank divides its days into four different time blocks. The
Remove Watermark Wondershare
PDFelement
Figure A.19: A histogram of the data gathered for the time to hard-reset a
jammed ATM.
mangers of the bank need your help in determining the number of each type
of teller that should be scheduled to work during each time block in order to
minimize the costs of operating the bank (for analysis purposes, you should be
concerned only with the costs that are provided). Because there are only three
stations in the teller area, there can be no more than three tellers working during
any one time block. Each teller must work the entire time block for which s/he
is scheduled:
• Time block 1: 9:00 a.m. – 11:00 a.m.
• Time block 2: 11:00 a.m. – 1:00 p.m.
• Time block 3: 1:00 p.m. – 3:00 p.m.
• Time block 4: 3:00 p.m. – 5:00 p.m.
The managers at the bank have also been considering installation of an additional
ATM. The ATM supplier has given the bank two different options for purchasing
an ATM. The first option is a brand new machine, and the second option is a
reconditioned ATM that was previously used in a larger bank. The supplier has
broken the cost down into a daily cost of $500 for the new machine and $350 for
the reconditioned machine. % This price is all inclusive and includes installation,
operation and maintenance, depreciation, etc. . .
The reconditioned ATM is assumed to jam and reset at the same rates as the
bank’s current ATM machine. Although the new ATM machine is assumed to
jam just as often as the current one, it has been enhanced with a faster processor
that performs automatic resets in 20 seconds. With this information, the bank
management wants your recommendation on whether to purchase an additional
ATM machine, and if so, which one.
Remove Watermark Wondershare
PDFelement
Use Simio to model this small branch bank as it’s described above. In addition to
your model, provide responses to the following items that were requested by the
bank managers. Your recommendations should be based on what minimizes the
bank’s operating costs with respect to the cost metrics provided in the problem
description (“unhappy-customers” cost, additional ATM cost if applicable, and
teller cost). Your responses should be supported by your analysis of the results
you obtained through experiments.
1. Should the bank purchase an additional ATM machine? If so, should it be
new or reconditioned?
2. Find the number of each classification of tellers that the bank should
schedule for each of the four time blocks given in the problem description
(i.e., a daily schedule for the bank of tellers).
3. What are the bank’s expected daily operating costs with respect to the
cost metrics provided in the problem description?
4. What is the expected cost per day associated with “unhappy customers?”
5. How often does the ATM machine jam? How long does it take to repair
it? (The answers to both of these questions should be accompanied by the
method you used to obtain them.)
6. On average, how many customers is the bank serving per day? This
value should include all customers who enter the bank and are involved
in some sort of transaction (this should not include customers who leave
immediately after entering the bank as a result of a line’s being too long.)
7. What proportion of the total arriving customers are considered to be
“unhappy customers?”
Plane arrivals depend on the time of day (see Table A.19). The arrival rate reaches
its maximum in the middle of the day. Airport management has categorized
aircraft into two groups: large aircraft (at least 120 seats) and small aircraft
(fewer than 120 seats). All gates are sized to handle both large and small aircraft.
For the planning period in question, the percentage of the above arrivals handled
by Terminal 2 are 20% for runway 1, 20% for runway 2 and 30% for runway 3.
The balance of the flights are handled by Terminal 1.
Table A.19: VCA overall plane arrivals for each runway by hour of
day.
The cost of a new 11,000 foot runway is $2,200 per linear foot. The cost of a
new 21,000 square foot gate is $28 per square foot. The fully-burdened hourly
cost (including associated equipment) of each team is indicated in Table A.20.
One entrance is for patients who walk into the ED, and the other entrance is for
patients who are brought in by ambulance. Patients who walk in have to go first
to the registration desk, where they fill out a form. They then have to go to a
triage area where they are diagnosed by a nurse and assigned an acuity. Acuity
indicates problem severity (1–5, with 5 being the most serious). When assigned
an acuity, the triage nurse enters the patient information into a computer system
that assigns every patient to a nurse depending on their availability (if the pod
is open, and if they are not busy working with another patient). Then the triage
nurse leaves the patient in the corridor for the pod’s nurse to pick up and take
him or her to the entrance of a pod that’s open and has a free room. The nurse
from the pod then comes to the entrance and takes the patient to his or her
room. Here the nurse helps the patient settle into the room, and sets up the
necessary equipment. Once the patient has been set up, a doctor comes into the
room and may order a blood test for the patient. This happens 75% of the time.
When free, the nurse draws blood from the patient, labels it with the patient’s
name, and then takes it to the hospital unit cleric (HUC). The HUC takes the
blood and labels it with the necessary tests to be done, and then sends it to the
lab via a chute. The processing time at the HUC’s desk has a triangular (3, 4,
5) distribution (in minutes).
The file STBH\_ArrivalData.xls in the student area of the textbook web site
(see the Preface) contains arrival data by patient acuity level. From past data,
it appears that 80% of acuity 4 patients and 95% of acuity 5 patients arrive by
ambulance; all other patients arrive as walk-ins. Processing-time data (assumed
to be triangularly distributed with the given minima, modes, and maxima, in
minutes) are in Table A.21.
Remove Watermark Wondershare
PDFelement
Patients in triage have their blood pressure and temperature taken, and their
general complaints are noted. Patients complaining of serious illnesses have
expedited triage times, and are taken to the rooms for treatment as soon as
possible. Allocation of rooms to patients uses the following strategy: First send
incoming patients to pod 1, and when it’s full (all seven rooms are occupied), the
next patient will be sent to pod 2 until it fills up, and so on. In the meantime, if
a patient has been discharged from pod 1, the next patient to enter the system
will be taken to pod 1. This is done so that the minimum numbers of pods
are open at any given time, which helps the hospital control costs and staffing.
Patients leaving the ED are considered to have left the ED, regardless of whether
they leave the hospital.
The key measures that STBH management are looking for are:
• ATWA: Average time in waiting area (average across all types of patients
entering the system via walk in).
• NBT: Number of blood tests conducted.
• ATB: Average time for blood test.
• A1TS, . . . , A5TS: Time in system for each of the 5 acuity levels.
STBH management is particularly interested in six scenarios (other scenarios
may also be evaluated):
1. Model a day when the staffing of the hospital is lower than the usual level
(10 nurses instead of 12), and there happens to be a mass accident like a
train or plane crash so about 54 patients of acuity 4 and 5 are brought to
the ED.
2. Model a period when all the nurses are present but we have roughly 72
more patients of acuities 1, 2, and 3 entering the system during a period of
two and a half days. This scenario could be one where a minor epidemic
occurs and many people have sore throats, headaches, or upset stomachs.
3. Compare a regular week to one where the staffing is low (one nurse per
pod) and where the number of patients coming into the hospital is also
lower than the norm (200 fewer patients for the week).
4. Compare the normal running of the ED in a week where the service times
for all the patients increase by 10% throughout.
Remove Watermark Wondershare
PDFelement
5. Model a weekend (after a normal week) with staffing levels of one nurse
per pod.
6. Model a period where there is a virus and the ED has 120 patients of acuity
1 and 2 enter over three days. Assume a staffing level that is lower than
normal, i.e., there are three pods with two nurses each and the remaining
three pods have only one nurse each. Since this involves a virus, assume
that 90% of the patients will have blood tests.
Acknowledgments: Simply The Best Hospital is based on a project by Karun
Alaganan and Daniel Marquez to solve problems for an actual hospital. This
project was completed as a major part of a graduate-level introductory simulation
course at the University of Pittsburgh.
Remove Watermark Wondershare
PDFelement
Appendix B
Twice each year Simio sponsors a simulation contest to challenge students across
the world to solve real problems derived from challenges faced by Simio customers.
This has rapidly grown be the largest such competition with about 4000 students
from over almost 1000 teams competing each year. The problems not only
challenge student model-building skills, but also require some creativity, project
management, and even video production and presentation skills. Students
find participation to be both interesting and valuable and winners often find
themselves with attractive career choices.
If you would like to challenge yourself by competing, you can find out more at
http://www.simio.com/academics/StudentCompetition (Figure B.1).
These Simio problems feature a wide variety of domains and challenges. If you
would like an interesting project or practice problem, we have included some of
the contest problem summaries here. If any of these pique your interest, you
can find the full problem text at http://www.simio.com/academics/StudentC
ompetition/problem-archive.php.
527
Remove Watermark Wondershare
PDFelement
unloading. This “as-is” model will provide a baseline for evaluating improvement
strategies for the system.
The second and most important part of this project is to develop and evaluate
alternative strategies – such as pooling the vessels into a common fleet servicing
all locations – to develop a “to-be” system that lowers the overall cost while
maintaining the same high service levels. The project results will be judged both
on the quality of the simulation models as well as the overall effectiveness/cost
of the proposed “to-be” system.
The process currently has two established product types and the company plans
to add a new product type to the process. The addition of a third production
line is also driving the need to evaluate the production plan.
This manufacturer would like to evaluate the optimal production plan of going
from the current state of two production lines, to a future state of two or three
lines and a new throughput rate. We will be evaluating different demand
profiles, line allocation strategies, resource allocation strategies, and production
policies such as how to address traveled work.
varies seasonally.
The consortium would like a representation of the present system as well as the
proposed system so they can evaluate the potential required investment, best
operational parameters, and expected savings.
strategy for managing their warehouse which optimizes labor utilization and
minimizes missed customer delivery goals. The wave picking strategy should
include the ideal size of a wave based on order attributes, unit locations, and
acceptable picking receptacle. The criteria that places orders in the same wave
should also be investigated. Additionally, the MDC would like to identify any
warehouse re-zoning that would benefit the waving processes. The MDC is
hoping for a set of rules that helps future formulation of waves.
Appendix C
The the online version of this book offers some opportunities and challenges
different than the print version. This appendix provides some tips on under-
standing the meaning behind the formatting, using the toolbar, obtaining the
best Simio software to meet your needs, and locating the files and other resources
referenced in this book.
537
Remove Watermark Wondershare
PDFelement
The first (leftmost) button on the GitBook toolbar toggles the visibility of the
sidebar (e.g., the table of contents). You can also hit the S key on your keyboard
to do the same thing. The GitBook style remembers the visibility status of the
sidebar, e.g., if you closed the sidebar, it will remain closed the next time you
open the book. In fact, the GitBook style remembers many other settings as
well, such as the search keyword and the font settings.
The second button on the toolbar is the search button. While you might be
accustomed to using the built-in search in your browser, the toolbar search has
the important ability to search the entire book rather than just the currently
opened page. Its keyboard shortcut is ‘f’ (Find). When the button is clicked,
you will see a search box at the top of the sidebar. As you type in the box, the
sidebar will be filtered to display the sections that match the search keyword.
Then you can use the Up/Down arrow keys to highlight the previous/next match
in the search results. When you click the search button again (or hit f outside
the search box), the search keyword will be emptied and the search box will be
hidden.
The third button is for font/theme settings. You can change the font size (bigger
or smaller), the font family (serif or sans serif), and the theme (White, Sepia, or
Night) to the settings you find easiest to read.
The fourth button on the toolbar is the information (‘i’) button that lists
keyboard shortcuts available to navigate the document.
On the right of the toolbar, there are buttons to share a link to the selected
chapter on social network websites such as Twitter, Facebook, and Linkedin.
We encourage you to share book content with anyone who might find it to be
helpful. Simio does not collect any information about your social media account
or your contacts.
Bibliography
Albright, S., Winston, W., and Zappe, C. (2009). Data Analysis and Decision
Making With Microsoft Excel. South-Western Cengage Learning, Mason, Ohio,
revised third edition.
Askin, R. and Standridge, C. (1993). Modeling and Analysis of Manufacturing
Systems. Wiley, New York.
Banks, J., II, J. C., Nelson, B., and Nicol, D. (2005). Discrete-Event System
Simulation. Pearson Prentice Hall, Upper Saddle River, New Jersey, fourth
edition.
Biller, B. and Nelson, B. (2005). Fitting time series input processes for simulation.
Operations Research, 53:549–559.
Birtwistle, G., Dahl, O.-J., Myhraug, B., and Nygaard, K. (1973). Simula
BEGIN. Auerbach, Philadelphia, Pennsylvania.
Boesel, J., Nelson, B., and Kim, S. (2003). Using ranking and selection to “clean
up” after simulation optimization. Operations Research, 51:814–825.
Box, G., Jenkins, G., and Reinsel, G. (1994). Time Series Analysis: Forecasting
and Control. Prentice Hall, Englewood Cliffs, New Jersey, third edition.
Components, V. (2015). Factory simulation and the internet of things.
https://www.visualcomponents.com/insights/articles/factory-simulation-
internet-things/.
Conway, R., Maxwell, W., McClain, J., and Thomas, L. (1988). The role of
work-in-process inventory in serial production lines. Operations Research,
35(2):229–241.
Devroye, L. (1986). Non-Uniform Random Variate Generation. Springer-Verlag,
New York.
Erlang, A. (1909). The theory of probabilities and telephone conversation. Nyt
Tidsskrift for Matematik, 20.
Erlang, A. (1917). Solution of some problems in the theory of probabilities of
significance in automatic telephone exchanges. Elektrotkeknikeren, 13.
543
Remove Watermark Wondershare
PDFelement
544 BIBLIOGRAPHY
Evans, M., Hastings, N., and Peacock, B. (2000). Statistical Distributions. Wiley,
New York, second edition.
Gartner (2009). Gartner identifies the top 10 strategic technologies for 2010.
Gartner Symposium/ITxpo.
Gartner (2012). Gartner identifies the top 10 strategic technology trends for
2013. Gartner Symposium/ITxpo.
Gleser, L. (1985). Exact power of goodness-of-fit tests of kolmogorov type
for discontinuous distributions. Journal of the American Statistical Society,
80:954–958.
Glover, F., Kelly, J., and Laguna, M. (1999). New advances for wedding
optimization and simulation. Proceedings of the 1999 Winter Simulation
Conference, pages 255–260.
Glover, F. and Kochenberger, G., editors (2003). Handbook of Metaheuristics.
Kluwer Academic Publishers, Norwell, Massachusetts.
Gross, D., Shortle, J., Thompson, J., and Harris, C. (2008). Fundamentals of
Queueing Theory. Wiley, Hoboken, New Jersey, fourth edition.
Harrod, S. and Kelton, W. (2006). Numerical methods for realizing nonstationary
poisson processes with piecewise-constant instantaneous-rate functions. Simu-
lation: Transactions of The Society for Modeling and Simulation International,
82:147–157.
Hopp, W. and Spreaman, M. (2008). Factory Physics. McGraw Hill, New York,
New York.
International, M. (2018). Business to manufacturing markup language (B2MML).
http://www.mesa.org/en/B2MML.asp.
ISA-95.com (2016). Business to manufacturing markup language (B2MML).
https://isa-95.com/b2mml/.
Jackson, J. (1957). Networks of waiting lines. Operations Research, 5:518–521.
Johnson, N., Kemp, A., and Kotz, S. (2005). Univariate Discrete Distributions.
Wiley, New York, third edition.
Johnson, N., Kotz, S., and Balakrishnan, N. (1994). Continuous Univariate
Distributions, volume 1. Wiley, New York, second edition.
Johnson, N., Kotz, S., and Balakrishnan, N. (1995). Continuous Univariate
Distributions, volume 2. Wiley, New York, second edition.
Kelton, W. (2006). Implementing representations of uncertainty. In Henderson,
S. and Nelson, B., editors, Handbook in Operations Research and Manage-
ment Science, Vol. 13: Simulation, pages 181–191. Elsevier North-Holland,
Amsterdam, The Netherlands.
Remove Watermark Wondershare
PDFelement
BIBLIOGRAPHY 545
Little, J. (1961). A proof for the queuing formula l = λw. Operations Research,
9:383–387.
Little, J. (2011). Little’s law as viewed on its 50th anniversary. Operations
Research, 59:536–549.
546 BIBLIOGRAPHY
BIBLIOGRAPHY 547
Song, E., Nelson, B., and Pegden, C. (2014). Advanced tutorial: Input uncertainty
quantification. Proceedings of the 2014 Winter Simulation Conference, pages
162–176.
Stidham, W. (1974). A last word on l = λw. Operations Research, 22:417–421.
Sturrock, D. (2012a). New solutions for production dilemmas. Industrial Engineer
Magazine, 44:47–52.
Sturrock, D. (2012b). Simulationist bill of rights. Success in Simulation Blog.
Swain, J. (2015). Simulated worlds (simulation software survey). OR/MS Today,
42(5).
Tukey, J. (1977). Exploratory Data Analysis. Addison-Wesley, Reading, Mas-
sachusetts.
Wagner, H. (1969). Principles of Operations Reserach, With Applications to
Managerial Decisions. Prentice Hall, Englwood Cliffs, New Jersey.