SIMULATION MODELING

3y ago
119 Views
20 Downloads
1.42 MB
30 Pages
Last View : 13d ago
Last Download : 3m ago
Upload by : Camille Dion
Transcription

SIMULATION MODELINGAND ARENA

SIMULATION MODELINGAND ARENA MANUEL D. ROSSETTIUniversity of Arkansas

Copyright 2016 by John Wiley & Sons, Inc. All rights reservedPublished by John Wiley & Sons, Inc., Hoboken, New JerseyPublished simultaneously in CanadaNo part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by anymeans, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted underSection 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of thePublisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center,Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web atwww.copyright.com. Requests to the Publisher for permission should be addressed to the PermissionsDepartment, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201)748-6008, or online at http://www.wiley.com/go/permission.Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts inpreparing this book, they make no representations or warranties with respect to the accuracy or completeness ofthe contents of this book and specifically disclaim any implied warranties of merchantability or fitness for aparticular purpose. No warranty may be created or extended by sales representatives or written sales materials.The advice and strategies contained herein may not be suitable for your situation. You should consult with aprofessional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any othercommercial damages, including but not limited to special, incidental, consequential, or other damages.For general information on our other products and services or for technical support, please contact our CustomerCare Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax(317) 572-4002.Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not beavailable in electronic formats. For more information about Wiley products, visit our web site at www.wiley.com.Library of Congress Cataloging-in-Publication Data:Rossetti, Manuel D. (Manuel David), 1962- author.Simulation modeling and Arena / Manuel D. Rossetti. – Second edition.pages cmIncludes bibliographical references and index.ISBN 978-1-118-60791-6 (cloth)1. Computer simulation. 2. Arena (Computer file) I. Title.QA76.9.C65R66 2015003′ .3–dc232015006381Printed in the United States of America10 9 8 7 6 5 4 3 2 122016

To all my students!

BRIEF TABLE OF CONTENTS1 Simulation Modeling12 Generating Randomness in Simulation173 Spreadsheet Simulation634 Introduction to Simulation in Arena 975 Basic Process Modeling1636 Modeling Randomness in Simulation2337 Analyzing Simulation Output2998 Modeling Queuing and Inventory Systems3939 Entity Movement and Material-Handling Constructs48910Miscellaneous Topics in Arena Modeling54311Application of Simulation Modeling633

x1 Simulation Modeling1.11.21.31.41.51.61.71.8Simulation Modeling, 1Why Simulate? 2Types of Computer Simulation, 3Simulation: Descriptive or Prescriptive Modeling? 6Randomness in Simulation, 7Simulation Languages, 7Simulation Methodology, 8Organization of The Book, 15Exercises, 152 Generating Randomness in Simulation2.12.22.32.42.51The Stochastic Nature of Simulation, 17Random Numbers, 18Random Number Generators, 19Testing Random Numbers, 242.4.1 Distributional Tests, 252.4.2 Testing Independence, 34Generating Random Variates from Distributions, 372.5.1 Inverse Transform, 382.5.2 Convolution, 462.5.3 Acceptance/Rejection, 4717

xCONTENTS2.5.42.63Spreadsheet Simulation3.13.23.33.43.54Mixture Distributions, Truncated Distributions, and ShiftedRandom Variables, 50Summary, 54Exercises, 54Simulation in a Spreadsheet Environment, 63Useful Spreadsheet Functions and Methods, 643.2.1 Using RAND() and RANDBETWEEN(), 643.2.2 Using VLOOKUP(), 663.2.3 Using Data Tables to Repeatedly Sample, 683.2.4 Using VBA, 69Example Spreadsheet Simulations, 703.3.1 Simple Monte-Carlo Integration, 713.3.2 The Classic News Vendor Inventory Problem, 733.3.3 Simulating a Random Cash Flow, 76Introductory Statistical Concepts, 793.4.1 Point Estimates and Confidence Intervals, 793.4.2 Determining the Sample Size, 81Summary, 86Exercises, 86Introduction to Simulation in Arena 4.14.24.363Introduction, 97The Arena Environment, 98Performing Simple Monte-Carlo Simulations Using Arena, 1004.3.1 Redoing Area Estimation with Arena, 1014.3.2 Redoing the News Vendor Problem with Arena, 1044.4 How The Discrete-Event Clock Works, 1064.5 Modeling a Simple Discrete-Event Dynamic System, 1104.5.1 A Drive-through Pharmacy, 1104.5.2 Modeling the System, 1104.5.3 Implementing the Model in Arena, 1134.5.4 Specify the Arrival Process, 1144.5.5 Specify the Resources, 1164.5.6 Specify the Process, 1164.5.7 Specify Run Parameters, 1184.5.8 Analyze the Results, 1204.6 Extending the drive through pharmacy model, 1234.7 Animating the Drive-Through Pharmacy Model, 1254.8 Getting Help in Arena, 1334.9 Siman and The Run Controller, 1334.9.1 SIMAN MOD and EXP Files, 1344.9.2 Using the Run Controller, 1384.10 How Arena Manages Entities and Events, 1454.11 Summary, 149Exercises, 15097

