simulation modeling - download.e-bookshelf.de · brief table of contents 1 simulation modeling 1 2...

30

Upload: leminh

Post on 12-Sep-2018

237 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction
Page 2: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction
Page 3: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

SIMULATION MODELINGAND ARENA®

Page 4: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction
Page 5: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

SIMULATION MODELINGAND ARENA®

MANUEL D. ROSSETTIUniversity of Arkansas

Page 6: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

Copyright © 2016 by John Wiley & Sons, Inc. All rights reserved

Published by John Wiley & Sons, Inc., Hoboken, New JerseyPublished simultaneously in Canada

No 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–dc23

2015006381

Printed in the United States of America

10 9 8 7 6 5 4 3 2 1

2 2016

Page 7: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

To all my students!

Page 8: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction
Page 9: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

BRIEF TABLE OF CONTENTS

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

10 Miscellaneous Topics in Arena Modeling 543

11 Application of Simulation Modeling 633

Page 10: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction
Page 11: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

CONTENTS

Preface xv

Acknowledgments xvii

Introduction xix

1 Simulation Modeling 1

1.1 Simulation Modeling, 11.2 Why Simulate? 21.3 Types of Computer Simulation, 31.4 Simulation: Descriptive or Prescriptive Modeling? 61.5 Randomness in Simulation, 71.6 Simulation Languages, 71.7 Simulation Methodology, 81.8 Organization of The Book, 15

Exercises, 15

2 Generating Randomness in Simulation 17

2.1 The Stochastic Nature of Simulation, 172.2 Random Numbers, 182.3 Random Number Generators, 192.4 Testing Random Numbers, 24

2.4.1 Distributional Tests, 252.4.2 Testing Independence, 34

2.5 Generating Random Variates from Distributions, 372.5.1 Inverse Transform, 382.5.2 Convolution, 462.5.3 Acceptance/Rejection, 47

Page 12: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

x CONTENTS

2.5.4 Mixture Distributions, Truncated Distributions, and ShiftedRandom Variables, 50

2.6 Summary, 54Exercises, 54

3 Spreadsheet Simulation 63

3.1 Simulation in a Spreadsheet Environment, 633.2 Useful Spreadsheet Functions and Methods, 64

3.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, 69

3.3 Example 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, 76

3.4 Introductory Statistical Concepts, 793.4.1 Point Estimates and Confidence Intervals, 793.4.2 Determining the Sample Size, 81

3.5 Summary, 86Exercises, 86

4 Introduction to Simulation in Arena® 97

4.1 Introduction, 974.2 The Arena Environment, 984.3 Performing Simple Monte-Carlo Simulations Using Arena, 100

4.3.1 Redoing Area Estimation with Arena, 1014.3.2 Redoing the News Vendor Problem with Arena, 104

4.4 How The Discrete-Event Clock Works, 1064.5 Modeling a Simple Discrete-Event Dynamic System, 110

4.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, 120

4.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, 133

4.9.1 SIMAN MOD and EXP Files, 1344.9.2 Using the Run Controller, 138

4.10 How Arena Manages Entities and Events, 1454.11 Summary, 149

Exercises, 150

Page 13: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

CONTENTS xi

5 Basic Process Modeling 163

5.1 Elements of Process-Oriented Simulation, 1635.2 Entities, Attributes, and Variables, 1645.3 Creating and Disposing of Entities, 1655.4 Defining Variables and Attributes, 1695.5 Processing Entities, 1745.6 Attributes, Variables, and Some I/O, 176

5.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, 187

5.7 Flow 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, 196

5.8 Batching and Separating Entities, 2105.8.1 Example: Tie-Dye T-Shirts, 210

5.9 Summary, 221Exercises, 223

6 Modeling Randomness in Simulation 233

6.1 Random Variables and Probability Distributions, 2336.2 Modeling with Discrete Distributions, 2386.3 Modeling with Continuous Distributions, 2406.4 Input Distribution Modeling, 2426.5 Fitting Discrete Distributions, 244

6.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, 250

6.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, 263

6.7 Using The Input Analyzer, 2676.8 Additional Input Modeling Concepts, 2766.9 Modeling Randomness in Arena, 279

