Académique Documents
Professionnel Documents
Culture Documents
David Krahl
Imagine That Inc.
Robin Clark
The Quantitative Modeling & Training Group
ExtendSim 8 Edition
Imagine That Inc. San Jose
Copyright 2010 Imagine That Inc. San Jose, California 95119. All rights reserved. Printed in the United States of America. This publication is protected by copyright. You may not copy, transmit, or translate this publication or any part of this publication in any form or by any means, electronic or mechanical, including photocopying, recording, or information storage and retrieval systems, for any purpose other than your personal use without the express written permission of Imagine That Inc. For information regarding permission, write to the publishers Rights and Permissions Department at the address below.
Trademarks
Imagine That!, the Imagine That logo, ExtendSim, Extend, and ModL are either registered trademarks or trademarks of Imagine That Incorporated in the United States and/or other countries. Mac OS is a registered trademark of Apple Computer, Inc. Microsoft is a registered trademark and Windows is a trademark of Microsoft Corporation. All other names used in this publication are the trademarks of their respective owners.
Published by
Imagine That Inc. 6830 Via Del Oro, Suite 230 San Jose, CA 95119 USA www.ExtendSim.com ISBN: 978-0-9825040-2-4
Contents
Preface How to Use This Book About ExtendSim About the Authors Part I Introduction to Discrete Event System Simulation
1 Introduction to Simulation ............................................................................................3
1.5 Some Recent Applications of Simulation........................................................................................ 3 1.7 Components of a System ................................................................................................................. 4 1.10 Types of Models ............................................................................................................................ 6
ii
Table of Contents
4.3 An Example Simulation...................................................................................................................31 4.7 Simulation Environments ................................................................................................................33 4.8 Experimentation and Statistical-Analysis Tools ..............................................................................33
6 Queueing Models...........................................................................................................45
6.1 Characteristics of Queueing Systems ..............................................................................................45 6.2 Queueing Notation...........................................................................................................................48 6.3 Long-Run Measures of Performance ...............................................................................................48
Part V Appendices
A Getting Started with ExtendSim ....................................................................................69
A.1 Using an Existing Model ................................................................................................................69 A.2 Creating a new model .....................................................................................................................76 A.3 Other resources ...............................................................................................................................83
B Random Distributions...................................................................................................85
B.1 Blocks For Generating Random Numbers ......................................................................................85 B.2 Distributions in ExtendSim .............................................................................................................86
Preface
The objective of this book is to complement and supplement the fifth edition of the textbook Discrete-Event System Simulation (Banks, et al.), herein referred to as the DESS text. The two books are designed to be used together in both introductory and project-based simulation courses. Long a standard in introduction to simulation courses for upper-level undergraduates and master-level graduates, the DESS book provides an in-depth discussion of the important aspects of discrete-event simulation. The DESS text, however, is independent of any simulation language or application. And although it uses Excel-based examples to introduce simulation in a familiar environment, simulation is best taught using simulation software. As stated in the DESS book: While Excel is useful for teaching simulation concepts, for demonstrating the effect of statistical variability, and especially for analyzing and presenting results, it has severe limitations as a basis for simulation itself. This companion publication uses the ExtendSim simulation software as a pedagogical tool to explain the principles and concepts discussed in the DESS book. This use of a modern simulation tool makes simulation concepts more easily communicated by instructors and more accessible to students. This is especially useful since students are likely to encounter ExtendSim when they move from academia into corporate or government environments. ExtendSim for Discrete-Event System Simulation adheres to the layout of the 5th edition of the DESS text while providing easy-to-use and informative ExtendSim implementations of DESS examples. It also includes selected solutions to end-of-chapter exercises and an ExtendSim tutorial specifically designed for the DESS book. Together the two books serve as a useful tool when teaching two types of courses: 1. Introductory simulation courses in engineering, computer science, and management 2. A second course in simulation, when outside projects are added to the textbook material
iv
Preface
An additional benefit is that the limited version of the ExtendSim software that accompanies this text remains useful for small simulation projects even after the course has been completed. For more information, see also: How to Use This Book on page v About ExtendSim on page vii Getting Started with ExtendSim on page 69
This publication adheres to the layout of the 5th edition of Discrete-Event System Simulation (the DESS text) by Banks, Carson, Nelson, and Nicol. While the DESS text will provide most of the reading material, this publication complements and supplements it, aiding the instructor and student in their use of the DESS chapters.
Phraseology
Before proceeding, it is important that you understand how some words are used in this text: This text and these authors. The phrase this text always means the current book ExtendSim for Discrete-Event System Simulation. Likewise, these authors refers to the authors of this text. The DESS text. The textbook Discrete-Event System Simulation by Banks, et al. is referred to throughout this text as the DESS text. [ ]. The use of square brackets ([ ]) in a title indicates that some text has been omitted from or substituted into the original DESS title. For instance, chapter 2 of the DESS text is titled Simulation Examples in a Spreadsheet. Since this text uses ExtendSim for those examples, the corresponding chapter in this text is titled Simulation Examples []. ExtendSim. As discussed in ExtendSim packages on page viii, there are four ExtendSim products available as a full version. A limited version is also available; it includes all four products and is called ExtendSim LT. Since it is unknown which product is being used, and whether it is a full or a limited version, for purposes of this text the authors just use the word ExtendSim.
vi
Extend. Prior to the version 7 release in 2007, ExtendSim was called Extend. Both names can be used in web searches for case studies, references, and so forth, as well as when reviewing publications.
Organizational Structure
As is the DESS text, this book is divided into several parts:
Part I: Introduction to Discrete-Event System Simulation Part II: Mathematical and Statistical Models Part III: Random Numbers Part IV: Analysis of Simulation Data
Recommended Sequence
Unless otherwise noted, these authors suggest that you read each section in this text along with reading the corresponding section in the DESS text. With that in mind, there is some duplication between the texts. Hopefully it is sufficient enough that the reader can get a better grasp of the material without having to endure too much redundancy.
Other Resources
In addition to this text and the interface to the DESS files (DESS QuickStart): 1. The ExtendSim 8 Addendum, User Guide, and Developer Reference are useful resources. All ExtendSim products include these manuals as eBooks; they are located in the ExtendSim\Documentation folder. The store at www.ExtendSim.com/store/ also has printed versions of these manuals available for purchase. 2. For Instructors, additional material is located on the ExtendSim Exchange (http:// www.extendsim.com/forums), a forum for ExtendSim modelers. See the DESS Textbook section within the Academic category at the bottom of the main page. You must register to log into the ExtendSim Exchange. Access to the DESS Textbook and Instructor forums is limited to those who are teaching a class and have been pre-approved.
About ExtendSim
ExtendSim is the family name of four simulation software tools used to build continuous, discrete event, discrete rate, and agent-based models as well as perform 3D animations of simulation models. (The four products are described in ExtendSim packages on page viii.) The ExtendSim products are used to develop dynamic models of real-life processes in a wide variety of fields. The process involves creating models from building blocks, exploring the processes involved, analyzing how they relate, then changing assumptions to arrive at a superior solution.
viii
About ExtendSim
ExtendSim packages
ExtendSim is available in either a full-featured version or as a limited version. 1. There are four full-featured ExtendSim products that used by private enterprises and governmental entities. ExtendSim CP is the base product and each succeeding package adds modules designed for specific markets: ExtendSim CP is used for continuous modeling. ExtendSim OR is for researching operational performance. It adds a discrete-event module and capability to the continuous features found in ExtendSim CP. ExtendSim AT is designed for the modeling and analysis of complex systems. It adds advanced technologies such as scenario management, resource management, and rate-based modeling capabilities to the discrete-event and continuous capabilities of ExtendSim OR. ExtendSim Suite adds the capability to animate a simulation model in 3D; it also has all the features of ExtendSim AT. 2. The ExtendSim LT is a limited version of all four ExtendSim products described above. With its limited model size and low cost, it is appropriate for students doing coursework.
DAVID KRAHL is Vice President of Technical Sales with Imagine That Inc. Over the past 20 years he has been involved with all aspects of the simulation industry including training, consulting, support, development, and technical sales. He has worked extensively with a range of simulation programs including ExtendSim, SLAM II, TESS, Factor, AIM, GPSS, SIMAN, XCELL+ and MAP/1. He has taught the System Simulation course at Golden Gate University and consulted in the areas of manufacturing, communications, health care, and transportation for corporate clients. In addition, he has authored or co-authored numerous papers on simulation modeling, including how to debug models, simulation architecture, education and training, and the ExtendSim modeling environment. Actively involved in the simulation community, he has served as Publicity and Vendor Track Chair for past Winter Simulation Conferences and is working on the Conference Committee for the Simulation Solutions Conference. He received an MS in Project and Systems Management in 1996 from Golden Gate University and a BS in Industrial Engineering in 1986 from the Rochester Institute of Technology. He is a member of the Institute of Industrial Engineers (IIE) and INFORMS. His email address is DaveK@ExtendSim.com. ROBIN CLARK is a co-founder and partner at the Quantitative Modeling & Training Group (QMT) which offers advanced lean and simulation courses as well as coaching services. At QMT he is a simulation instructor, model builder, and block-level developer. As part of his consulting practice he has designed custom components and built numerous simulation models for clients in the areas of health care, pharmaceutical manufacturing, automotive manufacturing, consumer goods manufacturing, and supply chains. Although he has spent considerable time modeling processes, his primary passion is teaching and mentoring students. He has developed several webbased and face-to-face simulation courses including graphical simulation databases, simulation development environments, rate-based modeling, and simulation modeling for health care. In the
last 8 years he has trained over 400 beginner and advanced simulation students to use the ExtendSim simulation software. He has a BS in Physics from Tennessee Technological University and an MS in Management Science from the University of Tennessee. He is a member of the American Society for Training and Development (ASTD), the Society of Manufacturing Engineers (SME), the Institute of Industrial Engineers (IIE), and the Association of Operations Management (APICS). His e-mail addresses is: Clark@QMTGroup.com.
Part I
Introduction to Discrete Event System Simulation
1
Introduction to Simulation
The first chapter of the DESS text is an excellent introduction to simulation. As discussed in detail in this chapter there are, however, three sections that deserve additional comments: 1.5 Some Recent Applications of Simulation 1.7 Components of a System 1.10 Types of Models
4 Components of a System
ExtendSim Case Studies & Papers, located at http://www.extendsim.com/ sols_papers.html. This site lists hundreds of published papers and case studies using Extend or ExtendSim; they are categorized so you can search by key word or by application area.
Entities
Chapter 1 of the DESS text defines an entity as ...an object of interest in a system while Chapter 3 expands upon that definition as ...any object or component in the system that requires explicit representation in the model (e.g., a server, a customer, a machine). In ExtendSim discrete-event models, the entities are referred to as blocks and items. Blocks represent the logic of the model while items are the basic units that are passed between blocks. I In ExtendSim continuous models, blocks still represent model logic; however, no items pass between continuous blocks. Instead, values in the blocks change when time changes. Blocks In ExtendSim, each portion of the process or system that is being modeled is represented by a block. Blocks have names, such as Activity or Queue, that signify the function they perform. A Queue block, for example, will have the same function in every model. Blocks can also be given labels; for instance, a specific Queue block might be labeled Waiting Line. A typical block is composed of the following: An icon that is a pictorial representation of its function, such as the icon of the Queue block shown to the right. Connectors that represent inflows and outflows. Connectors act as an interface with other blocks and are attached to a blocks icon. The Queue block icon at the right has item and value input and output connectors. Dialogs for entering values and settings and for viewing results. A blocks dialog is accessed by double-clicking the blocks icon. The dialog of the Queue block is shown below.
5 Components of a System
The code that determines how the block appears and behaves in the model. (By default block code is not visible to model builders. It is, however, open source and easily accessible by those who wish to program custom blocks.)
Figure 1.1 Queue block dialog Items Items are the things that are passed between blocks in discrete-event models. An item is an individual entity that represents an object or element of the system being modeled. In manufacturing models, items might be parts on an assembly line; in network models, an item would be a packet of information; in business models, items could be invoices or people. Items can only be in one place at a time. They have a life cycle in which they are created, transformed, and eventually destroyed. They change state (physically move, are delayed, or have their properties altered) only when events occur, such as a customer arriving, parts being assembled, and so forth.
6 Types of Models
resents a group of items. An item group will travel and be processed as one item until decomposed into individual items. An item can have only one quantity assigned to it. If 3D animation is used, a 3D ObjectID property is created to reference the 3D object that corresponds to an item. Each item has an item index property that uniquely identifies it. Typically this is only used when programming new blocks or modifying existing blocks. Blocks Each block has a dialog that can be accessed by double-clicking its icon. The attributes of a block are its dialog parameters. For example, an Activity block has a specified activity time and a Queue has a maximum capacity.
Summary
This table summarizes the information about entities and attributes in ExtendSim.
Discrete-rate modeling
Processes that are event driven, rather than time driven, do not lend themselves to continuous modeling. Yet systems where there is no thing that can be identified and tracked, or where there are so many things that identification is meaningless, are not well suited to discrete-event modeling. In these situations, discrete-rate modeling is a more natural fit compared to using continuous or discrete-event modeling. ExtendSim discrete-rate models are a unique third type of modeling that combines the ratebased capabilities of continuous models in an event-based environment. While typically running faster than discrete-event models, discrete rate modeling also eliminates the rounding errors caused by mismatches between continuous time steps and discrete events. In this method, accurate answers
7 Types of Models
are more quickly achieved [Damiron, 2008]. This model type is especially useful for simulating any system or process that has flows, rates, events, constraints, storage capacity, and routing. As is true of continuous models, state variables in discrete-rate models depend on rates the level of inventory, the number of riders, and so forth. The primary difference is the event mechanism driving the changes to state variables. In continuous simulations, the state variables change at equal time intervals during a simulation run. These state-change events are externally imposed by the modeler and thus are independent of the system behavior. However, in discrete-rate simulations, as in discrete-event models, the state variables only change at discrete points in time. (For discrete-event the state variables change when events occur; for discrete-rate they change when their associated flow rates change.) These state-change events are internally generated by the model and thus are dependent on the behavior of the system being modeled rather than on a models artificial time step. In an ExtendSim discrete-rate model, quantities of flow (material, product, data, and so forth) are located in one or more parts of the model. During the simulation run, the flow moves from one location to another at a certain speed known as the effective rate.The movement between blocks that hold or route the flow follows paths, rules, and constraints that are set in the model. Behind the scenes, the model is divided into areas where the included blocks are part of a global system. The blocks within each area communicate through an internal linear program (LP) that provides the global oversight for that area. Each block in an LP area contributes a part of the LP equation for the area; the result of the LP calculation is the effective rate for that part of the model. This global oversight of calculations is unique to ExtendSim; it preserves mass balance while resolving contentions when flows are merged or diverged, such as in feedback loops I Discrete-rate modeling is available in the ExtendSim AT and ExtendSim Suite products, as well as the ExtendSim LT version.
.
Agent-based modeling
Chapter 4, Section 4.1.7 of the DESS text discusses the future of simulation, including ...a major adoption of agent-based modeling in discrete-event modeling. While agent-based modeling has already been used to simulate collective behavior and social phenomenon, many simulation experts anticipate its increased use in industrial and commercial simulations. The behavior of many systems and processes are known or can be estimated in advance. In some cases, however, that information may not be available. In these situations, agent-based mod-
8 Types of Models
eling is used to obtain that information from the interactions of the agents in a model. Agent-based modeling is independent of continuous, discrete-event, and discrete-rate modeling. Agent-based modeling is concerned with individual entities (called agents) that interact with other agents within their specified locality. Agents may be people, animals, organisms, and so forth. All the agents have a set of rules to follow but they also have a degree of autonomy such that model dynamics cannot be predefined. This is because agents can have intelligence, memory, social interaction, contextual and spatial awareness, and the ability to learn. The object of agent-based modeling is to examine the patterns of behavior that emerge from the interactions of individual agents. In every simulation product the agents used in agent-based modeling must be custom-programmed; in ExtendSim this is accomplished by programming one or more blocks. ExtendSim contains several categories of functions that are helpful when creating agents. For instance: Scripting functions are used for creating, placing, moving, and connecting blocks and then populating them with data Block and inter-block communication functions query the status of a block and get information about block dialog values and data table settings Message sending functions can use the results of inter-block communications to send messages globally to unconnected blocks or to blocks that are connected in specific ways. The standard Boids model of flocking behavior is located at ExtendSim\Examples\3D Animation; it is animated in 3D. Sheep and Wolves is an example of a 2D agent-based model; it is located in the folder ExtendSim\Examples\Agent Based. I Agent-based modeling is available in every ExtendSim product. For more information about agent-based modeling, see the ExtendSim User Guide [Imagine That Inc., 2007].
References
Damiron, C., and A. Nastasi [2008], Discrete Rate Simulation Using Linear Programming in Proceedings of the 2008 Winter Simulation Conference, S. J. Mason, R. R. Hill, L. Mnch, O. Rose, T. Jefferson, and J. W. Fowler eds, Miami, FL, Dec. 7-10, pp. 740-749. Piscataway, NJ: IEEE, Inc. Imagine That Inc. [2007], ExtendSim User Guide, Seventh Edition.
2
Simulation Examples []
The DESS text uses Excel-based examples as a convenient and familiar method to introduce simulation concepts. However, the authors of the DESS text acknowledge that Although some types of real-world models, such as those for risk analysis and financial modeling, some reliability problems and others, are amenable to a spreadsheet model, the spreadsheet has severe limitations for most complex real-world dynamic, event-based simulations. Since you are using this companion text it is assumed that you prefer to use a dedicated simulation tool to teach/learn simulation concepts. Notice that ExtendSim can comfortably be used not only for Chapter 2s dynamic models that track events over time but also for its continuous process, Monte Carlo models. As discussed in About ExtendSim on page vii, ExtendSim is actually a family of four products. Each successive product adds some capability to the base product ExtendSim CP which is used for continuous and Monte Carlo modeling. Thus each ExtendSim product also has the capabilities necessary for Monte Carlo models. Although the examples in this chapter use ExtendSim rather than a spreadsheet, they directly correspond to the examples in Chapter 2 of the DESS text. The exercises at the end of this chapter, however, are necessarily specific to ExtendSim. As were the spreadsheet examples of the DESS text, the simulation models shown in this chapter have been designed for the problem at hand, to provide an introduction to some key simulation methodology elements. There are corresponding models located in the folder ExtendSim\Examples\DESS Book.
Figure 2.1 Selecting a Distribution in the Create block For a list of ExtendSim blocks that generate random numbers, and a table of the built-in distributions, see Random Distributions on page 85.
Opening and running an example model The default location for the example models for this chapter is ExtendSim\Examples\DESS Textbook\Chapter2. You can also open the models using the DESS QuickStart file as discussed on page 71. Unless you have used ExtendSim before, see Using an Existing Model on page 69 for a short tutorial on how to open and run a model. Model controls No matter which modeling type (continuous, discrete event, etc.) is used, ExtendSim models are typically composed of blocks that are connected together, with dialogs for entering values and changing settings. Models often have a user interface for controlling the model and viewing results; linking to one or more databases is also common. As with the spreadsheets described in the DESS text, each ExtendSim DESS example model contains information about the model, a means to specify settings and run the simulation, and an automated method for reporting results. The exercise solutions do not have these properties. For the example models, model control and reporting is accomplished through a combination of a button interface and the use of ExtendSim databases to record the inputs, outputs, and pertinent measures of system performance. While not all the models in this text will contain all of the following, the common controls you will see when you open an example model are shown below.
Figure 2.2 Common Controls for DESS Example Models Run Trial. Runs the simulation once. This is equivalent to giving the command Run > Run Simulation or clicking the Run Simulation button in the ExtendSim toolbar. Unless a seed is used, the run uses a new random number sequence each time the button is clicked. Run Experiment. Makes one run of the experiment, executing the number of simulation trials entered in the Number of Trials field, discussed below. Unless a seed is used, the experiment uses a different random number sequence each time the button is clicked. The results of each run are summarized in a data table and displayed in a Histogram. Explain. Contains the definition and specifications of model inputs. Results Table. If the Run Trial button is clicked, records the result of that trial in an ExtendSim database table. If the Run Experiment button is clicked, records the result of each trail in the experiment into an ExtendSim database table. Experiment Results. Displays statistical information about the experiment, such as mean, variance, and so forth.
Animation On. Controls whether 2D animation runs while the simulation is running. Running with animation on provides a more visually descriptive representation of what is happening in the model but significantly slows the run. Number of Trials. The number of simulation runs for one Experiment. The Trial Number immediately below this control displays the number of the trial that is currently being executed. (Note that the final Trial Number for the Experiment will be one less than the Number of Trials, since the first trial is always #0.) Set Random Seed To. Allows you to select whether a particular run (Trial or Experiment) uses a fixed or random seed. By default a fixed seed has the arbitrary value of 12,345; to change the seed, enter a different value in the parameter field. A trial is one run of a simulation. For each trial you can choose that it either uses a new sequence of random numbers each time or a fixed seed such that the results are repeatable. An experiment runs a specified number of trials or replications, for example 100 trials. Experiments can also use either a new sequence of random numbers for each experiment or a fixed seed such that each experiment is repeatable. If you give the command Run > Run Simulation, or click the Run Simulation tool in the toolbar, the simulation will run just one time.
The tutorial section Add a user interface (optional) on page 81 will show how to add controls
to your own models. Model structure The ExtendSim models are designed to illustrate the examples of the DESS text. While discrete-event simulation models always step through the events of the simulation, for efficiency, the event times are not recorded. A typical real-world model could have millions of events, so recording every event would not be practical. For the book examples we have added a database table and some extra blocks to record the details of what happens during the simulation run. These extra blocks are contained in hierarchical blocks, reducing the complexity of the top level of the model worksheet.
See Using an Existing Model on page 69 for how to open and run this model.
Figure 2.3 Coin Tossing Model Each time the Run Trial button is clicked the model calculates 10 coin tosses. For each toss: A Random Number block generates a random number between 0 and 1. It does this using the Uniform Real distribution where the minimum is 0 and the maximum is 1. A Decision block compares the random value to 0.5. If it is greater than 0.5, the result is heads; otherwise it is tails. Thus each outcome, heads or tails, has a probability of 0.5 of occurring. The number of heads and tails are accumulated in two Holding Tank blocks, one for heads and one for tails. A Write block writes the toss number, random value, and whether the result was heads or tails to a database table, which is displayed on the model worksheet.
Figure 2.4 Random Service Times Model Each time the Run Trial button is clicked: The Random Number block uses an Empirical table to generate just three discrete values of service time. The service times are 3, 6, or 10 minutes and the probabilities of those times occurring are 30%, 45%, and 25%, respectively. A Simulation Variable block provides the record number for the Write block, which writes the random value to a database table. A Histogram is used to plot the distribution of the service times. Notice that the Random Number block automatically indicates if the cumulative probability for the service times does not equal 1. It does this by displaying the error in red in the bottom scrollbar of the Value/Probability table.
Figure 2.5 Random Arrival Times Model Each time the Run Trial button is clicked: Calls are generated at random times by the Create block. The block uses a Uniform, Integer distribution with a minimum of 1 minute and a maximum of 4 minutes to specify the time between call arrivals (TBA). The Information block counts the calls and calculates the time between them. Caller number, interarrival time, and arrival times are written to a database table by the Write block. The Exit block disposes of the calls. A Histogram is used to plot the distribution of the interarrival times. Note that the number of calls is limited to 25 by connecting from the Exit block to the Executive blocks Count input.
into block dialogs. (However, in some cases the DESS models have a database table that is somewhat equivalent to a simulation table in that it stores system states.) ExtendSim handles clock times automatically, based on the events that occur in the model and the start time and end time entered in the Run > Simulation Setup dialog. Model responses, which are computed using model outputs, are often automatically calculated by ExtendSim. For instance, in the Random Arrival Times model (Example 2.3), the average time between call arrivals is calculated by the Information block and reported on its Statistics tab.
17 Queueing Simulation []
Figure 2.8 Histogram of Single-Server Queue Experiment Note that this histogram does not show individual caller delays but rather the average delay for each of the 50 trials. This model is set to run until 100 customers have checked out. See Example 3.3: Single Channel Queue on page 26 for an example of the same model that runs for just 60 minutes.
18 Inventory Simulation []
take incoming calls and answer questions. Being more experienced, Able provides service faster than Baker. In this model, calls: Arrive at the Create block Wait at the Queue Are routed to either Able or Baker (Able preferred) through the Select Item Out block Answered by Able or Baker in one of the two Activity blocks Leave through the Exit While the animation provides insight into how the model works, the simulation will run much faster with animation off. One trial is 100 completed calls and one experiment is 400 trials. The objective is to estimate how long callers are put on hold while waiting for service. As was true for Example 2.5 (The Grocery Checkout), this model has additional blocks, within hierarchical top-level blocks, that record detailed simulation information to the database table. Some of the results from one trial is below.
19 Inventory Simulation []
Figure 2.10 News Dealers Inventory Problem Model The day item arrives at the Create block and is assigned a random Newsday attribute by the Random Number and Set blocks. The attribute can be good, fair, or poor. An Equation(I) block calculates the demand, lost gain, scrap, and number sold. A Constant block provides the number of newspapers purchased per day. A second Equation(I) block calculates additional results. A hierarchical block (Calculate Costs) uses these results to determine the total cost for the news dealer. One trial is 20 days; one experiment is 400 trials. Since this model uses items to represent days, and attributes to specify the unique characteristic of each day, it is a discrete-event model. The system could also have been simulated as a continuous model, as is done in Example 2.8.
Random Number blocks specifying the demand, initial inventory, review period, lead time, and maximum inventory.
Figure 2.11 Database Table for (M,N) Inventory Policy Model Clicking the Run Trial button runs the simulation for 25 days; the Run Experiment button runs 100 trials.
Figure 2.12 Bearing Replacement Policy A fixed number of bearings are introduced in the Resource Item block. The initial operating time attribute is assigned at a Set block. The bearings are delayed in an Activity until they fail. Thus the duration of the activity is the time between failure. Bearings can be preempted from the Activity if the policy is to replace all of the bearings at once. The Repair person is represented by items in a Resource Item block. When a bearing fails, the repair person is released by a Gate block and is delayed by an Activity block (Travel Time). Once the repair person item arrives to the site, it is batched with the failed bearings The delay in the Repair Activity represents the amount of time required to repair; that varies by the number of bearings to repair. When the repair is completed, the bearings and repair
person items are unbatched from each other. The bearings begin another time between failure and the repair person waits for another bearing failure. Cost statistics are calculated in a hierarchical block.
Figure 2.14 Frequency of Lead-time Demand The model uses four Random Number blocks to generate random values for the lead time as well as the demand for days 1 through 3. An Equation block uses these values to calculate the lead time demand. The Equation also records the historical results of the simulation in a database table.
3
General Principles
The preceding two chapters of the DESS text discussed simulation in general and provided some examples, including Monte Carlo, continuous, and discrete-event models. Going forward, the focus will be entirely on discrete-event simulation. As stated in the DESS text, discrete-event simulation ...is the modeling over time of a system all of whose state changes occur at discrete points in timethose points when an event occurs. Chapter 3 of the DESS text explains: The concepts underlying all discrete-event software Event scheduling The modelers world view: event scheduling, process interaction, or activity scanning List processing
Entities As mentioned in Entities on page 4, an object in an ExtendSim model is called an item while a component of the system is represented by a block. For instance, a customer/item could arrive at a checkout counter/Activity block, or a part/item could be processed by a machine/Workstation block. Attributes ExtendSim items can have properties, such as attributes and priorities, assigned to them. Attributes and other properties enable an item to be explicitly identified and uniquely identifiable in the model. See also Attributes and other properties on page 5. List In the DESS text a list is also called a set, a queue, or a chain. In an ExtendSim model the list is referred to as a queue of items, which is most often represented by the Queue block. Depending on the sort method chosen in the Queues dialog, items can be ordered as first in, first out; last in, first out; or based on an items priority or attribute value. The Queue Equation block provides even greater flexibility, allowing items to be sorted and released based on a user-defined equation. The Queue blocks provide information about the current number of items in the queue, how many items were left in the queue at the end of the simulation, the duration of their stay, and so forth. Behind the scenes, the ExtendSim simulation mechanism stores information abut items in a set of dynamic arrays and linked lists. This type of list is discussed more inList Processing on page 27. Event notice and event list ExtendSim uses a two-stage event calendaring method the Executive block maintains a list of all events for the model while each block that has a time delay associated with it (for example the Create and Activity blocks) maintains its own, independent next event time. The Executive maintains an event calendar of all the events posted by all the blocks in the model. Each block that has an event associated with it maintains its own list of internal events, posting the earliest event time to the Executive. At the beginning of each simulation event, the Executive locates the next future event and sends a message in sequence to each of the blocks that posted an event for that time. Once a block has completed its event, it posts its next event time to the Executive. Activity-type blocks can have multiple future events ongoing simultaneously one for each item in the block. These blocks maintain their own internal event calendar, posting only the earliest of these events to the Executives event calendar. Note that the next event time is always the lowest of all the event times for all the blocks in the model; this is how a discrete-event simulation works. Activity The DESS text defines an activity as an interarrival time, a service time, or any other processing time. These are somewhat separated in ExtendSim: To represent an interarrival time, the Create block generates items with a specified time between arrivals, or TBA.
In the ExtendSim activity-type blocks (Activity, Workstation, etc.) the specified duration of the processing or service time is called a delay. This is entered in the blocks Process tab and can be specified by a distribution or a constant, taken from the arriving items attributes, input through a connector, or calculated from a lookup table. Under most conditions, the Create block determines how long until an item arrives while the Activity blocks delay parameter determines how long the item is processed, due only to the blocks settings. However, ExtendSim contains logic constructs to cancel an event processing can be interrupted when an item is preempted or when block processing is shutdown. A preempted item results in a cancelled event; an item affected by a shutdown may or may not result in a cancelled event, depending on whether item processing resumes once the shutdown ends. Delay This is called the wait time in ExtendSim. It is a model output the total duration of time that an item waits due to model conditions. Notice that model conditions include, but are not limited to, the delay time that is specified by the blocks dialog. Other model conditions are not known in advance. The Activity and Queue blocks display their current, average, and maximum wait times in their Results tabs. The word delay is defined differently in the DESS text and in ExtendSim. In the DESS text, the activity is the specified processing or service time and the delay is how long the item actually waits due to model conditions. In ExtendSim, the delay is the specified duration of time and the wait time is the actual result as determined by model conditions.
Figure 3.1 Single Channel Queue Model 2. Example 3.4: The Checkout-Counter Simulation, Continued Since customers are already explicitly modeled and customer arrival times are already recorded, there are no changes required from Example 3.3. As the DESS text notes, ... in many simulation models, the information desired from the simulation... to some extent dictates the structure of the model. 3. Example 3.5: The Dump Truck Problem This model is a closed system where 6 dump trucks travel in a loop from loading dock to scale to loading dock again.
27 List Processing
Notice that the focus is on the utilization and other statistics of the loading area. Hence the model does not take into consideration the unloading operation.
References
Imagine That Inc. [2009], ExtendSim Developer Reference, Seventh Edition. Imagine That Inc. [2007], ExtendSim User Guide, Seventh Edition.
28 List Processing
4
Simulation Software
This chapter of the DESS text divides simulation software into three categories: General purpose programming languages, such as C++ and Java Simulation programming languages, such as GPSS/H and SIMAN V Simulation environments that combine a graphical user interface (GUI) with a simulation programming language (SPL). Most modern simulation packages are in this category. ExtendSim is a simulation environment. It integrates a graphical user interface and pre-built components for model building with a simulation language that can optionally be used to create custom components. The simulation environment category can be further divided into: General purpose simulation environments. These packages supply components for generalpurpose discrete event model building. While not oriented to any vertical market, they usually provide the ability to create custom components for a particular field or application area. ExtendSim is an example of a general purpose simulation environment. Specialized simulation applications. The model building environment of these packages is primarily focused on a specific vertical market, such as communication systems or manufacturing processes. ProModel and MedModel are examples of this type of package. Simulators that try to copy a specific experience. These typically do not provide for modelbuilding. Examples include flight and training simulators.
Animators that are focused on 3D animation. Animators require the modeler to think in terms of a 3D representation of the system when building the model, including the proper spatial orientation and physical dimensions of the system. When running, an animator always performs the calculations required to maintain the integrity of the 3D presentation, whether or not the animation is visible. While many general purpose and specialized simulation programs have 3D animation capabilities, their models operate properly even if 3D animation is not used.
into one block, nesting layers of submodels, graphics, and text within a model to facilitate re-use and reduce the appearance of complexity. This provides for a more accessible user interface, while maintaining the ability to drill down to see the models underlying details. Most modern simulation packages now include a multi-layer hierarchical capability.
32 An Example Simulation
Unless you have used ExtendSim before, see Using an Existing Model on page 69 for a short
tutorial on how to open and run a model. Example 4.1: The Checkout Counter is an illustration of a typical single-server queue. In ExtendSim this model is constructed using just five blocks. Executive Controls and does event scheduling for discrete event and discrete rate models. Normally this works automatically and the Executive would be just placed in the model somewhere to the left of all other blocks. For this model, the Executive is also used to count the number of customers and stop the simulation once 1,000 customers have been served. This is accomplished by checking an option in the Executive, then connecting from the Exit blocks Total Exited output connector to the Executive blocks Count input connector.
Figure 4.1 Executive Option Where the Count Ends the Simulation Create Creates items randomly or by schedule. For this model, the Create blocks dialog calculates the time between customer arrivals (TBA) based on an Exponential distribution with a mean of 4.5.
Figure 4.2 Dialog of the Create Block Queue Holds item/customers until there is downstream capacity. By default the Queue is a sorted queue and the default sort order is first in, first out. Activity Delays items for the specified amount of time. The model particulars are that the service times are normally distributed with a mean of 3.2 minutes and a standard deviation of 0.6. This is entered in the Process tab of the Activity blocks dialog.
33 Simulation Environments
Exit Removes item/customers from the simulation and counts them as they leave. A model output (the total number of customers) is used to determine when the simulation run ends, as discussed in Executive on page 32. Other Model Information So that you can easily change model inputs, the mean interarrival time and the mean service time have been cloned (virtually copied) to the model worksheet. (For an explanation of cloning, see Using a cloned parameter field on page 74.) Model results and responses are automatically calculated and displayed on each blocks Results tab. For instance, the Activity block reports the information shown below.
)
Figure 4.4 Results Tab of Activity Block As discussed above, this information can also be cloned to the worksheet. For a complex model, the inputs and outputs can be stored in an ExtendSim database. (As mentioned on page 31, an important simulation development is the ExtendSim centralized data management system.)
The good solutions then evolve toward an optimum solution. Evolutionary optimizers reduce the number of times the simulation must be run before the optimal solution is found. Every ExtendSim product has an Optimizer. The ExtendSim Scenario Manager is used to create a comprehensive design of experiments defining scenarios, making the desired number of runs, and analyzing the results. It is packaged with every ExtendSim AT and ExtendSim Suite product and is described more in Scenario Manager on page 65. In addition to the ability to share data with spreadsheets and other external applications, ExtendSim has an optional internal relational database capability. The integration of an internal data repository with the simulation engine is an essential element for complex models since it provides for the storage, management, and exchange of large amounts of model data before, during, and after model runs. This internal data repository also provides a convenient interface for statistical analysis between models and external applications. For output analysis, ExtendSim has blocks that provide confidence intervals, comparisons of multiple systems, plots, charts, histograms, etc. See the chapters in Part IV for more information.
Exercises
We have provided solutions to a number of the exercises that are at the end of Chapter 4; see ExtendSim\Examples\DESS Textbook\Chapter 4. These models are representative of what can be built by using basic ExtendSim blocks and tools. In some cases, there is additional information in the model about how that particular problem was modeled. Short descriptions of the first five exercises are given here. Exercise 1 For Exercise 4.1: The Checkout Counter, simulation time is specified in minutes and the simulation stops once 1,000 customers have been serviced. To change the model so that it runs for exactly 60 hours: Delete the connection between the Executive and Exit blocks In the Run > Simulation Setup dialog, enter End time: 60 In that same dialog, select Global time units: hours In the dialogs of the Create and Activity blocks, choose Time units: minutes. This keeps the time units for the model at hours while allowing the Create and Activity blocks to output in minutes.
Since the time units for the original model are minutes, a simpler method to represent 60 hours
would be to delete the connection between the Executive and Exit blocks and then just change Run > Simulation Setup dialog to End time: 3600 minutes. But the DESS authors specified hours so we did this model in hours.
Exercise 2 See the model titled Exercise 4.2. This uses a table that stops item/customers from arriving to the Activity once 60 hours has passed. The customers already in the model at time 60 continue processing.
Exercise 4 See the model titled Exercise 4.4. This exercise uses Activity blocks to represent ambulances responding to three types of emergency calls: false alarms, serious, and non-serious. A table in the dialog of each of the Select Item Out blocks determines how many calls are of a particular type. An entry in the Executive and the connection from the Exit block to the Executives Count connector causes the simulation to run until exactly 500 ambulance dispatches have been completed. Exercise 5 See the model titled Exercise 4.5. The Create block in this model assigns an Arrival Time attribute to each item it generates; it does this on its Options tab. To calculate the average time to complete all the calls, they are merged into one stream. The dialog of an Information block is set to calculate the time between item arrivals and display the cycle time statistics, which it reads from the Arrival time attribute. The average cycle time is the mean time that an ambulance takes to complete a call.
Part II
Mathematical and Statistical Models
38
5
Statistical Models in Simulation
In real life you cannot know exactly when an event is going to occur until it happens. For example, you do not know when the next customer will enter your store. However, by using the correct distribution you can approximate what happens in the real world. A distribution (also known as a probability distribution or a random distribution) is a set of random values that specifies the relative frequency with which an event occurs or is likely to occur. A random number distribution expresses both a probability that something will occur and a range of values that specify the maximum and minimum value of occurrence. Stochastic models use distributions as a handy method for converting data into useful form and inputting it into models. This chapter of the DESS text defines and describes various discrete and continuous distributions and specifically explores the Poisson process and empirical distributions.
Probability mass function (PMF) Cumulative distribution function (CDF) Expected value of X (Ex) Mode. In discrete cases, this is the value of the random variable that occurs most frequently. In continuous cases, it is the value at which the PDF is maximized. In ExtendSim, this is referred to as the most likely value. Memoryless property. The exponential is the only continuous distribution that has this property; the geometric is the only discrete distribution that has it.
Distributions
Distributions are used to represent the raw data observed in real-world situations. There are advantages to using statistical distributions rather than raw historical data as inputs to a model: 1. When you gather data for a simulation model, it is seldom in a useful form. 2. By filling in the gaps, distributions help to compensate for information which was missing from or overlooked during data collection. For example, distributions account for extreme or outlying values which may have been missed during typically short data-gathering intervals. 3. Values for input random variables are not limited to what has happened historically. 4. For continuous distributions, an infinite pool of data exists. With historical data, there is seldom enough collected data to support multiple simulation runs. When building simulation models it is usually better to use an approximate distribution than it is to keep a value constant. Characteristics of distributions The functions that produce a distribution have one or more parameter arguments which define and control its characteristics. The most important characteristics are a distributions shape, its spread, and its location or central tendency. Shape is often used to identify distributions; for example, the bell-shaped curve of a normal distribution is widely recognized. Shape can be characterized according to skewness (leaning to one side or another) and kurtosis (whether it is peaked or flat). You specify the characteristics for the selected distribution by the values you enter for these arguments.
Choosing a distribution Using random numbers means either choosing the theoretical distribution that best describes the variability of the raw data, describing the data using a user-defined or empirical distribution, or fitting known data to a distribution. The choice of one distribution over another is not an exact science, but rather is dependent on the type and extent of the data which is gathered, the detail required for the process being modeled, and (in the case where little data is available), informed guesswork. If the data does not fit any of the distributions described below as typical for your process, but fits a distribution which is not typical, we suggest you go with what your data tells you. Table 5.1 Typical Distributions for Specified Systems and Uses
System Queueing Inventory and supply chain Random Variables Interarrival Service Units demanded Time between demands Lead time Reliability and maintainability Limited data Time to failure Typical Distributions Exponential, gamma, Weibull Exponential, gamma, Weibull, lognormal Geometric, Poisson, negative binomial Exponential, gamma, Weibull, constant Gamma Exponential, gamma, Weibull, normal, lognormal Uniform, triangular, beta
See also the description of the ExtendSim distributions starting on page 86.
In ExtendSim
Methods for generating random distributions ExtendSim provides a variety of methods for generating random distributions. These include: 1. The Random Number block that generates a sample from a random distribution. This block is used in conjunction with other blocks to provide a random value to the model. A typical use would be to connect the output of the Random Number block to a Set block to assign a sample from a random distribution to an attribute. The distribution is selected from a popup menu in the Random Number blocks dialog. 2. Random distributions that are specified directly in the dialog of a block. The Activity, Create, Workstation, Select Item In, Select Item Out, and Shutdown blocks all allow the modeler to directly enter random information. The distributions (including an empirical or userdefined distribution), are selected using a popup menu in a blocks dialog. For example, the delay for an Activity block can be specified by selecting a distribution from a popup menu and entering the appropriate parameters for its arguments. When clicked, the Activity
blocks Plot Sample button displays the probability density function (PDF) as sampled from the selected distribution.
Figure 5.1 Distribution Popup in Activity Block 3. Random distributions in an ExtendSim database cell. A numerical database cell can be turned into a distribution by right clicking on the cell and selecting Make random. Each time this cell is accessed, a new random sample will be generated based on the selected distribution. Creating a distribution within a cell of a database is particularly useful when combined with the variety of ways that an ExtendSim database can be used. Database cells can be accessed in equations and custom blocks, read via a Read or Read (I) block, or linked to a dialog parameter (right click and select Link). 4. RandomCalculate function. In equation-based or custom blocks, the RandomCalculate function can be called to generate a random sample. This function will generate all of the random distributions except the empirical. The equation-based blocks are listed on page 54. See the ExtendSim Developer Reference [Imagine That Inc. 2009] for more information. For more information, see the chapters Math and Statistical Distributions or Data Management and Exchange in the ExtendSim User Guide [Imagine That Inc. 2007]. List of distributions in ExtendSim ExtendSim supports 34 parametric distributions as well as an empirical distribution. In addition, the ExtendSim AT and Suite packages include the Stat::Fit data-fitting application from Geer Mountain Software Corporation. The theoretical distributions, as well as the empirical distribution, are listed in the following table. For more detail about these distributions, see the chapter Random Distributions on page 85. Table 5.2 Distributions in ExtendSim
Beta Constant Extreme Value Type 1B Hypergeometric Johnson SU Log-Logistic Pareto Power Function Uniform Real Binomial Erlang Gamma Inverse Gaussian Laplace Lognormal Pearson type V Rayleigh Weibull Cauchy Exponential Geometric Inverse Weibull Logarithmic Negative Binomial Pearson type VI Triangular Chi Squared Extreme Value Type 1A Hyperexponential Johnson SB Logistic Normal Poisson Uniform Integer
For information about distribution fitting, see the chapter on Input Modeling on page 57.
43 Discrete Distributions
References
Imagine That Inc. [2009], ExtendSim Developer Reference, Seventh Edition. Imagine That Inc. [2007], ExtendSim User Guide, Seventh Edition.
44 Continuous Distributions
6
Queueing Models
Queueing systems are ubiquitous throughout our world: service stations, mass transit systems, checkout counters, production lines, call centers, and so forth. Designing an efficient queueing system involves a trade-off between maximizing server utilization (so companies get the most for their investment) and maximizing customer satisfaction (people, data, and products do not like to wait in long lines). Some of the input parameters in a queueing system include: How frequently entities arrive to the system What their service requirements are and how long it will take to provide that service How many servers are available, what their qualifications are, and what their service rate is
some who arrived to the system may have balked or the queues may not longer have space to accommodate them. System capacity. Any limits on the number of customers that can be in the system at one time. Arrival process. For infinite populations the arrival process is random, scheduled, or theoretically infinite (such that the server is never idle). For finite populations the total arrival process is the superposition of the arrival times of all customers. Queue behavior. Customers might balk, renege, or jockey. Queue discipline. Sorting or ordering by FIFO, LIFO, and so forth as discussed in List on page 24. Service times. These can have a constant or random duration. Service mechanism. Examples include parallel, batch, and serial.
In ExtendSim
The ExtendSim Item library has three Queue blocks: 1. Queue. This block acts either as a sorted queue or as a resource pool queue. As a sorted queue, items are stored in FIFO, LIFO, or Priority order, or by attribute value. The choices are made by selecting options in popup menus. As a resource pool queue, items must wait until a required resource is available from a pool. 2. Queue Equation. For more complex sorting methods, use the Queue Equation block. It queues the items and releases them based on a user-defined equation. The equation may contain math and/or programming logic. 3. Queue Matching. Acts as a series of queues where items are sorted into separate bins using the value of a specified attribute. Typically this block is not used as part of a queue/ server combination. Instead, it is used for matching one type of item with another, such as reassembling parts in the correct order or insuring that subassemblies are correctly matched with each other. Simulating multi-server queueing systems There are a number of ways to model servers in ExtendSim: 1. Activities. The Activity and Workstation blocks have a defined capacity that represents the number of available servers. Their Results tabs report the activitys utilization. The number of servers represented by these blocks can be changed dynamically using the capacity (c) connector or by using a Shift block. 2. Resource Pools and Advanced Resources. Resource Pools and Advanced Resources are allocated in a Queue and released in a Resource Pool Release block. These are useful when a server or resource needs to be held over multiple steps, is used in different places in the model, or different servers are required at the same time. 3. Resource Items. These are item-based resources that are stored in a Resource Item block when not in use. Resource Items are batched with the items moving through the model, stay with the item during one or more processing steps, and then are unbatched and returned to
the Resource Item block. Resource items are useful when the resources need to have their own attributes or if it is necessary to route them through the model in a specific sequence. 4. Gate. The Gate block limits the number of items in a part of the model. Area gating can be used to represent a server that is required over multiple steps. Conditional gating can be used to limit the number of items in a section of the model based on system conditions. Blocking, balking, reneging, and jockeying These concepts are thoroughly discussed in the Queueing chapter of the ExtendSim User Guide [Imagine That Inc. 2007].
Try changing the processing times to see what happens to the plot of the queue length.
48 Queueing Notation
References
Imagine That Inc. [2007], ExtendSim User Guide, Seventh Edition.
Part III
Random Numbers
50
Random Numbers
Preface
7
Random-Number Generation
An ExtendSim dialog, located at Run > Simulation Setup > Random Numbers, allows you to set a base random seed for the model. The default value of 0 or blank uses a random seed; any other value is a fixed seed that causes repeatable sequences of pseudo-random numbers.
Preface
Figure 7.1 Random Seed in Simulation Setup Dialog ExtendSim automatically assigns a separate seed to each block in the model that generates random numbers, and each of those blocks will generate its own sequence. The sequence is based on the seed set in the Run > Simulation Setup > Random Numbers dialog, plus an offset that is unique to the block. As with the Random Number dialog, entering any non-zero number as a seed in a block dialog will result in an independent random number stream that will not change across runs.
Figure 7.2 Setting the Seed in a Random Number Blocks Options Tab
See also the chapter Statistical Models in Simulation on page 39 and the list Distributions in
ExtendSim on page 86.
References
Pierre LEcuyer and Serge Cote, Implementing a Random Number Package with Splitting Facilities. ACM Transactions on Mathematical Software, Volume 17, Number 1, page 98-111, March 1991
8
Random-Variate Generation
While you could certainly calculate a distribution using the algorithms described in the DESS text, it is far easier to use the functions ExtendSim provides. The ExtendSim application has built-in functions that can be used to internally calculate random distributions. For instance, the RandomCalculate function (Imagine That Inc. [2009]) can calculate all of the distributions that are listed in the table that starts on page 86, except for the empirical distribution. And the most common distributions, such as the exponential, have their own separate functions. The distribution functions can be used both to generate random inputs and to gather statistical information from the results of simulations. They are available whenever you create or modify a block or use an equation-based block. The equation-based blocks are listed in the table below.
54
Value (AT & Suite) A user-defined equation selects one record from an ExtendSim database table When an item arrives, a user-defined equation selects one record from an ExtendSim database table
As an alternative to using an equation-based block or programming in ExtendSim, the Random Number block (Value library) can be used as a source for random values. It is discussed in Methods for generating random distributions on page 41.
References
Imagine That Inc. [2009], ExtendSim Developer Reference, Seventh Edition.
Part IV
Analysis of Simulation Data
56
9
Input Modeling
Distribution Fitting
In simulation models, it is often useful to characterize a random input (for example, inter-arrival times and demand rates) using a probability distribution. Typically, this involves obtaining historical data that documents the systems behavior, then analyzing the data to determine an appropriate distribution to represent it. Distribution fitting software helps determine which distributions, if any, offer a good fit for the underlying data. ExtendSim supports three packages for distribution fitting: 1. Stat::Fit from Geer Mountain Software 2. ExpertFit from Averill Law and Associates 3. JMP from SAS Institute These packages are accessed through the Distribution Fitting tab of the Random Number block (Value library).
Stat::Fit
ExtendSim has an interface that allows you to easily access Stat::Fit. The ExtendSim User Guide [Imagine That Inc. 2007] has a tutorial showing how to use Stat::Fit for distribution fitting.
58
Stat::Fit is a Windows application included with the ExtendSim AT and ExtendSim Suite products. It can be purchased separately for use with other ExtendSim products.
Expert Fit
ExpertFit is another package that will fit a theoretical distribution to historical data. Information is included with ExpertFit on how to specify distributions calculated by ExpertFit in ExtendSim.
References
Imagine That Inc. [2007], ExtendSim User Guide, Seventh Edition.
10
Verification, Calibration, and Validation of Models
60 Model Validation
Other methods for verifying models include making sure that you can account for all the items in a model, animating the model or portions of the model, or using diagnostic blocks from an ExtendSim library, as shown in Tools for Verification and Validation on page 60.
61 Model Validation
5. Equation Debugger. Equation-based blocks have a debugger that allows the modeler to step through the equation as it is being executed. This is not only useful when determining the cause of a programming error as stepping through an equation can help to verify that the equation is performing as expected. 6. ExtendSim database. Model information can be written to the database as the simulation is running. With this the modeler can create custom log files that record the operation of the model. The Write or Equation blocks from the Value library or the Write (I) or Equation (I) blocks can be used to write information to the database in response to system events. In addition, the Resource Manager block has an automatic logging feature that records the allocation and de-allocation of the advanced resources in a database table. 7. Stepping through the model. ExtendSim can be paused at any time during the simulation and the Step command (either in the tool bar or in the Run menu) can be used to step through the model as it executes. You can examine any of the dialog variables in the blocks to determine the behavior of the model. The Pause Sim block (Utilities library) can also be used to pause the simulation at a particular time or event. 8. Plotters. The blocks in the Plotter library can be used to display the value of any output connector over time. This is useful when comparing the value of two different but related connectors to ensure that the model is operating properly. The Plotter blocks include a histogram, bar chart, Gantt chart, scatter and strip charts, plotters for recording the results of multiple runs, and so forth. 9. Other tools. For more information, the ExtendSim User Guide [Imagine That Inc., 2007] has a chapter on Debugging Tools.
References
Imagine That Inc. [2007], ExtendSim User Guide, Seventh Edition
62 Model Validation
11
Absolute Performance
ExtendSim provides a variety of reporting tools for model performance measures: 1. Each block that has statistics to report has a Results tab. This contains the results collected for that run. For example, see the Results tab of the Activity block on page 33. 2. Output connectors display their values when the cursor is paused over them. 3. The Statistics block (Value library) provides summary statistics for all blocks in a model of a specific name (such as all Mean & Variance blocks) or of a certain type (such as all activities or queues). This block can be configured to collect multiple observations and summarize them. The information that is collected is specific to the selected block option. For example, for all queues the block reports average and maximum queue length, average and maximum wait time, arrivals, departures, reneges, utilization, and so forth. The Statistics/Confidence interval popup menu is for switching between displaying the raw data and displaying the calculated confidence interval information. 4. The Mean & Variance block (Value library) is a handy way to collect statistics on a single value. You can use this block, along with other Value library blocks, to create your own performance measures. Its dialog is shown below. 5. Custom performance measures can be created by using other blocks from the Value library. For example the number of items to have completed within a certain amount of time can be
64
calculated with a Information block from the Item library and Decision and Holding Tank blocks from the Value library.
12
Relative Performance
Scenario Manager
The easiest way to compare the performance of different model configurations is to use the ExtendSim Scenario Manager (Value library of ExtendSim AT and ExtendSim Suite). With this block you can create a comprehensive design of experiments defining scenarios, making the desired number of runs, and analyzing the results. The Scenario Manager will run all of the scenarios multiple times and generate a performance report for all of the scenarios. It allows an arbitrary number of factors and responses, any of which can be a dialog variable, database, and/or database table, field, or record. The data file capability allows for experimentation with any input or output typically specified in a data file, such as alternate production and labor schedules. The Scenario Manager also has a built-in interface to JMP statistical software (SAS Institute Inc.) so the JMP design of experiments engine can generate the scenarios. Summaries and statisti-
66
cal measures of the responses are provided; responses can also be exported to JMP for advanced analysis.
Optimizer
Another option for measuring relative performance is to use the Optimizer block (Value library). The modeler enters the values that can be changed, any constraints on those values, and an objective function that is used to determine the best model configuration. When the optimization is started, the simulation model is iteratively run until the Optimizer is statistically confident that the best model configuration has been achieved. The advantage of the ExtendSim Optimizer is that the optimization algorithm is available within a block that can be added to any model to control all aspects of the optimization. This increases flexibility and opens up the method and source code to those who might want to modify or create their own customized optimization blocks.
Part V
Appendices
68
Appendices
A
Getting Started with ExtendSim
This Appendix divides the basics of operating ExtendSim into two sections: 1. Using an existing model to explore a concept. You do this for the example models in Chapter 2 and 3, where you change parameters and run a model, then examine the results. 2. Creating a new model to simulate a system or process. For some of the exercises in the DESS book, it is helpful to build a simulation model. This Appendix only gives a brief introduction to using ExtendSim. For a more extensive description, see the ExtendSim User Guide [Imagine That Inc. 2007], paying special attention to the Tutorial module at the beginning as well as the Tutorial for the Discrete Event module. An eDoc of the User Guide is located in the ExtendSim\Documentation folder.
Figure A.1 Getting Started File Getting Started.mox is an ExtendSim model that is being used as a control panel interface. Clicking the buttons on the Getting Started worksheet reveals their different purposes: There are four buttons on the left titled Open Selected Model, one each for ExtendSim CP, ExtendSim OR, ExtendSim AT, and ExtendSim Suite. Each button opens the sample model
that is selected in the popup menu directly above it. For more information about ExtendSim products, see About ExtendSim on page vii. The buttons on the right are for: Opening a new model Selecting and opening a recent model Opening the ReadMe Selecting and playing tutorial videos There are two buttons at the bottom: Clicking Dont Show Again causes this window to not open the next time ExtendSim launches. Instead, ExtendSim will open a new model window when it first launches. Clicking ExtendSim for DESS Textbook opens a control panel interface named DESS QuickStart. Like the Getting Started file, DESS QuickStart is an ExtendSim model that provides an interface for the DESS files.
Or, double-click the DESS QuickStart file; it is located in the ExtendSim\Examples\DESS Textbook folder.
Although we think you will find it useful, you dont need to use the DESS QuickStart file to
open the DESS models. Instead, models can be opened using the File > Open command, the Open button in the toolbar, or by double-clicking the file.
DESS QuickStart is an interactive learning tool for the DESS text. As seen above, it has buttons for opening this text, viewing the tutorial videos that correspond to this chapter, and opening the example models. Opening the DESS MM1 model To open the MM1 model: In the DESS QuickStart file, click the button labeled Open MM1 Model. Or, open the DESS MM1 model directly using the File > Open command, the Open button in the toolbar, or by double-clicking the file. The file is located in the folder ExtendSim\Examples\DESS Textbook.
Exploring the DESS MM1 model The DESS MM1 model represents a single-server, single-queue system a waiting line with one service provider, such as in a small store. People arrive, wait in line, are helped by the clerk (unless the clerk is busy), and leave.
Figure A.3 DESS MM1 Model The model worksheet has some control buttons and check boxes, a field for entering the average processing time, a plot and six blocks that form the actual model. The blocks are: Executive. Performs event scheduling for discrete event models. Every ExtendSim discreteevent and discrete-rate model must have an Executive block placed to the left of all other blocks in the model. Create. Creates items randomly or by schedule. Queue. Holds items as they wait for downstream capacity. Activity. Processes items and releases them when finished. Exit. Passes items out of the simulation and counts them as they leave. Plotter. Displays model results. In this model it is connected to the Queues L (length) output connector, so it displays the length of the queue as the simulation runs. The plot pane of the plotter has also been cloned (virtually copied) onto the model worksheet so it can be easily viewed. (Cloning is discussed in Using a cloned parameter field on page 74.) See Entities on page 4 for an explanation of blocks and items; see page 11 for a listing of the model controls; see below for the definition and use of a cloned parameter.
In the blocks dialog A blocks dialog is accessed by double-clicking its icon or by right-clicking the icon and selecting Open Dialog. Dialogs contain fields for entering values as well as radio buttons, check boxes, and other methods for changing settings. For example, the Process tab in the dialog of the Activity block has a section for entering parameters to determine the blocks processing time.
Figure A.4 Portion of Activity Blocks Dialog In the DESS MM1 model, accessing the dialogs of the following blocks reveals their settings: The Create block generates items randomly using an exponential distribution with a mean of 1 to specify the time between item arrivals The Queue is set to sort its items and release them on a first-in, first-out (FIFO) basis The Activitys processing time is specified by an exponential distribution with a mean of 1 Using a cloned parameter field Many of the DESS models have important dialog fields cloned onto the model worksheet. Cloning is a useful feature that allows you to place virtual copies of important information (plots, input fields, output fields, and so forth) in a convenient location. Clones can be put into a models Notebook, onto the model worksheet, or within a hierarchical blocks submodel. This makes it easier to view or enter important model parameters. A cloned field is a virtual copy of a field in a blocks dialog. Each clone is identical to its originating parameter field; changing the clone changes the original and vice versa. For instance, Example 2.1: Coin Tossing (discussed on page 16) has a clone from the dialog of the Decision block. The clone allows you to easily change the probability that the toss will result in heads. When you change the value in that cloned field, it changes the B value in the Decision block. You can verify this by double-clicking the Decision block (labeled Heads or Tails) and looking at its dialog as you change the value in the cloned field. The section Clone a dialog item (optional) on page 81 shows how to use cloning.
Running with animation turned on also shows block status: the Queue shows the number of items waiting, the Activity displays its status (1 or 0 items being processed), and the Exit shows the number of items that have exited the simulation. Animation is useful for visualizing what is happening in a model but it does increase the simulation runtime. To turn off animation, uncheck the Animation On check box on the model worksheet. You can do this before the simulation starts or at any time during the simulation run.
tabs. For instance, double-click the Activity to open its dialog, then select its Results tab. Because each run will start with a different random seed, the results will vary from one run to the next.
Notice that the libraries are now listed at the bottom of the Library menu. Placing your cursor over the Item library reveals the categories of blocks included in that library as well as the Open Library Window command.
connectors. Connection lines from one connector to another indicate the flow of information and items. Connector types Connectors on a block are visually different, depending on how theyre used. While each connectors specific purpose is described in the blocks Help, the following table describes the two main types of ExtendSim connectors. Table A.1 Value and Item Connectors Type Value Input Output How theyre used Continuous blocks, such as in the Value library, use value connectors to pass values from one block to another. Blocks in the Item and Rate libraries may also use value connectors for the same purpose. Discrete event blocks, such as in the Item library, use item connectors to pass discrete items. Blocks in the Rate library may also use item connectors.
Item
Item library blocks, such as the Create and Queue, often have both types of connectors: item connectors for passing items and value connectors for passing information. Connecting to a connector If you position the cursor over an output connector, it turns into a drawing pen. To connect from one connector to another, click and drag the drawing pen until the connection line thickens, then release. 1. To indicate the flow of items, draw connections between the blocks item connectors as follows: From the Create blocks item output to the Queues item input From the Queues item output to the Activitys item input From the Activitys item output to the Exits item input 2. So that the model will display the length of the waiting line in the Queue: Connect from the Queues L (length) value output to the top input on the Plotter, Discrete Event
Unconnected connection lines will be displayed in red. To delete a portion of a connection line, select it and click the Delete or Backspace key. To delete the entire connection line, double-click it before deleting. When finished, your model should like the one below.
Then run the simulation. To turn off animation, give the command again; this unchecks the Show 2D Animation command. You can turn 2D animation on or off before the simulation starts or at any time during the simulation run. You can also change the animation object from the default green ball. For example, to change to people moving through the simulation: In the Create blocks Item Animation tab, select the People object for the 2D picture, as shown to the right In the Queue blocks Item Animation tab: Select Change all items to from the popup menu Select one of the person objects in the 2D picture popup menu For example, we have selected a male person as shown at the right. When the simulation is run, people will accumulate in the Queue and one person at a time will be processed and released by the Activity.
Sim has several blocks and tools to help when creating a model interface. These are discussed fully in the ExtendSim User Guide [Imagine That Inc. 2007]. One type of user interface is to place controls on the model worksheet, as discussed on page 11 and shown in the DESS example models. The Model Interface block (Utilities library) provides an easy method for quickly adding this type of customized control panel to a model. Add a Model Interface block (Utilities library) to your MM1 model Double click the Model Interface block to open its dialog, shown below In the dialog, uncheck three check boxes Run Experiment, Explain, and Set Random Seed since they are not needed in this model. Click the Create Interface button at the bottom of the blocks dialog, then close the dialog. This places two controls (Run Trial and Animation On) in the upper right corner of the model. Use the Clone Layer tool to position the controls where you want. Since it is no longer needed, the Model Interface block can be moved out of sight to the bottom of the model or hidden in a hierarchical block. (Deleting the block would delete the controls.)
83 Other resources
A new block with a plain icon appears on the worksheet, connected to the Create and Exit blocks. Double-clicking the new blocks icon reveals the 3-block submodel it encloses. The submodel communicates with the top model through the use of the named connections Con1In and Con2Out. There are a lot more you can do to customize and use hierarchical blocks, but that is beyond the scope of this text.
84 Other resources
Hide/Show connectors Navigator New model Open model Save model Print Cut Copy Paste Undo Zoom Notebook 3D Window Run Run Optimization or Scenarios Stop Pause/Continue Step Animation on/off Animation faster Animation slower All layers Colors Patterns Shapes popup menu Shuffle graphics Cursor position Icon tools popup menu
Block/text tool Graphics layer Clone layer Rectangle Round rectangle Oval Polygon Line Right angle line
References
Imagine That Inc. [2010], ExtendSim 8 Addendum, First Edition Imagine That Inc. [2009], ExtendSim Developer Reference, Seventh Edition. Imagine That Inc. [2007], ExtendSim User Guide, Seventh Edition.
B
Random Distributions
As discussed in the chapter Random-Variate Generation on page 53, you can also use any
equation-based block to call a random distribution function.
86 Distributions in ExtendSim
Cauchy
Chi Squared
Constant
Empirical
Erlang Exponential
87 Distributions in ExtendSim
Distribution Geometric
Description Outputs the number of failures before the first success in a sequence of independent Bernoulli trials with the probability of success on each trial. Typically used for the number of items inspected before encountering the first defective item, the number of items in a batch of random size, or the number of items demanded from an inventory. Usually used in telephone traffic and queueing theory. Describes the number of defects, x, in a sample of size s from a population of size N which has m total defects. It is used to describe sampling from a population where an estimate of the total number of defects is desired. It has also been used to estimate the total population of species from a tagged subset. Originally used to model Brownian motion and diffusion processes with boundary conditions. It has also been used to model the distribution of particle size in aggregates, reliability and lifetimes, and repair time. Describes several failure processes as a distribution of lifetime. It can also be used to fit data with abnormal large outliers on the positive side of the peak. Used in quality control to describe non-normal processes, which can then be transformed to the Normal distribution for use with standard tests. It is a continuous distribution that has both upper and lower finite bounds. Used in quality control to describe non-normal processes, which can then be transformed to the Normal distribution for use with standard tests. It is an unbounded continuous distribution. Used in error analysis and to describe the difference of two independent, and equally distributed, exponentials. Describes the diversity of a sample, that is, how many of a given type of thing are contained in a sample of things. For instance, this distribution has been used to describe the number of individuals of a given species in a sampling of mosquitoes, or the number of parts of a given type in a sampling of inventory. Most often used a growth model: for populations, for weight gain, for business failure, etc. Can also be used to test for the suitability of such a model, with transformation to get back to the minimum and maximum values for the Logistic function. Occasionally used in place of the Normal function where exceptional cases play a larger role. For Shape = 1, it resembles the Exponential distribution. For Shape < 1, it tends to infinity at Location, and decreases with increasing X. For Shape > 1, it is zero at Location, and then peaks and decreases. Often used to represent the time to perform an activity (especially when there are multiple sub-activities), the time between failures, or the duration of manual activities. This distribution is widely used in business for security or property valuation, such as the rate of return on stock or real estate returns. Number of failures before Sth success. P specifies the probability of success.
HyperExponential Hypergeometric
Inverse Gaussian
Johnson SU
Laplace Logarithmic
Logistic
Log-Logistic
LogNormal
Negative Binomial
88 Distributions in ExtendSim
Distribution Normal
Description The well-known Gaussian or bell curve. Most often used when events are due to natural rather than man-made causes, to represent quantities that are the sum of a large number of other quantities, or to represent the distribution of errors. Represents the income distribution of a society. It is also used to model many empirical phenomena with very long right tails, such as city population sizes, occurrence of natural resources, stock price fluctuations, size of firms, brightness of comets, and error clustering in communication circuits. A distribution typically used to represent the time required to complete some task. The density takes on shapes similar to lognormal, but can have a larger spike close to x = 0. A distribution typically used to represent the time required to complete some task. A continuous distribution bounded by zero on the left and unbounded on the right. Models the rate of occurrence, such as the number of telephone calls per minute, the number of errors per page, or the number of arrivals to the system within a given time period. Note that in queueing theory, arrival rates are often specified as poisson arrivals per time unit. This corresponds to an exponential interarrival time. A continuous distribution with both upper and lower finite bounds. It is a special case of the Beta distribution with q = 1. The Uniform distribution is a special case of the Power Function distribution with p = 1. Frequently used to represent lifetimes because its hazard rate increases linearly with time, e.g. the lifetime of vacuum tubes. This distribution also finds application in noise problems in communications. Usually more appropriate for business processes than the uniform distribution since it provides a good first approximation of the true values. Used for activity times where only three pieces of information (the minimum, the maximum, and the most likely values) are known. Describes a integer value that is likely to fall anywhere within a specified range. Used to represent the duration of an activity if there is minimal information known about the task. Describes a real value that is likely to fall anywhere within a specified range. Used to represent the duration of an activity if there is minimal information known about the task. Commonly used to represent product life cycles and reliability issues for items that wear out, such as the time between failures (TBF) or time to repair (TTR) for mechanical equipment.
Pareto
Pearson Type V
Power Function
Rayleigh
Triangular
Uniform Integer
Uniform Real
Weibull
C
ACME Steel
ACME Steel is a metal fabrication manufacturer that specializes in stamped steel products. One of the stamped steel products is a gear assembly for transmissions. ACME Steel's customer would like to purchase up to 11,000 gear assemblies each month. However ACME Steel is having difficulty producing that many. As shown below the cell layout for the stamped steel gear assembly has storage areas and several processes, such as Stamping and Assembly.
90 Details
A flow diagram of the process would look like the one shown here.
Figure C.2 Process Flow for Gear Assembly In the process flow diagram, buffers are represented as bins at each processs input and/or output. The number on a bin is that buffers capacity in pallets; the output buffer of Inspection #1 and the input buffer of Inspection #2 are infinite ().
C.1 Details
ACME Steel operates one shift per day and has a five-day work week, for a total of approximately 160 hours per month. With its current processes, ACME Steel would have to work overtime in order to meet the customers demand. Some members of management, however, have noted that the excess WIP (work in process) is causing the throughput time to be very high; they wonder if all of the WIP is really necessary. The raw material for the stamped steel gear assembly arrives at the plant as large steel coils. Each coil can be stamped into 1000 completed assemblies. The coils come from a local distributor and can be delivered whenever needed. Since the coils can be delivered as needed, the arrival process could be simulated by a Create block set to Create items infinitely. If you take this approach, let the Create block represent pallets and route them directly to the Stamping process. (Note: Dont follow the infinite Create block with a queue that has infinite capacity. If you do, ExtendSim will continue to create items until your computer runs out of memory!)
91 The Workshop
The service times for each process, plus inspection, are shown in the table below. The service times are per pallet where every pallet holds 100 gear assemblies. The gear assemblies are put onto pallets after the stamping process and are transported from process to process in full pallets. Table C.1 Service Times for Each Process
Process Stamping Service Time per Pallet (minutes) Lognormal (5, 1)
Spot Welding #1 Lognormal (65, 13) Spot Welding #2 Lognormal (75, 15) Inspection #1 Assembly #1 Assembly #2 Inspection #2 Lognormal (25, 5) Lognormal (105, 21) Lognormal (65, 13) Lognormal (25, 5)
ACME Steel inspects the gear assemblies after Spot Welding #2 (at Inspection #1) and after Assembly #2 (at Inspection #2). Gear assemblies are inspected individually and are scrapped if found defective. Both Inspection #1 and Inspection #2 are performed by a single operator who works at both of the stations. The product failure rates are provided below. Table C.2 Failure Rates
Process Inspection #1 Inspection #2 Product Failure Rates 95% Pass & 5% Fail 95% Pass & 5% Fail
The pallets are always kept full even after the inspection process. When the inspector finds defective parts, the defective parts are scrapped and are replaced by good parts from the next pallet. Once a pallet is full of good parts (100 gear assemblies), it is sent downstream. See Inspection process and failure rate on page 92 for some hints on how to model this process.
92 Hints
3. Assuming that the additional capacity has already been added at Assembly #1, the plant manager wonders exactly how much the plant could produce if a second dedicated station were added to the system at another step of the process. For example, how much could the system produce if Welding #1, Welding #2, or Assembly #2 had doubled capacity in addition to Assembly #1? Help the plant manager make an informed decision regarding which additional station should be added and how much it will improve the system.
C.3 Hints
C.3.1 Inspection process and failure rate
The inspection time given is per pallet. An easy way to model this construct is to grab the inspector resource before the pallet goes into the inspection activity and release the inspector resource after the pallet is finished with the inspection activity. After releasing the inspector resource, the pallet can then be un-batched so that 5% of the parts can be scrapped. This can be seen from the illustration below.
93 Hints
94 Hints
D
ITI Healthcare ED
ITI Healthcare is a full service medical facility in the suburbs of Houston, TX. They have been in business for about 40 years. The staff is very forward thinking in most areas of the business and understands that the only way to improve is to change. This means trying new ideas even if some turn out to be failures they learn from the failures and improve through the successes. This approach has helped them respond over the years to fairly substantial changes without having to go through any significant brick and mortar changes. The process improvement group is considering more changes to the Emergency Department (ED) in order to improve patient satisfaction. Aside from quality of care, patient satisfaction is often a function of time spent in the system. The less time patients spend in the ED, the more satisfied patients tend to be. However, hospital administration is reluctant to make many changes which might involve disruptions of the ED, a very critical department. Someone has suggested that a simulation model could test changes without actually touching the real system. The administration is intrigued and has asked us to help.
96 Process Layout
RM 6
NurseStation Supplies
RM 11
Room24
Room23
Room22
Room21
Room20
Room19
Room18
For example at 12:00 midnight the inter-arrival rate indicates that patients arrive based on an exponential distribution with a mean of 60 minutes, while at 12:00 noon the inter-arrival rate would be an exponential distribution with a mean of 15 minutes. The interarrival rate can be modeled using a Lookup Table block connected to a Create block. The Create block will be creating the patients based on the exponential distribution while the Lookup Table will be changing the mean interarrival rate of the Create block.
Figure D.3 Flow for Arrival Process. Table D.2 Processing Times and Capacity
Process Triage Registration Time (minutes) Lognormal (3,2) Lognormal (9,7) Capacity 1 station 3 stations
This can be modeled using two Select Item Out blocks, one Select Item In block (all from the
Item library), and a Lookup Table block from the Value library. Use the first Select Item Out block and the Lookup table to split the route based on time of day. Use the second Select Item Out block to model the percentages of patients who go to the Main ED or to the Fast Track. The Select Item In block is used to merge the two Main ED patient flows shown above.
Fast Track Process After registration, the Fast Track patients wait in the waiting room for the next available Fast Track bed. After the Fast Track patients get a bed, they will see a doctor, then a nurse, and then go through the disposition process. The Fast Track patients are not admitted to the hospital; they are always discharged. One dedicated nurse and one dedicated doctor staff the Fast Track area. The process flow is shown below.
If the Resource Pool is used, you will need to release the resource with the Resource Pool
Release block when the patient no longer requires the resource.
The resources involved with the lab/radiology process are outside the scope of the model, so
model the process times of this activity but not the resources involved. Assume that any number of patients can go through this process at the same time. flow so that 50% will have either lab or radiology and the other 50% will not. patient flow going into the disposition process.
After the patient is seen by the nurse, the Select Item Out block can be used to split the patient At the end of the process for the Main ED, the Select Item In block can be used to join the
D.2.7 Process Times in Patient Rooms
The process times for all patient types and outcomes are given in the table below. Table D.3 Process Times in Patient Rooms
Process Doctor evaluation time Nurse time Doctor evaluation time Nurse time Doctor evaluation time #2 (follow-up) Lab/Radiology Area Fast Track Fast Track Main ED Main ED Main ED Main ED Process Time (minutes) Lognormal (15, 5) Lognormal (15, 5) Lognormal (20, 5) Lognormal (20, 5) Lognormal (15, 5) Weibull (90 scale, 2 shape, 20 location)
Main ED The Main ED has a more complex situation. The scheduling for the doctors and nurses in the Main ED is done in 6 hour shifts. The current schedule and staffing level is in the table that follows. Table D.4 Provider Schedules in Main ED
Time 12 midnight - 6am 6am - 12 noon 12 noon - 6pm 6pm - 12 midnight Doctor 1 2 2 2 Nurse 1 2 2 2
This staff schedule is for the Main ED exclusively; the Main ED staff does not work on the Fast Track patients. Also, if a change in staffing level is made, it will apply to the entire shift. This means that if 2 nurses are scheduled at 6 a.m., then both nurses will be on shift until 12 noon. In order to implement a schedule for the doctors and nurses that changes throughout the day, a Shift block can be used.
Since doctors are used in multiple activities in the Main ED, the Resource Pool should be used
to model their availability.
D.2.9 Disposition
After patients are finished in the ED, some will be discharged and leave the ED and some will be admitted to the hospital. All of the Fast Track patients are discharged to go directly home from the ED. For patients in the Main ED, 50% are discharged to go home from the ED and 50% are admitted to the hospital. The admitted patients first have to be seen by the admitting doctor (not the ED doctor) and wait for a bed in the appropriate department of the hospital. The patients who are waiting for hospital beds are called boarders. The boarders physically remain in the ED bed while awaiting a bed in the hospital. This process can take several hours. The discharge process is done by another department outside the scope of this model, so model the process times of this activity but not the resources involved. Assume that any number of patients can go through this process at the same time.
102 Assignment
After a patient leaves the ED, whether by being discharged or admitted, their bed is immediately released back into the resource pool of beds. The discharge processing times as well as the time it takes to get a visit from the admitting doctor and get a hospital bed is given below. Table D.5 Disposition Times
Process Discharge time Waiting for a hospital bed Process Time Lognormal (20, 6) Lognormal (7, 3) Time Units Minutes Hours
Note that the discharge time is in minutes and the waiting time for a bed is in hours. Make sure
to get the correct time units in the Activity.
D.3 Assignment
Some of the questions that the process improvement group is trying to determine include: 1. Management is considering taking away 6 Main ED patient rooms and adding more equipment in order to broaden their in-house capabilities. However the health care providers (doctors and nurses) are balking at this idea. The health care providers say that reducing the number of rooms to that extent will drastically increase the Main ED / Discharge patient's LOS (Length of Stay). Compare the average patient LOS with 24 rooms to the average patient LOS with only 18 rooms. 2. Management is also considering adding an additional doctor and nurse to one shift. However they are not sure which shift it should be. While in the current scenario with 24 rooms, which shift should get those additional providers and how will that affect the average patient LOS? Consider only the Main ED Discharge patients. 3. While in the current scenario with 24 rooms, if there were a serious outbreak of a flu virus that caused a 50% increase in patients, how would that affect the patient's LOS for both the Fast Track as well as the Main ED? For a 50% increase in patients, the mean interarrival rate (for the Exponential distribution) would look like the table below: Table D.6 Mean Interarrival Rate of Flu Patients
Time 12:00 Midnight 1:00 AM 2:00 AM 3:00 AM 4:00 AM 5:00 AM 6:00 AM Inter-Arrival Rate (minutes) 30 30 30 30 30 30 30 Time 12:00 Noon 1:00 PM 2:00 PM 3:00 PM 4:00 PM 5:00 PM 6:00 PM Inter-Arrival Rate (minutes) 7.5 7.5 7.5 7.5 7.5 7.5 2.5
103 Assignment
104 Assignment
Index
A
absolute performance 63 ACME Steel 89 activity arrival process 46
as delay in ExtendSim 25 definition of in DESS text 24
B
beta distribution 86 binomial distribution 86 block attributes 6 connection lines 79 connectors 78 definition 4
Activity block 32 agent-based models 7 animation (2D) 74 Animation On checkbox 12 applications of ExtendSim 3 arguments for distributions 40 arrays definition 27 dynamic 27 arrival process 46 arrival rate 45 arrival rate (effective) 45 attribute definition 5 of blocks 6 authors David Krahl ix Robin Clark ix
C
calling population 45 case studies 3 Cauchy distribution 86 central tendency of distribution 40 chain 24 Chi Square distribution 86 clock times 16 clone definition 74 how to create 81 confidence interval 63 connection lines 79 connector Item 79 types 79 Value 79
106
connectors 78 constant distribution 86 control panel 81 control panel interface 70 controls 11 Create block 32
D
data
raw historical 40 database in ExtendSim 27, 31 data-fitting 42 David Krahl ix delay in DESS text 25 in ExtendSim 25 design of experiments 34 DESS MM1 model 72 discrete-event concepts 23 queueing systems 45 discrete-rate models 6 distribution central tendency 40 location argument 40 shape argument 40 skewness 40 spread 40 theoretical 41 distribution fitting 57 distributions 42 beta 86 binomial 86 Cauchy 86 Chi Square 86 constant 86 continuous 43 definition 39 discrete 43 empirical 41, 42, 86 Erlang 86 exponential 86 Extreme Value Type 1A 86 Extreme Value Type 1B 86 gamma 86 geometric 87 hyperexponential 87
Hypergeometric 87 in ExtendSim 42, 86 introduction 10 inverse gaussian 87 Inverse Weibull 87 Johnson SB 87 Johnson SU 87 Laplace 87 list of, in ExtendSim 42 Logarithmic 87 Logistic 87 loglogistic 87 lognormal 87 methods for generating, in ExtendSim 41 negative binomial 87 normal 88 Pareto 88 Pearson type V 88 Pearson type VI 88 Poisson 88 Power Function 88 random 41 Rayleigh 88 triangular 88 uniform integer 88 uniform real 88 user-defined 41 using a function 42 Weibull 88
E
effective arrival rate 45 empirical distribution 42, 86 entity definition of 4 in ExtendSim 4 Equation Debugger 61 Erlang distribution 86 event calendar in ExtendSim 25 event calendaring 24 event list 24 event notice 24 event scheduling 25 evolutionary optimizer 33 Example 2.1 (Coin Tossing) 12
107
Example 2.10 (Bombing Mission) 21 Example 2.11 (Lead-Time Demand) 22 Example 2.12 (Project Simulation) 22 Example 2.2 (Random Service Times) 14 Example 2.3 (Random Arrival Times) 15 Example 2.4 (Coin Tossing) 16 Example 2.5 (The Grocery Checkout) 17 Example 2.6 (Able-Baker Call Center) 17 Example 2.7 (News Dealers Problem) 19 Example 2.8 (Refrigerator Inventory Problem) 19 Example 2.9 (Replacing Bearings in a Milling Machine) 20 Example 3.3 (Single Channel Queue) 26 Example 3.4 (Checkout-Counter) 26 Example 3.5 (Dump Truck Problem) 26 Example 4.1 (Checkout Counter) 32 Executive block 24, 32 Exit block 33 experiment (definition) 12 Experiment Results button 11 Expert Fit 58 Explain button 11 exponential distribution 86 Extend vi, 33 ExtendSim about vii applications 3 blocks 4 Case Studies & Papers 4 cloning dialog items 74 database 27 discrete-rate modeling 6 Executive block 24 full-featured versions viii getting started with 69 items 5 launching 70 limited version v, viii model structure 12 modeling capabilities viii optimizer 33 products viii Solutions Showcase 3 starting 70 User Guide vi ExtendSim AT viii
ExtendSim OR viii ExtendSim Suite viii Extreme Value Type 1A distribution 86 Extreme Value Type 1B distribution 86
F
factors 34
G
gamma distribution 86 geometric distribution 87 Getting Started.mox 70
H
hierarchical blocks 17, 82 hierarchy
creating a hierarchical block 82 definition 30 used in the DESS models 17
I
in a database cell 42 interarrival time 15, 24, 48 interface 70, 81 internet 31 Inverse Gaussian distribution 87 Inverse Weibull distribution 87 item attributes 5 definition 5 index 6 preemption 25 priority 5 properties 5 quantity 5
108
Monte Carlo
Coin Tossing model 12 models 9
J
Johnson SB distribution 87 Johnson SU distribution 87
N
negative binomial distribution 87 normal distribution 88 Number of Trials field 11
K
Kendalls notation 48
O
objective of this book iii Optimizer 33 other resources 83
L
Laplace distribution 87 library definition 77 opening 77 limited version of ExtendSim v, viii linear congruential generators (LCGs) 51 linked list 27 list (definition) 24 location of distribution 40 Logarithmic distribution 87 Logistic distribution 87 loglogistic distribution 87 lognormal distribution 87 LT version of ExtendSim v, viii
P
parameters
arguments 40 Pareto distribution 88 Pearson type V distribution 88 Pearson type VI distribution 88 performance measures 48, 63 Period of Integrated Environments 30 phraseology v Poisson distribution 88 Power Function distribution 88 preemption 25 processing shutting down 25 time 25 properties definition 5
M
Mean & Variance block 63 measures of performance 63 model controls 11 creating in ExtendSim 76 DESS MM1 72 interface 81 responses 16 structure 12 using an ExtendSim 69 validation 60 verification 59 Model Interface block 81 models agent-based 7 discrete-rate 6 Monte Carlo 9 types 6
Q
queue
behavior 46 characteristics 45 definition 24 discipline 46 input parameters 45 list 24 sorting 46
109
R
random distributions 41 random number generator 51 random numbers random number generator 10, 51 seed 10 Random Numbers dialog 52 random seed 10 RandomCalculate function 42 Rayleigh distribution 88 reductio-ad-absurdum 59 responses 34 Results tab 33 Results Table button 11 RNG 51 Robin Clark ix Run Experiment button 11 run parameters (setting) 77 Run Trial button 11
selecting 31 skewness of distribution 40 spread of distribution 40 StatFit 42, 57 Statistics block 63 system components of 4 performance measures 48 system capacity 46
T
time between arrivals (TBA) 15, 24 trace files 60 trial (definition) 12 triangular distribution 88 tutorial for ExtendSim 69
U
Uniform Integer distribution 88 Uniform Real distribution 88 used in a title v User Guide as eBook vi user interface 70, 81
S
Scenario Manager 34 scenarios 34 scripting 31 seed 10 server multiple 17 single 17 service mechanism 46 service time 25, 48 set 24 Set Random Seed To checkbox 12 shape of distribution 40 shutdown 25 simulation clock times 16 controls 11 duration 25 model responses 16 stopping 25 uses for vii why use vii world views 25 Simulation Setup command 52 simulation software 29 history 30
V
validation 60 Value connectors 79 verification 59
W
wait time 25 web-based modeling 31 Weibull distribution 88 workshop I 89 workshop II 95 world views 25
110