CONTENTS5 Basic Process Modeling5.15.25.35.45.55.65.75.85.9163Elements of Process-Oriented Simulation, 163Entities, Attributes, and Variables, 164Creating and Disposing of Entities, 165Defining Variables and Attributes, 169Processing Entities, 174Attributes, Variables, and Some I/O, 1765.6.1 Modifying the Pharmacy Model, 1765.6.2 Using the ASSIGN Module, 1805.6.3 Using the READWRITE Module, 1815.6.4 Using the RECORD Module, 1845.6.5 Animating a Variable, 1865.6.6 Running the Model, 187Flow of Control in Arena, 1905.7.1 Logical and Probabilistic Conditions, 1915.7.2 Iterative Looping, 1955.7.3 Example: Iterative Looping, Expressions, and Submodels, 196Batching and Separating Entities, 2105.8.1 Example: Tie-Dye T-Shirts, 210Summary, 221Exercises, 2236 Modeling Randomness in Simulation6.16.26.36.46.5xiRandom Variables and Probability Distributions, 233Modeling with Discrete Distributions, 238Modeling with Continuous Distributions, 240Input Distribution Modeling, 242Fitting Discrete Distributions, 2446.5.1 Fitting a Poisson Distribution, 2446.5.2 Visualizing the Data, 2456.5.3 Statistical Analysis of the Data, 2476.5.4 Checking the Goodness of Fit of the Model, 2506.6 Fitting Continuous Distributions, 2546.6.1 Visualizing the Data, 2556.6.2 Statistically Summarize the Data, 2566.6.3 Hypothesizing and Testing a Distribution, 2576.6.4 Visualizing the Fit, 2636.7 Using The Input Analyzer, 2676.8 Additional Input Modeling Concepts, 2766.9 Modeling Randomness in Arena, 2796.9.1 Conceptualizing the Model, 2806.9.2 Implementing the Model, 2826.10 Summary, 292Exercises, 293233

xii7CONTENTSAnalyzing Simulation Output7.17.27.37.47.57.68Types of Statistical Variables, 300Types of Simulation with Respect to Output Analysis, 305Analysis of Finite-Horizon Simulations, 3077.3.1 Determining the Number of Replications, 3097.3.2 Finite Horizon Example, 3117.3.3 Sequential Sampling for Finite-Horizon Simulations, 318Analysis of Infinite-Horizon Simulations, 3217.4.1 Assessing the Effect of Initial Conditions, 3277.4.2 Performing the Method of Replication–Deletion, 3327.4.3 Looking for the Warm-Up Period in the Output Analyzer, 3357.4.4 The Method of Batch Means, 3467.4.5 Performing the Method of Batch Means, 350Comparing System Configurations, 3537.5.1 Comparing Two Systems, 3547.5.2 Analyzing Multiple Systems, 372Summary, 382Exercises, 384Modeling Queuing and Inventory Systems8.18.28.38.48.58.68.78.88.9299Introduction, 393Single Line Queuing Stations, 3948.2.1 Queuing Notation, 3968.2.2 Little’s Formula, 3988.2.3 Deriving Formulas for Markovian Single-Queue Systems, 401Examples and Applications of Queuing Analysis, 4078.3.1 Infinite Queue Examples, 4078.3.2 Finite Queue Examples, 412Non-Markovian Queues and Approximations, 417Simulating Single Queues in Arena, 4198.5.1 Machine Interference Optimization Model, 4198.5.2 Using OptQuest on the Machine Interference Model, 4248.5.3 Modeling Balking and Reneging, 427Holding and Signaling Entities, 4358.6.1 Redoing the M/M/1 Model with HOLD/SIGNAL, 437Networks of Queuing Stations, 4428.7.1 STATION, ROUTE, and SEQUENCE Modules, 444Inventory Systems, 4538.8.1 Modeling an (r, Q) Inventory Control Policy, 4548.8.2 Modeling a Multi-Echelon Inventory System, 464Summary, 471Exercises, 472393