6.9.1 Conceptualizing the Model, 2806.9.2 Implementing the Model, 282

6.10 Summary, 292Exercises, 293

Page 14: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

xii CONTENTS

7 Analyzing Simulation Output 299

7.1 Types of Statistical Variables, 3007.2 Types of Simulation with Respect to Output Analysis, 3057.3 Analysis of Finite-Horizon Simulations, 307

7.3.1 Determining the Number of Replications, 3097.3.2 Finite Horizon Example, 3117.3.3 Sequential Sampling for Finite-Horizon Simulations, 318

7.4 Analysis 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, 350

7.5 Comparing System Configurations, 3537.5.1 Comparing Two Systems, 3547.5.2 Analyzing Multiple Systems, 372

7.6 Summary, 382Exercises, 384

8 Modeling Queuing and Inventory Systems 393

8.1 Introduction, 3938.2 Single Line Queuing Stations, 394

8.2.1 Queuing Notation, 3968.2.2 Little’s Formula, 3988.2.3 Deriving Formulas for Markovian Single-Queue Systems, 401

8.3 Examples and Applications of Queuing Analysis, 4078.3.1 Infinite Queue Examples, 4078.3.2 Finite Queue Examples, 412

8.4 Non-Markovian Queues and Approximations, 4178.5 Simulating Single Queues in Arena, 419

8.5.1 Machine Interference Optimization Model, 4198.5.2 Using OptQuest on the Machine Interference Model, 4248.5.3 Modeling Balking and Reneging, 427

8.6 Holding and Signaling Entities, 4358.6.1 Redoing the M/M/1 Model with HOLD/SIGNAL, 437

8.7 Networks of Queuing Stations, 4428.7.1 STATION, ROUTE, and SEQUENCE Modules, 444

8.8 Inventory Systems, 4538.8.1 Modeling an (r,Q) Inventory Control Policy, 4548.8.2 Modeling a Multi-Echelon Inventory System, 464

8.9 Summary, 471Exercises, 472

Page 15: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

CONTENTS xiii

9 Entity Movement and Material-Handling Constructs 489

9.1 Introduction, 4899.2 Resource-Constrained Transfer, 490

9.2.1 Implementing Resource-Constrained Transfer, 4929.2.2 Animating Resource-Constrained Transfer, 498

9.3 Constrained Transfer with Transporters, 5019.3.1 Test and Repair Shop with Workers as Transporters, 5049.3.2 Animating Transporters, 509

9.4 Modeling 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, 522

9.5 Modeling Guided Path Transporters, 5289.6 Summary, 537

Exercises, 537

10 Miscellaneous Topics in Arena Modeling 543

10.1 Introduction, 54310.2 Non-stationary Processes, 544

10.2.1 Thinning Method, 54710.2.2 Rate Inversion Method, 548

10.3 Advanced Resource Modeling, 55210.3.1 Scheduled Capacity Changes, 55310.3.2 Calculating Utilization, 55910.3.3 Resource Failure Modeling, 562

10.4 Tabulating Frequencies Using the Statistic Module, 56510.5 Resource and Entity Costing, 568

10.5.1 Resource Costing, 56810.5.2 Entity Costing, 571

10.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, 585

10.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, 622

10.8 Summary, 625Exercises, 625

Page 16: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

xiv CONTENTS

11 Application of Simulation Modeling 633

11.1 Introduction, 63311.2 SM Testing Contest Problem Description, 63511.3 Answering the Basic Modeling Questions, 64011.4 Detailed Modeling, 645

11.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, 663

11.5 Final 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, 671

11.6 Sensitivity Analysis, 67111.7 Completing the Project, 67211.8 Some Final Thoughts, 675

Exercises, 676

Bibliography 677

Appendix A Common Distributions 683

Appendix B Statistical Tables 689

Appendix C Distributions, Operators, Functions in Arena 697

Appendix D Queuing Theory Formulas 699

Appendix E Inventory Theory Formulas 703

Appendix F Useful Equations 705

Appendix G Arena Panel Modules 707

Index 711

Page 17: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

PREFACE

Welcome to the second edition. Similar to the first edition, the book is intended as an intro-ductory 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 uti-lized 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 mate-rial involving the application of spreadsheets to perform simulation. By including spread-sheet 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