CONTENTS9 Entity Movement and Material-Handling Constructs9.19.29.39.49.59.610xiii489Introduction, 489Resource-Constrained Transfer, 4909.2.1 Implementing Resource-Constrained Transfer, 4929.2.2 Animating Resource-Constrained Transfer, 498Constrained Transfer with Transporters, 5019.3.1 Test and Repair Shop with Workers as Transporters, 5049.3.2 Animating Transporters, 509Modeling Systems with Conveyors, 5119.4.1 Test and Repair Shop with Conveyors, 5169.4.2 Animating Conveyors, 5199.4.3 Miscellaneous Issues in Conveyor Modeling, 522Modeling Guided Path Transporters, 528Summary, 537Exercises, 537Miscellaneous Topics in Arena Modeling10.1 Introduction, 54310.2 Non-stationary Processes, 54410.2.1 Thinning Method, 54710.2.2 Rate Inversion Method, 54810.3 Advanced Resource Modeling, 55210.3.1 Scheduled Capacity Changes, 55310.3.2 Calculating Utilization, 55910.3.3 Resource Failure Modeling, 56210.4 Tabulating Frequencies Using the Statistic Module, 56510.5 Resource and Entity Costing, 56810.5.1 Resource Costing, 56810.5.2 Entity Costing, 57110.6 Miscellaneous Modeling Concepts, 57610.6.1 Picking Between Stations, 57610.6.2 Generic Station Modeling, 57910.6.3 Picking up and Dropping Off Entities, 58510.7 Programming Concepts Within Arena, 59310.7.1 Using the Generated Access File, 59310.7.2 Working with Files, Excel, and Access, 59610.7.3 Using Visual Basic for Applications, 60910.7.4 Generating Correlated Random Variates, 62210.8 Summary, 625Exercises, 625543

xiv11CONTENTSApplication of Simulation ction, 633SM Testing Contest Problem Description, 635Answering the Basic Modeling Questions, 640Detailed Modeling, 64511.4.1 Conveyor and Station Modeling, 64611.4.2 Modeling Samples and the Test Cells, 64811.4.3 Modeling Sample Holders and the Load/Unload Area, 65511.4.4 Performance Measure Modeling, 65811.4.5 Simulation Horizon and Run Parameters, 65911.4.6 Preliminary Experimental Analysis, 663Final Experimental Analysis and Results, 66311.5.1 Using the Process Analyzer on the Problem, 66411.5.2 Using OptQuest on the Problem, 66811.5.3 Investigating the New Logic Alternative, 671Sensitivity Analysis, 671Completing the Project, 672Some Final Thoughts, 675Exercises, 676Bibliography677Appendix A Common Distributions683Appendix B Statistical Tables689Appendix C Distributions, Operators, Functions in Arena697Appendix D Queuing Theory Formulas699Appendix E Inventory Theory Formulas703Appendix F Useful Equations705Appendix G Arena Panel Modules707Index711

PREFACEWelcome to the second edition. Similar to the first edition, the book is intended as an introductory textbook for a first course in discrete-event simulation modeling and analysis forupper-level undergraduate students as well as entering graduate students. While the text isfocused toward engineering students (primarily industrial engineering), it could also be utilized by advanced business majors, computer science majors, and other disciplines wheresimulation is practiced. Practitioners interested in learning simulation and Arena couldalso use this book independently of a course.The second edition has been significantly reorganized to allow more introductory material involving the application of spreadsheets to perform simulation. By including spreadsheet simulation, students are able to experience introductory concepts such as randomnumber generation and sampling in a more familiar venue. Then, the concepts can bereinforced using Arena and discrete-event modeling. The book also introduces the use ofthe open-source statistical package, R, both for performing statistical testing and for fittingdistributions. A significant number of additional exercises have been added to each chapter.Manuel D. RossettiFayetteville, AR