Page 18: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction
Page 19: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

ACKNOWLEDGMENTS

I 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

Page 20: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction
Page 21: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

INTRODUCTION

INTENDED AUDIENCE

Discrete-event simulation is an important tool for the modeling of complex system. It isused to represent manufacturing, transportation, and service systems in a computer pro-gram 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 simu-lation 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.

Page 22: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

xx INTRODUCTION

I 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 read-ing 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 BOOK

Chapter 1 is an introduction to the field of simulation modeling and to modeling method-ologies. 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 methodol-ogy 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/rejec-tion, 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 spread-sheet. 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.

Page 23: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

INTRODUCTION xxi

Chapter 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, the basic models are extended so that students understandhow simulation quickly becomes necessary when modeling more realistic situations.

Chapter 9 presents a thorough treatment of the entity transfer and material handlingconstructs within Arena. Students learn the fundamentals of resource-constrained transfers,free path transporters, conveyors, and fixed path transporters. The animation of modelscontaining these elements is also emphasized.

Chapter 10 pulls together a number of miscellaneous topics that round out the use ofArena. In particular, the chapter covers activity-based costing and presents advanced aspectsof modeling with resources (e.g., schedules and failure modeling). It also presents a fewuseful modules that were not previously covered (e.g., picking stations, generic stations,and picking up and dropping off entities). An introduction to using Visual Basic and Arenais also presented.

Finally, Chapter 11 presents a detailed case study using Arena. An IIE/Rockwell Soft-ware Arena Contest problem is solved in its entirety. This chapter ensures that students willbe ready to solve such a problem if assigned as a project for the course. The chapter wrapsup with some practical advice for performing simulation projects.

SPECIAL FEATURES

• Each chapter begins with specific learning objectives.

• Integrating the statistical aspects of simulation (e.g., output analysis) with the tool.More detailed discussions of the statistical aspects of simulation are presented than isfound in many other simulation language-oriented textbooks.

• Studies have shown that activity-based learning is critical to student retention ofmaterial. The text is organized around the building of models with the intention

Page 24: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

xxii INTRODUCTION

that students should be following along at the computer while working throughthe chapters. Instructors can perform the activities or organize computer laboratoryexercises around the development of the models in the text.

• Special emphasis on the computer programming aspects of simulation: Students whotake a course based on this text will be expected to have had at least one entry-levelcomputer programming course; however, even with this background, most studentsare woefully ill-prepared to use computers to solve problems. The theory-basedtextbooks do not cover this material and the simulation package textbooks attemptto downplay the programming aspects of their environment so that the modelingenvironment appears attractive to noncomputer-oriented users. This book is intendedto enable students to understand the inner workings of the simulation environmentand thus demystify the black box. The language elements of the simulation envi-ronment are compared to standard computer language elements so that students canmake the appropriate analogies to already studied material. Detailed presentation ofpseudo-code enhances the understanding of the programming constructs.

• While Arena is the modeling tool, the conceptual modeling process presented in thetext is based on language-independent methods including but not limited to rich pictur-ing, elementary flowcharting, activity diagramming, and pseudo-code development.The emphasis is placed on developing a specification for a model that could be imple-mented in any simulation language environment.

• Coverage of classic stochastic models from operations research: One chapter is ded-icated to queuing and inventory models. In many curricula, if the analytical modelsare presented, they will be taught in a different course. In my opinion, the simulationof classic models along with their analytical treatment can provide for deeper studentlearning on these topics. In addition, the presentation of these classic models bothanalytically and through simulation provides simple systems on which to build theteaching of complex more practical extensions.

• Comprehensive examples, exercises, questions, and problem sets developed from theauthors’ teaching, research, and industrial experiences.

• Students can download the Arena software directly from www.arenasimulation.com.Chapter illustrations and files (e.g., Arena and Microsoft® Office Excel®) are availablefrom the course site. A comprehensive set of presentation slides are also available forstudents and instructors to use within the classroom. Finally, solutions for many ofthe exercises are available to instructors.

COURSE SYLLABUS SUGGESTION

Early versions of the manuscript for this textbook were used for multiple semesters in mycourse at the University of Arkansas. The course that I teach is to junior/senior-level under-graduate industrial engineering students. In addition, graduate students who have never hada course in simulation take the course. Graduate students are given extra homework assign-ments and are tested over some of the more theoretical aspects presented in the text (e.g.,acceptance/rejection). I am able to cover most parts of Chapters Chapter 1–9 within a typ-ical 16-week semester offering. A typical topic outline is as follows assuming 80-minutelecture periods.

Page 25: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

INTRODUCTION xxiii

#Lectures Topic Readings

1 Introduction Chapter 12 Random number generation Chapter 22 Random variate generation Chapter 22 Spreadsheet Simulation Chapter 32 Introduction to Arena Chapter 44 Basic Process Modeling Chapter 52 Input modeling Chapter 62 Finite-horizon simulation Chapter 73 Infinite-horizon simulation Chapter 71 Comparing alternatives Chapter 74 Queuing models Chapter 85 Entity transfer and material handling constructs Chapter 930

I use three examinations and a project within the course. Examination 1 covers ChaptersChapter 1–3. Examination 2 covers Chapters Chapter 4–6. Examination 3 tests overChapters Chapter 7–9. I do not formally test the students on the material in ChaptersChapter 10 and Chapter 11 since they will be using all previously learned materialand components when performing their final project. Students are assigned homeworkthroughout the semester and quizzed on the homework via online questions. In addition,to formal lectures, my course has a computer-based laboratory component that meets 1day each week. During this time, the students are required to work on computer-basedassignments that are based on the examples in the textbook.

ABOUT THE AUTHOR

Dr. Manuel D. Rossetti grew up in Canton, Ohio. He received his PhD and MSIE degrees inIndustrial and Systems Engineering from The Ohio State University and his BSIE degreefrom the University of Cincinnati. He is a registered professional engineer in the State ofArkansas.

Dr. Rossetti joined the Industrial Engineering Faculty at the University of Arkansas inAugust 1999. He was awarded tenure and promoted to Associated Professor in August 2003and promoted to Full Professor in August 2010. Dr. Rossetti was also appointed AssociateDepartment Head for the Department of Industrial Engineering in August 2010. Dr. Rossetticurrently serves as the Director for the Center for Excellence in Logistics and Distribution,a National Science Foundation Industry/University Cooperative Research Center.

His research interests include the design, analysis, and optimization of manufactur-ing, health care, logistics, and transportation systems using stochastic modeling, computersimulation, and mathematical modeling techniques. Dr. Rossetti has published over 85journal and conference articles in the areas of transportation, manufacturing, health care,and simulation, and he has obtained over $4 million dollars in research funding. His researchsponsors have included the Pine Bluff Arsenal, The Arkansas Science and TechnologyAuthority, the Defense Logistics Agency, the Naval Systems Supply Command, the AirForce Research Laboratory, Wal-Mart Stores Inc., the Transportation Research Board, USDepartment of Transportation, and the National Science Foundation.

Page 26: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

xxiv INTRODUCTION

Dr. Rossetti was selected as a Lilly Teaching Fellow funded by the Lilly Endowmentin 1997/1998 and won a UA Baum Teaching Enhancement Grant in 2002. Dr. Rossettihas won the UA Industrial Engineering Outstanding Teaching Award in 2002, 2008, and2011. He has also been voted as the best IE teacher by IE students in 2007 and 2009.Dr. Rossetti received the John L. Imhoff Outstanding Teacher Award in 2011–2012 forthe College of Engineering and the Charles and Nadine Baum Teaching Award for theUniversity of Arkansas in 2013, the highest teaching honor bestowed at the university. In2013, Dr. Rossetti was elected into the University of Arkansas’ Teaching Academy.

Page 27: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

1SIMULATION MODELING

LEARNING OBJECTIVES

• To be able to describe what computer simulation is.

• To be able to discuss why simulation is an important analysis tool.

• To be able to list and describe the various types of computer simulations.

• To be able to describe a simulation methodology.

1.1 SIMULATION MODELING