ACKNOWLEDGMENTSI would like to thank my children, Joseph and Maria, who gave me their support andunderstanding, and my wife, Amy, who not only gave me support, but also helped in creatingfigures and diagrams and proofreading. Thank you so much!M.D.R

INTRODUCTIONINTENDED AUDIENCEDiscrete-event simulation is an important tool for the modeling of complex system. It isused to represent manufacturing, transportation, and service systems in a computer program for the purpose of performing experiments. The representation of the system via acomputer program enables the testing of engineering design changes without disruption tothe system being modeled. Simulation modeling involves elements of system modeling,computer programming, probability and statistics, and engineering design. Because simulation modeling involves these individually challenging topics, the teaching and learningof simulation modeling can be difficult for both instructors and students. Instructors arefaced with the task of presenting computer programming concepts, probability modeling,and statistical analysis all within the context of teaching how to model complex systemssuch as factories and supply chains. In addition, because of the complexity associated withsimulation modeling, specialized computer languages are needed and thus must be taught tostudents for use during the model building process. This book is intended to help instructorswith this daunting task.Traditionally, there have been two primary types of simulation textbooks: (i) those thatemphasize the theoretical (and mostly statistical) aspects of simulation and (ii) those thatemphasize the simulation language or package. The intention of this book is to blend thesetwo aspects of simulation textbooks together while adding and emphasizing the art of modelbuilding. Thus the book contains chapters on modeling and chapters that emphasize thestatistical aspects of simulation. However, the coverage of statistical analysis is integratedwith the modeling in such a way to emphasize the importance of both the topics. Thisbook utilizes the Arena simulation environment as the primary modeling tool for teachingsimulation. Arena is one of the leading simulation modeling packages in the world and hasa strong and active user base. While the book uses Arena as the primary modeling tool, thebook is not intended to be a user’s guide to Arena. Instead, Arena is used as the vehicle forexplaining important simulation concepts.

xxINTRODUCTIONI feel strongly that simulation is best learned by doing. The book is structured to enableand encourage students to get engaged in the material. The overall approach to presentingthe material is based on a hands-on concept for student learning. The style of writing isinformal, tutorial, and centered around examples that students can implement while reading the chapters. The book assumes a basic knowledge of probability and statistics and anintroductory knowledge of computer programming. Even though these topics are assumed,the book provides integrated material that should refresh students on the basics of thesetopics. Thus, instructors who use this book should not have to formally cover this materialand can be assured that students who read the book will be aware of these concepts withinthe context of simulation.ORGANIZATION OF THE BOOKChapter 1 is an introduction to the field of simulation modeling and to modeling methodologies. After Chapter 1, the student should know what simulation is and be able to put thedifferent types of simulation into context. It also describes an overall simulation methodology that has been proven useful both in the classroom and in practice.Chapter 2 presents the theory and practice of generating random numbers and randomvariates from probability distributions. In addition, the student will know why randomnumber generators and their control are essential for simulation modeling. The testing ofpseudorandom numbers is also presented. After this chapter, the student should be aware ofthe methods used to generate and test pseudorandom number sequences. In addition, severalmethods of generating random variates are discussed (inverse transform, acceptance/rejection, convolution, and composition). These techniques are introduced without the addedburden of computer methods.The focus of Chapter 3 is on introducing Monte-Carlo methods within the context of aspreadsheet environment. Students will learn to put into practice the random number andrandom variate generation methods discussed in Chapter 2. In addition, the chapter presentsmaterials on how to organize and perform basic simulation methods within a spreadsheet. The notions of sampling, sample size determination, and statistical inference areintroduced.Chapter 4 introduces Arena. First, Arena is used to perform simple Monte-Carlosimulation, similar to what was presented in Chapter 3. Chapter 4 also introduces theimportant concept of how a discrete-event clock ticks and sets the stage for processmodeling using activity diagramming. A simple (but comprehensive) example of Arena ispresented so that students will feel comfortable with the tool. Finally, debugging and howArena processes events and entities are discussed.Chapter 5 dives deeper into process-oriented modeling. The statistical aspects ofsimulation are downplayed within the chapter. The Basic Process template within Arena isthoroughly covered. Important concepts within process-oriented modeling (e.g., entities,attributes, activities, and state variables) are discussed within the context of a numberof examples. In addition, a deeper understanding of Arena is developed including flowof control, input/output, variables, arrays, and debugging. After finishing Chapter 5,the student should be able to model interesting systems from a process viewpoint usingArena.