In this book, you will learn how to model systems within a computer environment in orderto analyze system design configurations. The models that you will build and exercise arecalled simulation models. When developing a simulation model, the modeler attempts torepresent the system in such a way that the representation assumes or mimics the pertinentoutward qualities of the system. This representation is called a simulation model. When youexecute the simulation model, you are performing a simulation. In other words, simulationis an instantiation of the act of simulating. A simulation is often the next best thing toobserving the real system. If you have confidence in your simulation, you can use it toinfer how the real system will operate. You can then use your inference to understand andimprove the system’s performance.

In general, simulations can take on many forms. Almost everyone is familiar with theboard game Life™. In this game, the players imitate life by going to college, getting a job,getting married, etc. and finally retiring. This board game is a simulation of life. As another

Simulation Modeling and Arena®, Second Edition. Manuel D. Rossetti.© 2016 John Wiley & Sons, Inc. Published 2016 by John Wiley & Sons, Inc.

Page 28: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

2 SIMULATION MODELING

example, the military performs war game exercises which are simulations of battlefieldconditions. Both of these simulations involve a physical representation of the thing beingsimulated. The board game, the rules, and the players represent the simulation model. Thebattlefield, the rules of engagement, and the combatants are also physical representations.No wishful thinking will make the simulations that you develop in this book real. This is thefirst rule to remember about simulation. A simulation is only a model (representation) of thereal thing. You can make your simulations as realistic as time and technology allows, butthey are not the real thing. As you would never confuse a toy airplane with a real airplane,you should never confuse a simulation of a system with the real system. You may laugh atthis analogy, but as you apply simulation to the real world, you will see analysts who forgetthis rule. Don’t be one.

All the previous examples involved a physical representation or model (real things sim-ulating other real things). In this book, you will develop computer models that simulate realsystems. Ravindran et al. [1987] defined computer simulation as “A numerical techniquefor conducting experiments on a digital computer which involves logical and mathemati-cal relationships that interact to describe the behavior of a system over time.” Computersimulations provide an extra layer of abstraction from reality that allows fuller control ofthe progression of and the interaction with the simulation. In addition, even though com-puter simulations are one step removed from reality, they are often capable of providingconstructs which cannot be incorporated into physical simulations. For example, an air-plane flight simulator can have emergency conditions for which it would be too dangerousor costly to provide in a physical-based simulation training scenario. This representationalpower of computer modeling is one of the main reasons why computer simulation is used.

1.2 WHY SIMULATE?

Imagine trying to analyze the following situation. Patients arrive at an emergency room.The arrival of the patients to the emergency department occurs randomly and may vary withthe day of the week and even the hour of the day. The hospital has a triage station, wherethe arriving patient’s condition is monitored. If the patient’s condition warrants immediateattention, the patient is expedited to an emergency room bed to be attended by a doctor anda nurse. In this case, the patient’s admitting information may be obtained from a relative.If the patient does not require immediate attention, the patient goes through the admittingprocess, where the patient’s information is obtained. The patient is then directed to thewaiting room, to wait for allocation to a room, a doctor, and a nurse. The doctors and nurseswithin the emergency department must monitor the health of the patients by performingtests and diagnosing the patient’s symptoms. This occurs on a periodic basis. As the patientreceives care, the patient may be moved to and require other facilities [magnetic resonanceimaging (MRI), X-ray, etc.]. Eventually, the patient is either discharged after receiving careor admitted to the main hospital. The hospital is interested in conducting a study of theemergency department in order to improve the care of the patients while better utilizing theavailable resources. To investigate this situation, you might need to understand the behaviorof certain measures of performance:

• The average number of patients who are waiting.

• The average waiting time of the patients and their average total time in the emergencydepartment.

Page 29: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

TYPES OF COMPUTER SIMULATION 3

• The average number of rooms required per hour.

• The average utilization of the doctors and nurses (and other equipment).

Because of the importance of emergency department operations, the hospital hashistorical records available on the operation of the department through its patient trackingsystem. With these records, you might be able to estimate the current performance ofthe emergency department. Despite the availability of this information, when conductinga study of the emergency department, you might want to propose changes to how thedepartment will operate (e.g., staffing levels) in the future. Thus, you are faced with tryingto predict the future behavior of the system and its performance when making changes tothe system. In this situation, you cannot realistically experiment with the actual systemwithout possibly endangering the lives or care of the patients. Thus, it would be better tomodel the system and test the effect of changes on the model. If the model has acceptablefidelity, then you can infer how the changes will affect the real system. This is wheresimulation techniques can be utilized.