INTRODUCTIONxxiChapter 6 emphasizes the role of randomness in simulation. After Chapter 6, the studentshould be able to model the input distributions required for simulation using tools such asR and the Arena Input Analyzer.Building on the use of stochastic elements in simulation, Chapter 7 discusses the majormethods by which simulation output analysis must account for randomness. The differenttypes of statistical quantities (observation based versus time persistent) are defined andthen statistical methods are introduced for their analysis. Specifically, the chapter coversthe method of replication for finite-horizon simulations, the analysis of the initializationtransient period, the method of replication–deletion, and the method of batch means.In addition, the use of simulation to make decisions between competing alternatives ispresented.Chapter 8 returns to model building by presenting models for important classic modelingsituations in queuing and inventory theory. Both analytical and simulation approaches tomodeling these systems are covered. For those instructors who work in a curriculum thathas a separate course on these topics, this chapter presents an opportunity to concentrate onsimulating these systems. The analytical material could easily be skipped without loss ofcontinuity; however, often students learn the most about these systems through simulation.For those instructors where this material is not covered separately, background is presentedon these topics to ensure that students can apply the basics of queuing theory and are awareof basic inventory models. Then,

1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction to Simulation in Arena 97 5 Basic Process Modeling 163 6 Modeling Randomness in Simulation 233 7 Analyzing Simulation Output 299 8 Modeling Queuing and Inventory Systems 393 9 Entity Movement and Material-Handling Constructs 489

Related Documents:

Modeling and Arena MANUEL D. ROSSETTI University of Arkansas WILEY John Wiley & Sons, Inc. Table of Contents 1 Simulation Modeling 1.1 Why Simulate? 2 1.2 Types of Computer Simulation 3 1.3 How the Discrete-Event Clock Works 5 1.4 Randomness in Simulation 9 1.5 Simulation Languages 9

ior and achieving simulation of the behavior in real time. Categories and Subject Descriptors: I.6.5 [Simulation and Modeling]: Model Development— Modeling methodologies General Terms: Simulation, Graphics, Dust Additional Key Words and Phrases: Physically-based Modeling, Real-time Simulation, Vehicle, Particle Systems, Computational Fluid .

CS445: Basic Simulation Modeling!!! Travis Desell!! Averill M. Law, Simulation Modeling & Analysis, Chapter 1. What is Simulation? A simulation uses a computer (or computers) to evaluate a model numerically, and data are gathered in order to estimate the desired true characteristics of the model. 1.

Simulation modeling methodology research and simulation analysis methodology research have evolved into two near-ly separate fields. In this paper, ways are shown how simu-lation might benefit from modeling and analysis becoming more closely integrated. The thesis of this paper is that si-mulation analysis and simulation modeling methodologies,

Modeling and simulation modeling . 5 Formulas that are good for expressing static dependencies between variables, fail to work when it comes to describing the systems with dynamic behavior. This is the time for another modeling technology that is specifically designed for analyzing dynamic systems, namely for . simulation modeling. The .

14 D Unit 5.1 Geometric Relationships - Forms and Shapes 15 C Unit 6.4 Modeling - Mathematical 16 B Unit 6.5 Modeling - Computer 17 A Unit 6.1 Modeling - Conceptual 18 D Unit 6.5 Modeling - Computer 19 C Unit 6.5 Modeling - Computer 20 B Unit 6.1 Modeling - Conceptual 21 D Unit 6.3 Modeling - Physical 22 A Unit 6.5 Modeling - Computer

I Introduction to Discrete-Event System Simulation 19 1 Introduction to Simulation 21 1.1 When Simulation Is the Appropriate Tool 22 1.2 When Simulation Is Not Appropriate 22 1.3 Advantages and Disadvantages of Simulation 23 1.4 Areas of Application 25 1.5 Some Recent Applications of Simulation

BEAM Team Memo Rosalind Arwas Carolyn Perkins Helen Woodhall A very warm welcome to the March/April 2021 edition of The BEAM. This time last year, the spring edition unexpectedly almost became our last but, as the