If you are familiar with operations research and industrial engineering techniques, youmay be thinking that the emergency department can be analyzed by using queuing mod-els. Later chapters of this book will present more about queuing models; however, for thepresent situation, the application of queuing models will most likely be inadequate dueto the complex policies for allocating nurses, doctors, and beds to the patients. In addition,the dynamic nature of this system (the non-stationary arrivals, changing staffing levels, etc.)cannot be well modeled with current analytical queuing models. Queuing models might beused to analyze portions of the system, but a total analysis of the dynamic behavior of theentire system is beyond the capability of these types of models. But, a total analysis of thesystem is not beyond simulation modeling.

A key advantage of simulation modeling is that it has the capability of modeling theentire system and its complex interrelationships. The representational power of simula-tion provides the flexible modeling that is required for capturing complex processes. Asa result, all the important interactions among the different components of the system canbe accounted for within the model. The modeling of these interactions is inherent in sim-ulation modeling because simulation imitates the behavior of the real system (as closelyas necessary). The prediction of the future behavior of the system is then achieved bymonitoring the behavior of different modeling scenarios as a function of simulated time.Real-world systems are often too complex for analytical models and often too expensiveto experiment with directly. Simulation models allow the modeling of this complexity andenable low cost experimentation to make inferences about how the actual system mightbehave.

1.3 TYPES OF COMPUTER SIMULATION

The main purpose of a simulation model is to allow observations about a particular systemto be collected as a function of time. So far the word system has been used in much ofthe discussion, without formally discussing what a system is. According to Blanchardand Fabrycky [1990], a system is a set of interrelated components working togethertoward a common objective. The standard for systems engineering provides a deeperdefinition:

Page 30: SIMULATION MODELING - download.e-bookshelf.de · BRIEF TABLE OF CONTENTS 1 Simulation Modeling 1 2 Generating Randomness in Simulation 17 3 Spreadsheet Simulation 63 4 Introduction

4 SIMULATION MODELING

“A system is a composite of people, products, and processes that provide a capability to satisfystated needs. A complete system includes the facilities, equipment (hardware and software),materials, services, data, skilled personnel, and techniques required to achieve, provide, andsustain system effectiveness.” Air Force Systems Command (1991)

Figure 1.1 illustrates the fact that a system is embedded within an environment and thattypically a system requires inputs and produces output using internal components. How youmodel a particular system will depend on the intended use of the model and how you per-ceive the system. The modeler’s view of the system colors how they conceptualize it. Forexample, for the emergency room situation, “What are the system boundaries? Should theambulance dispatching and delivery process be modeled? Should the details of the operatingroom be modeled?” Clearly, the emergency room has these components, but your concep-tualization of it as a system may or may not include these items, and thus, your decisionsregarding how to conceptualize the system will drive the level of abstraction within yourmodeling. An important point to remember is that two perfectly logical and rational peoplecan look at the same thing and conceptualize that thing as two entirely different systemsbased on their “Weltanschauung” or world view.

Because how you conceptualize a system drives your modeling, it is useful to discusssome general system classifications. Systems might be classified by whether or not theyare man-made (e.g., manufacturing system) or whether they are natural (e.g., solar system).A system can be physical (e.g., an airport) or conceptual (e.g., a system of equations). Ifstochastic or random behavior is an important component of the system, then the system issaid to be stochastic; if not, then it is considered deterministic. One of the more useful waysto look at a system is whether it changes with respect to time. If a system does not changesignificantly with respect to time, it is said to be static, else it is called dynamic. If a systemis dynamic, you might want to consider how it evolves with respect to time. A dynamicsystem is said to be discrete if the state of the system changes at discrete points in time. Adynamic system is said to be continuous if the state of the system changes continuously withtime. This dichotomy is purely a function of your level of abstraction. If conceptualizing

Systemcomponent

Systemboundary

Inputs

Environment

Outputs

Figure 1.1 A conceptualization of a system.