Kamrani, Series Advisors University of Houston, Houston, TX Facility Logistics: Approaches and Solutions to Next Generation Challenges Maher Lahmar ISBN: 0-8493-8518-0 Simulation of Indu
Trang 2SIMULATION OF INDUSTRIAL SYSTEMS
Trang 3ENGINEERING AND MANAGEMENT INNOVATION SERIES
Hamid R Parsaei and Ali K Kamrani, Series Advisors
University of Houston, Houston, TX
Facility Logistics: Approaches and Solutions to Next Generation Challenges
Maher Lahmar
ISBN: 0-8493-8518-0
Simulation of Industrial Systems: Discrete Event Simulation Using Excel/VBA
David Elizandro and Hamdy Taha
Integral Logistics Management: Operations and
Supply Chain Management in Comprehensive
Value-Added Networks, Third Edition
The Portal to Lean Production: Principles
& Practices for Doing More With Less
by John Nicholas and Avi Soni
ISBN: 0-8493-5031-X
Supply Market Intelligence: A Managerial
Handbook for Building Sourcing Strategies
by Robert B Handfield
ISBN: 0-8493-2789-X
The Small Manufacturer s Toolkit: A Guide to
Selecting the Techniques and Systems to Help
You Win
by Steve Novak
ISBN: 0-8493-2883-7
Velocity Management in Logistics and Distribution:
Lessons from the Military to Secure the Speed
of Business
by Joseph L Walden
ISBN: 0-8493-2859-4
Supply Chain for Liquids: Out of the Box
Approaches to Liquid Logistics
by Wally Klatch
ISBN: 0-8493-2853-5
Supply Chain Architecture: A Blueprint for Networking
the Flow of Material, Information, and Cash
Introduction to e-Supply Chain Management:
Engaging Technology to Build Market-Winning Business Partnerships
by David C Ross ISBN: 1-57444-324-0
Supply Chain Networks and Business Process Orientation
by Kevin P McCormack and William C Johnson with William T Walker ISBN: 1-57444-327-5
Collaborative Manufacturing: Using Real-Time Information to Support the Supply Chain
by Michael McClellan ISBN: 1-57444-341-0
The Supply Chain Manager s Problem-Solver:
Maximizing the Value of Collaboration and Technology
by Charles C Poirier ISBN: 1-57444-335-6
Lean Performance ERP Project Management:
Implementing the Virtual Lean Enterprise, Second Edition
by Brian J Carroll ISBN: 0-8493-0532-2
Integrated Learning for ERP Success:
A Learning Requirements Planning Approach
by Karl M Kapp, with William F Latham and Hester N Ford-Latham
ISBN: 1-57444-296-1
Basics of Supply Chain Management
by Lawrence D Fredendall and Ed Hill ISBN: 1-57444-120-5
Lean Manufacturing: Tools, Techniques, and How to Use Them
by William M Feld ISBN: 1-57444-297-X
Back to Basics: Your Guide to Manufacturing Excellence
by Steven A Melnyk and R.T Chris Christensen ISBN: 1-57444-279-1
Enterprise Resource Planning and Beyond:
Integrating Your Entire Organization
by Gary A Langenwalter ISBN: 1-57444-260-0 ISBN: 0-8493-8515-6
Trang 4New York London
SIMULATION OF INDUSTRIAL SYSTEMS
David Elizandro • Hamdy Taha
Discrete Event Simulation Using Excel/VBA
Trang 5Microsoft, Windows, and Excel are registered trademarks of Microsoft Corporation in the United States and/
or other countries.
DEEDS is a copyright of David Elizandro.
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2007 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S Government works
Version Date: 20140313
International Standard Book Number-13: 978-1-4200-6745-3 (eBook - PDF)
This book contains information obtained from authentic and highly regarded sources Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S Copyright Law, no part of this book may be reprinted, reproduced, ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers.
transmit-For permission to photocopy or use material electronically from this work, please access www.copyright com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400 CCC is a not-for-profit organization that provides licenses and registration for a variety of users For organizations that have been granted a photocopy license by the CCC,
a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used
only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
Trang 6To Marcia and Karen
Trang 8Contents
Preface xv
Acknowledgments xxi
Th e Authors xxiii
PART I SIMULATION FUNDAMENTALS 1 Simulation Modeling 3
1.1 Why Simulate? 3
1.2 Types of Simulation 5
1.3 Th e Simulation Clock 5
1.4 Randomness in Simulation 7
1.5 Discrete Simulation Languages 7
1.6 Design Environment for Event-Driven Simulation 8
1.7 Th e Two Sides of Simulation 9
1.8 Organization of the Book 10
For Further Reading 11
Problems 11
2 Probability and Statistics in Simulation 13
2.1 Role of Probability and Statistics in Simulation 13
2.2 Characterization of Common Distributions in Simulation 14
2.2.1 Properties of Common Distributions 14
2.2.1.1 Uniform Distribution 14
2.2.1.2 Negative Exponential Distribution 15
2.2.1.3 Gamma (Erlang) Distribution 16
2.2.1.4 Normal Distribution 17
2.2.1.5 Lognormal Distribution 17
2.2.1.6 Weibull Distribution 18
2.2.1.7 Beta Distribution 19
2.2.1.8 Triangular Distribution 19
2.2.1.9 Poisson Distribution 20
Trang 9viii ■ Contents
2.2.2 Identifying Distribution on the Basis of Historical Data 21
2.2.2.1 Building Histograms 21
2.2.2.2 Goodness-of-Fit Tests 23
2.2.2.3 Maximum Likelihood Estimates of Distribution Parameters 26
2.3 Statistical Output Analysis 27
2.3.1 Confi dence Intervals 27
2.3.1.1 Satisfying the Normality Assumption in Simulation 29
2.3.2 Hypothesis Testing 29
2.4 Summary 32
References 32
Problems 33
3 Elements of Discrete Simulation 37
3.1 Concept of Events in Simulation 37
3.2 Common Simulation Approaches 38
3.2.1 Event-Scheduling Approach 38
3.2.2 Activity-Scanning Approach 44
3.2.3 Process-Simulation Approach 46
3.3 Computations of Random Deviates 48
3.3.1 Inverse Method 48
3.3.2 Convolution Method 51
3.3.3 Acceptance–Rejection Method 53
3.3.4 Other Sampling Methods 55
3.3.5 Generation of (0, 1) Random Numbers 56
3.4 Collecting Data in Simulation 57
3.4.1 Types of Statistical Variables 57
3.4.2 Histograms 59
3.4.3 Queue and Facility Statistics in Simulation 63
3.4.3.1 Queue Statistics 63
3.4.3.2 Facility Statistics 65
3.5 Summary 68
References 68
Problems 68
4 Gathering Statistical Observations in Simulation 73
4.1 Introduction 73
4.2 Peculiarities of the Simulation Experiment 73
4.2.1 Issue of Independence 74
4.2.2 Issue of Stationarity (Transient and Steady-State Conditions) 74
4.2.3 Issue of Normality 76
Trang 10Contents ■ ix
4.3 Peculiarities of the Simulation Experiment 76
4.3.1 Normality and Independence 77
4.3.2 Transient Conditions 78
4.4 Gathering Simulation Observations 80
4.4.1 Subinterval Method 80
4.4.2 Replication Method 83
4.4.3 Regenerative Method 84
4.5 Variance Reduction 86
4.6 Summary 87
References 88
Problems 88
5 Overview of DEEDS 89
5.1 Introduction 89
5.2 DEEDS Modeling Philosophy 89
5.3 Basic Elements of DEEDS 91
5.4 Basic Features of DEEDS 93
5.4.1 Network Representation 93
5.4.2 Time Management (Simulation Clock) 93
5.4.3 DEEDS Class Defi nitions 94
5.4.4 User’s Files Management 94
5.4.5 Generation of Random Samples 96
5.4.6 Statistical Observations Gathering 96
5.4.7 Interactive Debugging and Trace 96
5.4.8 Computations of Mathematical Expressions 98
5.4.9 Initialization Capabilities 98
5.4.10 Output Capabilities 98
5.4.11 Model Documentation 99
5.5 Develop and Execute a DEEDS Model 99
5.6 Summary 99
6 DEEDS Network Representation 101
6.1 Components of the DEEDS Model 101
6.1.1 DEEDS Nodes 101
6.1.2 DEEDS Transactions 102
6.1.3 DEEDS Lists 102
6.1.4 DEEDS Classes and Procedures 103
6.1.5 DEEDS Simulation Program 104
6.2 Program Initial Conditions 108
6.3 Summary 110
Trang 11x ■ Contents
PART II EXCEL/VBA AND DESIGN ENVIRONMENT
FOR DISCRETE EVENT SIMULATION
7 VBA Programming 113
7.1 Introduction 113
7.2 Names 113
7.3 Data Types 113
7.4 Variable Defi nitions 114
7.5 Constants 115
7.6 Expressions 116
7.7 Assignment Statements 117
7.8 Control Structures 119
7.8.1 If 119
7.8.2 Case 121
7.8.3 For 123
7.8.4 Do 123
7.9 Procedures 124
7.9.1 Subs 125
7.9.2 Functions 128
7.10 Arrays 128
7.11 Summary 131
8 User Interface 133
8.1 Introduction 133
8.2 Overview of ProgramManager 133
8.3 Source Nodes 135
8.4 Queue Nodes 136
8.5 Facility Nodes 137
8.6 Initial Model 138
8.6.1 Build VBA Code 139
8.6.2 Program Execution 142
8.6.3 Viewing Options 144
8.7 Delay Nodes 149
8.8 Statistical Variables 149
8.9 User-Defi ned Probability Functions 153
8.10 User-Defi ned Tables 155
8.11 Program Execution—Expanded 156
8.12 Summary 157
9 Modeling Procedures 159
9.1 Introduction 159
9.2 Visual Basic Procedures 159
9.3 Simulator Procedures 160
Trang 12Contents ■ xi
9.4 DEEDS Classes 162
9.4.1 Source 163
9.4.2 Queue 165
9.4.3 Facility 169
9.4.4 Delay 176
9.4.5 Transaction 177
9.4.6 Statistic 181
9.4.7 pdf 183
9.4.8 Table 185
9.5 Distribution Functions 186
9.6 Visual Basic Functions 187
9.7 Excel WorksheetFunction 188
9.8 Summary 195
Problems 195
10 Simulation Output 205
10.1 Introduction 205
10.2 Gathering Observations 205
10.3 Simulation Messages 207
10.4 Monitoring Simulation During Execution 207
10.5 Forced Model Termination 208
10.6 Standard Output 209
10.6.1 Source Sheet 209
10.6.2 Queue Sheet 209
10.6.3 Facility Sheet 211
10.6.4 Delay Sheet 212
10.6.5 Statistics Sheet 212
10.6.6 UserOutput Sheet 213
10.7 Model Verifi cation 214
10.7.1 User-Defi ned Simulator Messages 214
10.7.2 Trace Report 215
10.7.3 Collection Report 217
10.8 VBA Interactive Debugger 218
10.9 Summary 223
11 Analysis of Simulation Results 225
11.1 Introduction 225
11.2 Eff ect of Transient State 227
11.3 Gathering Statistical Observations 232
11.4 Establishing Confi dence Intervals 234
11.5 Hypothesis Testing in Simulation Experiments 235
11.6 Summary 236
Reference 236
Trang 13xii ■ Contents
12 Modeling Special Eff ects 237
12.1 Introduction 237
12.2 A Multi-Server Facility to Represent Independent Facilities 237
12.3 Facility Preemption Operation 240
12.4 Limit on Waiting Time in Queues 242
12.5 Time-Dependent Intercreation Times at a Source 244
12.6 Network Logic Change Using Queue Nodes 246
12.7 Controlled Blockage of a Facility 248
12.8 Assemble and Match Sets with Common Queues 250
12.9 Jackson Networks 252
12.10 Sampling without Replacement 254
Reference 255
Problems 255
13 Advanced Routing Techniques 259
13.1 Introduction 259
13.2 Routing Transactions 259
13.2.1 Always Routing 260
13.2.2 Conditional Routing 260
13.2.3 Select Routing 261
13.2.3.1 Node Independent 262
13.2.3.2 Current State of Node 264
13.2.3.3 “Recent History” of Node 264
13.2.4 Probabilistic Routing 265
13.2.5 Dependent Routing 266
13.2.6 Exclusive Routing 267
13.2.7 Last Choice 267
13.3 Synchronized Queues 270
13.3.1 Match 270
13.3.2 Assemble Transactions 272
13.4 Summary 274
Problems 274
PART III APPLICATIONS 14 Simulation Project Management 281
14.1 Introduction 281
14.2 System Specifi cation 281
14.3 Simulation Constants, Decision Variables, and Constraints 283
14.4 Data Specifi cations 286
14.5 Project Management 288
14.5.1 Problem Defi nition 289
14.5.2 Preliminary Design 290
Trang 14Contents ■ xiii
14.5.3 Validate Design 290
14.5.4 Model Development 290
14.5.5 Verify Model 291
14.5.6 Design/Conduct Experiments 291
14.5.7 Summarize/Present Results 292
14.6 Summary 292
References 293
15 Facilities Layout Models 295
15.1 Introduction 295
15.2 Line Balancing 296
15.3 Flexible Manufacturing Environment 306
Reference 317
16 Materials-Handling Models 319
16.1 Introduction 319
16.2 Transporter Car 319
16.3 Overhead Crane 323
16.4 Carrousel Conveyor 330
16.5 Belt Conveyor—Plywood Mill Operation 334
References 342
17 Inventory Control Models 343
17.1 Introduction 343
17.2 Discount Store Model 343
17.3 Periodic Review Model 348
17.4 Continuous Review Model 352
References 357
18 Scheduling Models 359
18.1 Introduction 359
18.2 Job Shop Scheduling 359
18.3 PERT Project Scheduling 367
18.4 Daily Manpower Allocation 372
References 379
19 Maintenance and Reliability Models 381
19.1 Introduction 381
19.2 General Reliability Model 381
19.3 Maintenance Scheduling 385
20 Quality Control Models 397
20.1 Introduction 397
20.2 Costing Inspection Plans 397
Trang 15xiv ■ Contents
20.3 Monitoring Control Charts 403
Reference 410
21 Supply Chain Models 411
21.1 Introduction 411
21.2 Port Operation 411
21.3 Automatic Warehouse Operation 421
21.4 Cross Dock Model 430
References 439
Problems 439
22 Advanced Analysis Techniques 447
22.1 Introduction 447
22.2 Evaluation of Alternatives 447
22.3 Design of Experiments 448
22.4 Simulation and Search Algorithms 450
22.5 Cross Dock Problem 452
22.6 Summary 464
References 466
Appendix A Initializing DEEDS 467
Appendix B Classes and Procedures 479
Appendix C Histograms Using Excel 489
Index 495
Trang 16Preface
Lean manufacturing describes the Toyota Production System According to Taiichi
Ohno, the focus of Toyota was “the absolute elimination of waste.” Th ere are
vari-ations on implementation of lean systems, but the essence is that a continuous
one-piece fl ow is ideal with emphasis on integrating systems of people, equipment,
materials, and facilities, to achieve improvements in quality, cost, on-time delivery,
and performance Process improvements are typically described as a reduction in
cycle time or lead time; a reduction in the cost of space, inventory, and capital
equipment; an increase in capacity utilization; and the elimination of bottlenecks
Production systems, based on the concept of lean manufacturing, are becoming
a paradigm across many industries In a broader sense, operations management is
the practice of coordinating the physical work place with the people and work of
a particular organization to support organizational objectives As such, operations
managers have responsibility for planning, operating, and maintaining complex
and diverse resources Similar to manufacturing processes, improvements in these
production systems may also be described in terms of reduced cycle time,
reduc-tion in cost, increase in capacity utilizareduc-tion, and the eliminareduc-tion of bottlenecks In
any production environment, discrete event simulation is a powerful tool for the
analysis, planning, design, and operation of those facilities
Th is book is written for the novice who wants to learn the basics of discrete
simulation as well as for professionals who wish to use discrete event simulation
to model systems described above Th e book assumes that the reader has a
funda-mental familiarity with modeling concepts and Excel; however, it does not assume
any prior programming experience Th e book is organized into three parts Part I
presents concepts of discrete simulation Part II covers the Design Environment for
Event-Driven Simulation (DEEDS), and Part III presents a variety of applications
using DEEDS Th e DEEDS environment is itself an Excel/VBA add-in
Background
Basic approaches to discrete simulation have been process simulation languages
(e.g., GPSS) and event-scheduling type (e.g., SIMSCRIPT) Th e trade-off s are that
Trang 17xvi ■ Preface
event-scheduling languages off er more modeling fl exibility and process-oriented
languages are more intuitive to the user
Process-oriented languages are based on blocks (or nodes) that perform
func-tions in serial fashion For example, suppose that a transaction leaving a queue must
dispose of a previously acquired resource before it enters one of several available
facilities for processing Th e leaving transaction must pass through a special block/
node to dispose of the resource and then through another to select the desired
facility
In a process-oriented language, special blocks/nodes must be designed to
respond to distinct modeling needs Th e result is that the language is not as
user-friendly because of the high level of model abstractness and the large number of
blocks/nodes in the language Also, the fact that transactions must pass through
these blocks/nodes serially does indeed reduce the language fl exibility and may
create the need for external (FORTRAN, Visual Basic, or Java) program inserts A
third disadvantage is that each special block/node is designed to respond to specifi c
modeling needs, an approach that inevitably leads to a degree of redundancy, and
hence ineffi ciency, in the language
Objectives of the Book
With these considerations in mind, we embarked on the development of a new
discrete simulation environment Th e design objectives are to
Achieve the modeling fl exibility of an event-driven simulation languageAchieve the intuitive nature of a process-oriented language
Develop a user-friendly implementation environment
In essence, the goal was to design a development environment that is easy to use,
yet fl exible enough to model complex production systems
Approach
Using pioneering ideas of Q-GERT’s network simulation (nodes connected by
branches), Taha developed the simulation language SIMNET Th e basis of
SIM-NET was that the majority of discrete simulations may be viewed in some form or
other as a complex combination of simple queuing systems SIMNET has four basic
types of nodes: a source from which transactions arrive, a queue where transactions
may wait when necessary, a facility where service is performed, and a “Delay” node,
which is an infi nite-capacity generalization of a facility node
DEEDS implements the basic tenets of SIMNET in the Excel/VBA
environ-ment Each node is designed to be self-contained, in the sense that user-developed
䡲
䡲
䡲
Trang 18Preface ■ xvii
event handlers written in Visual Basic for Applications (VBA) manage the transaction
before it enters and as it leaves the node In essence, such a defi nition implements the
sequential nature of a process-oriented language, without the many blocks, and
pro-vides for the fl exibility of event-driven simulation languages Th is approach has proven
to be eff ective and convenient in handling very complex simulation models
DEEDS is used by undergraduate industrial engineering students in the fi rst
simulation course at Tennessee Technological University Th ese students have
com-pleted an information systems course based on Excel and VBA It is gratifying to
report that these students were able to use DEEDS eff ectively to program fairly
complex models after only four weeks of instruction Some of these models are
included in this book
Th e students indicated the following advantages of DEEDS:
Excel facilitates model development and presentation of results
With a VBA background, DEEDS is easy to learn
A user interface facilitates model development and program management
An interactive VBA debugger and “like English” trace report reduce the
eff ort to validate a model
VBA class defi nitions facilitate managing the four network nodes
Explicit simulator messages detail unusual events that occur during the simulation
Contents
Th e fi rst part (Chapters 1 through 6) focuses on the fundamentals of simulation,
and the second part (Chapters 7 through 13) covers DEEDS Chapters 14 through
22, the third part, present examples of production systems models and techniques
for using DEEDS to improve decision-making
In Part I, the subject of simulation is treated in a generic sense to provide the
reader with an understanding of the capabilities and limitations of this important
tool Chapter 1 provides an overview of simulation modeling with emphasis on the
statistical nature of simulation Chapter 2 gives a summary of the role of statistics
in the simulation experiment Chapter 3 is devoted to introducing the elements
of discrete simulation including types of simulation, methods for sampling from
distributions, and methods for collecting data in simulation runs Th e material
in Chapter 4 deals with the statistical peculiarities of the simulation experiment
and ways to circumvent the diffi culties arising from these peculiarities Chapter
5 begins with an overview of the DEEDS environment Chapter 6 introduces the
network representation and VBA classes to represent sources, queues, facilities, and
delays in DEEDS
Although the material in Part I treats simulation in a general sense, it ties to
DEEDS by introducing and defi ning the terminology and the concepts used in the
Trang 19xviii ■ Preface
development of the language Th e reader is encouraged to review at least Chapters
3 through 6 before beginning Part II
In Part II, Chapter 7 provides an overview of the VBA essentials needed for
programming in the DEEDS environment Chapter 8 presents features of the
ProgramManager, the user interface for program management Also in Chapter 8 is
a description of the EventsManager module where the simulation program resides
and how to develop and execute a program Chapter 9 presents details of developing
simulation programs in DEEDS Included in Chapter 9 are Simulator procedures
and methods for DEEDS classes In Chapter 10 are the output features of DEEDS
and model validation tools such as simulation reports and the VBA Interactive
Debugger Chapter 11 presents details on how to conduct simulation experiments
in DEEDS Chapter 12 presents a variety of programs that demonstrate the fl
ex-ibility of DEEDS In Chapter 13 are advanced features of DEEDS that assist the
modeler with complex transaction routing schemes
In Part III, Chapter 14 presents concepts on the design and development of
large and complex simulation models Also presented in Chapter 14 is an overview
of management issues related to simulation projects In Chapters 15 through 21,
DEEDS simulation programs are designed and developed for a spectrum of
tradi-tional application areas that include facilities layout, materials handling, inventory
control, scheduling, maintenance, quality control, and supply chain logistics For
the practitioner, models have been organized into chapters to address common
operations management topics However, several models could easily fi t into two
or more chapters
All of the models were developed by senior students in an advanced simulation
course at Tennessee Tech University Th eir models have been edited to
empha-size certain DEEDS features Solutions may be regarded as examples of how these
problems may be modeled in DEEDS To conserve space, only selected output
results based on a single run for each problem are presented Most of these problems
have been widely circulated in the literature as the basis for comparing simulation
languages
In Chapter 22, the capstone chapter, the research features of DEEDS are
dem-onstrated In contrast to the traditional “what if” approach to simulation, design
of experiments and genetic algorithms techniques are integrated into the DEEDS
environment to produce a powerful tool that can be used for “optimizing”
prob-lems described in Chapters 15 through 21
Use of This Book
Th e fl exibility of DEEDS makes it a great tool for students or novice to learn
con-cepts of discrete simulation Th erefore, it can be the basis for an undergraduate
course in introduction to simulation By extending the depth of coverage, it can
be the basis for a graduate simulation course It can also be a reference book for
Trang 20Preface ■ xix
practitioners engaged in simulation projects It may also be used as a research tool
by faculty and graduate students who are interested in “optimizing” production
systems
For projects that require animation, DEEDS can be used for rapid
prototyp-ing of the model so that simulation experiments can begin before the animation is
complete For complex models, many of the VBA program segments from DEEDS
can also be used in the animation software and the DEEDS program can be used
as model documentation
Trang 22Acknowledgments
Recent simulation classes at Tennessee Tech University demonstrated that DEEDS
is a viable tool for teaching concepts of discrete event simulation Neither this book
nor the DEEDS software would have been brought to fruition without the eff orts
of Clinton Th omas, Julie Braden, Chad Watson, Jacob Manahan, Chris Potts, and
Chad Bournes Each of these students made unique contributions to the design
of DEEDS and demonstrated that DEEDS is a viable tool for modeling complex
systems Marcia Elizandro was very kind to contribute many hours by proofreading
early versions of the manuscript Diane Knight was most helpful with editing the
fi nal version Randy Smith, at Microsoft, provided valuable advice on VB
program-ming in Visual Studio Finally, a very special thanks to Brandon Malone, a master’s
degree candidate in computer science at Tennessee Tech University who did a great
job helping to move the simulator from VBA to VB.net
Trang 24The Authors
David W Elizandro is a professor of
indus-trial engineering at Tennessee Tech University where he teaches operations research and simu-lation He earned a BS in chemical engineer-ing, MBA, and PhD in industrial engineering
Professor Elizandro has served in administrative and leadership roles in science and engineering education
Professor Elizandro has written publica tions and made presentations in areas such as expert systems, data communica tions, distributed simulation, adaptive control systems, digital signal processing, and integrating technology into engineering education He has also been an industry consultant on projects that include developing computer models to assess
manpower production requirements and resource utilization; evaluation of an
over-night freight delivery network; performance of digital signal processing boards; and
response time for a fl ight controller communications system
Professor Elizandro received the Distinguished Faculty Award, Texas A&M,
Commerce, served on the National Highway Safety Advisory Commission, and is
a member of Tau Beta Pi, Alpha Pi Mu, and Upsilon Pi Epsilon
Trang 25xxiv ■ The Authors
Hamdy A Taha is a university professor
emeritus of industrial engineering with the University of Arkansas, where he taught and conducted research in operations research and simulation He is the author of four other books on integer programming and simulation, and his works have been translated into Chi-nese, Korean, Spanish, Japanese, Malay, Rus-sian, Turkish, and Indonesian He is also the author of several book chapters, and his techni-
cal articles have appeared in the European
Jour-nal of Operations Research, IEEE Transactions on Reliability, IIE Transactions, Interfaces, Manage- ment Science, Naval Research Logistics Quarterly, Operations Research, and Simulation.
Professor Taha was the recipient of the Alumni Award for excellence in research and the universitywide Nadine Baum Award for excellence in teaching, both from the
University of Arkansas, and numerous other research and teaching awards from
the College of Engineering, University of Arkansas He was also named a Senior
Fulbright Scholar to Carlos III University, Madrid, Spain He is fl uent in three
languages and has held teaching and consulting positions in Europe, Mexico, and
the Middle East
Trang 26SIMULATION
FUNDAMENTALS
Trang 28Chapter 1
Simulation Modeling
Lean manufacturing is a term that describes the Toyota Production System
Accord-ing to Taiichi Ohno, the focus at Toyota was “the absolute elimination of waste.”
Waste is anything that prevents the value-added fl ow from raw material to fi nished
goods Th ere are variations on implementation of lean systems, but the essence is
that a continuous one-piece fl ow is ideal with emphasis on optimizing and
integrat-ing systems of people, equipment, materials, and facilities, to achieve improvements
in quality, cost, on-time delivery, and performance Process improvements are
typi-cally described as a reduction in cycle time or lead time; a reduction in the cost of
space, inventory, and capital equipment; an increase in capacity utilization; and the
elimination of bottlenecks
Production systems, based on the concept of lean manufacturing, are emerging
as a paradigm across many industries In a broader sense, operations management
is the practice of coordinating the physical workplace with the people and work of
a particular organization to support organizational objectives As such, operations
managers have responsibility for planning, operating, and maintaining complex
and diverse resources Similar to manufacturing processes, improvements in these
production systems may also be described in terms of reduced cycle time,
reduc-tion in cost, increase in capacity utilizareduc-tion, and the eliminareduc-tion of bottlenecks In
either environment, discrete event simulation is a powerful tool for the analysis,
planning, design, and operation of those facilities
Imagine the following situation Aircraft arrive at an intermediate-range
air-port Th e airport has two runways, one for landing and the other for takeoff
Aircraft that cannot land upon arrival in the air space of the facility must circle
within specifi ed “holding stacks” until a runway becomes available If the number
Trang 294 ■ Simulation of Industrial Systems
of “holding” planes exceeds a certain quota, the air traffi c controller must clear the
takeoff runway and allow circling planes to land Th e runways are connected to the
passenger terminal via taxiways A plane that cannot take off immediately upon
reaching the end of the taxiway waits on a holding apron Th e airport authority
is currently conducting a study with the objective of improving the landing and
takeoff services at the facility
To investigate the given situation, we specify certain system performance
mea-sures such as
1 Th e average time a plane waits in a holding apron
2 Th e average number of planes in holding stacks
3 Th e average utilization of the taxiways and runways
Considering the strict regulations under which most airports operate, such
perfor-mance measures can usually be determined from historical data In conducting a
study, however, we are more interested in assessing the impact of proposed changes
in the system (e.g., increasing the number of runways) on the desired performance
measures Th e question then becomes, How can we estimate performance measures
on a system that does not exist? It would be naive (at least in this situation) to
pro-pose experimenting with the real system Perhaps the only available alternative in
this case is to consider representing the proposed system by a model Th is is where
simulation plays an important role
Simulation modeling should be regarded as “the next best thing to observing
a real system in operation.” Indeed, the basic contribution of a simulation model
is that it allows us to observe performance characteristics of the system over time
Th ese observations may then be used to estimate expected performance measures of
the system For the airport example, a simulation model will record an observation
representing the number of circling planes each time a new aircraft enters or leaves
the holding stacks Th ese observations may then be used to calculate the
(time-weighted) average number of planes in the stacks
You may be thinking that the airport situation can be analyzed by using the
results of queueing theory However, those familiar with the capabilities of
queue-ing theory will recognize that queuequeue-ing models are rather restrictive In particular,
queueing theory is only capable of describing isolated segments of the complex
air-port operation Th is type of segmented analysis will likely fail to refl ect the impact
of the interaction of the various components on the overall behavior of the system
As a result, performance measure estimates may be severely biased For example,
in the airport situation, the landing and takeoff operations must be studied as two
dependent queues However, queueing theory models are not capable of
represent-ing the links between these two operations Th is drawback is primarily due to the
intractability of mathematical models for such systems
Why is simulation diff erent? Th e answer is that simulation typically represents
the entire system rather than in a segmented fashion as in mathematical models
All of the “cause and eff ect” relationships among the diff erent components of the
Trang 30Simulation Modeling ■ 5
model are accounted for in a simulation model Th e purpose of a simulation model
is to imitate the behavior of the real system (as closely as possible) Collecting
obser-vations is simply monitoring the behavior of the various model components as a
function of simulation time
1.2 Types of Simulation
Th e main purpose of a simulation model is to gather observations about a particular
system as a function of time From that standpoint, there are two distinct types of
simulation:
1 Discrete
2 Continuous
In discrete simulation, observations are gathered only at points in time when
changes occur in the system On the contrary, continuous simulation requires that
observations be collected continuously at every point in time
To illustrate the diff erence between the two types of simulation, we use the
example of a single-server facility and an oil terminal supplying a number of storage
tanks through a pipeline network In the single-server model, changes in the status
of the system occur only when a customer arrives or completes service At these
two points in time, performance measures such as queue length and waiting time
in the facility will be aff ected At all other points in time, these measures remain
unchanged (e.g., queue length) and not yet ready for data collection (e.g., waiting
time) For this reason, one needs to observe the system only at selected discrete
points in time—hence the name discrete simulation.
In the oil pipeline example, one of the measures of performance could be the
oil level in each tank Because of the nature of the product, fl ow into and out of a
tank occurs on a continuous basis In other words, the system must be monitored
continuously In this case, the output must be presented as a function of the time
Because it is practically impossible to monitor a system continuously in simulation,
the actual recording of observations usually occurs at small equal intervals in time
Although continuous simulation has important applications, most attention
has been directed toward discrete simulation Th e main reason is the wide range
of problems in this area Also, continuous simulation appears straightforward,
whereas discrete simulation usually requires more user creativity
1.3 The Simulation Clock
Simulation, as we stated earlier, collects observations by monitoring the “modeled”
system over time As such, the simulation model must have an internal clock Unlike
familiar time devices, this clock is designed to initiate the collecting of observations
Trang 316 ■ Simulation of Industrial Systems
at the moment before changes take place in the system Such a clock in continuous
simulation is straightforward because it implies “looking” at the system at equally
spaced time intervals However, in the discrete case, the system is observed only
when system changes occur
To demonstrate how the discrete simulation clock works, we consider a simple
system with a single-server facility What simulation does in this case is to follow
the movement of each customer from the instant of arrival into the system until
a system departure occurs To achieve this goal, the simulator must be capable of
determining the exact time each customer arrives to and departs from the service
facility Such information is available from knowledge of the times between
succes-sive arrivals and customer service time
In essence, once we are given the time at which the facility “opens for business,”
together with the time interval between successive arrivals and the service time per
customer, we are able to trace the fl ow of each customer, from system arrival to
system departure
Note importantly that simulation does not operate by tracing individual
cus-tomers Instead, it identifi es the points of arrival and departure chronologically
on the timescale regardless of the identity of the customer arriving or departing
the system Th is approach, in essence, categorizes system changes into two specifi c
types of simulation events—arrivals and service completions—while suppressing
the specifi c identity of each customer
Figure 1.1 shows a typical mapping of single-server events on the timescale
Th e simulation processes these events in chronological order and specifi es actions
depending on the type of the event For example, when an arrival event takes place,
the customer will either start service if facility is available, or will wait in a queue
until the facility is free When a customer is ready to begin service, the service
completion event is scheduled (and mapped onto the timescale) by adding the
ser-vice time to the current simulation clock time In a similar manner, when a serser-vice
completion event occurs, a check is made for any waiting customers Upon service
completion, the waiting customer departs the queue and another engages the
facil-ity with a new service completion event mapped onto the timescale
Trang 32Simulation Modeling ■ 7
As previously mentioned, the clock in discrete simulation stops at the time an
event occurs As a result, the simulation clock may be viewed as “jumping” to the
point in time that defi nes the next chronological event Th is explains the reason
that such simulations are referred to as discrete event simulation.
1.4 Randomness in Simulation
Th e discrete event scheme described for the single-server facility works only if two
basic data elements are known: (1) the interarrival time and (2) the service time You
may wonder how such information is obtained during the course of a simulation
In most real-life situations, customer interarrival times and service times occur
in a random fashion Th e only way we can represent this randomness is by using
probability distributions to describe the variables being considered For example, if
the arrivals occur in a Poisson stream, then from probability theory we know that
the interarrival distribution is exponential In general, information on customer
arrivals is based on either direct observation of the system or historical data
Oth-erwise, some plausible assumption must be made to describe the random process by
a probability distribution
Once the probability distribution has been selected, statistical theory provides
the basis for obtaining random samples based on (0, 1) uniform random numbers
Th ese random samples are used to map the occurrence of an event on the timescale
For example, if the interarrival time is exponential, then a random sample drawn
from that distribution represents the lapsed time before the next arrival
Randomness in simulation is not limited to time Suppose, for example,
arriv-ing customers may choose between one of two servers accordarriv-ing to their individual
preference To represent this situation, we must quantify an arriving customer’s
preference for one server over the other Such information is also based on
observa-tion or historical data Th e result is two ratios representing the allocation of
cus-tomers to the two servers Th is, in eff ect, is equivalent to specifying a probability
distribution from which samples can be drawn to decide on the server chosen by
an arriving customer
1.5 Discrete Simulation Languages
Discrete simulation involves a large number of repetitious computations
Conse-quently, the use of computers to carry out these computations is essential However,
the number of computations is not the only obstacle in simulation If you consider the
single-server simulation presented in Sections 1.3 and 1.4, you will conclude that it
involves a complex logical structure that requires special expertise to develop a
com-puter model Take, for example, the case of mapping generated events chronologically
on a timescale To write a procedural language (i.e., BASIC, FORTRAN, or Java)
Trang 338 ■ Simulation of Industrial Systems
program for this segment of the simulation model requires above-average
program-ming skills In the absence of some software development tools to relieve the user of
this burden, simulation as a tool would most certainly be the domain of “elite”
pro-grammers Fortunately, the repetitive nature of simulation computations is the basis
for the development of a suite of computer programs that are applicable to all
simula-tion models For example, routines for ordering events chronologically, as well as those
for generating random samples, apply to any simulation model
Modern computers have induced the development of full-fl edged simulation
languages that are applicable to any simulation situation Some languages have
been developed for either continuous or discrete simulations Others can be used
for combined continuous and discrete modeling All languages provide certain
standard programming facilities and diff er in the degree of detail that the user
must specify to develop a model Th ere is a trade-off Usually, languages that are
highly fl exible in representing complex situations require the user to provide a more
detailed account of the model logic Th is type of language is generally less
“user-friendly.” On the contrary, compact, easy-to-implement languages are usually more
rigid, which may make it diffi cult to represent complex interactions
In general, there are two types of discrete simulation languages:
1 Event-scheduling
2 Process-based
Event-scheduling languages deal directly with the individual actions associated
with each type of event Th ese languages are highly fl exible in representing complex
situations because the user provides most of the details Most prominent among
these languages are SIMSCRIPT and GASP
Process-based languages are usually more compact as they are designed to
rep-resent the movement of a “customer” (commonly referred to as a transaction or
entity) from the instant it enters the simulated system until it is discharged, thus
relieving the user from programming most of the details Th e oldest of these
lan-guages is GPSS More recent lanlan-guages include SLAM, SIMAN, and SIMULA
GPSS, SIMAN, and SLAM allow user-defi ned procedural language routines to
be linked to the model Additionally, SIMAN and SLAM have the capabilities of
modeling continuous systems
1.6 Design Environment for Event-Driven Simulation
Because the majority of discrete simulation systems may be viewed in some form or
another as a queueing situation, the design of available process-oriented languages
has centered around the use of three basic blocks or nodes: a source for creating
transactions, a facility where transactions are serviced, and a queue where
transac-tions may wait However, to simulate complex situatransac-tions, it is necessary to develop
Trang 34Simulation Modeling ■ 9
special-purpose blocks to “direct traffi c” among these three basic blocks In serial
traffi c, each block contributes to satisfying the “needs” of the transaction as it fl ows
from one basic block to the next Th e disadvantage of the “serial block” design
philosophy is that the language is much less user-friendly because of the number of
blocks required to direct “traffi c fl ow” in the model In reality, only the most simple
of situations may be represented using the serial block approach
Th e design environment for event-driven simulation (DEEDS) approach
elimi-nates the use of special-purpose nodes and reduces the language to dealing with
exactly four nodes: a source, a queue, a facility, and a delay As shown in later
chapters, the delay node, which may be considered as an infi nite capacity facility,
enhances the fl exibility of the language Each node is designed to be self-contained,
in the sense that suffi cient information is provided to manage the transaction
within a given node User-developed routines written in Visual Basic for
Applica-tions (VBA) manage the transaction as it enters and leaves a node In essence, such
a defi nition focuses on “directing traffi c” without the many blocks of a process
language at the expense of minimal incremental eff ort for “serial” traffi c situations
Th is approach has proven to be eff ective and convenient in handling very complex
simulation models
1.7 The Two Sides of Simulation
Simulation studies encompass two broad phases:
1 Construction, debugging, and running of the model
2 Interpretation of model output
Th e fi rst phase usually is by far the most time-consuming It begins with selecting
a suitable simulation language (or procedural language) to represent the logic of the
model It also includes collecting input data for the model Debugging is essential
to ensure that the model logic is correct Finally, tracing simulation computations
as a function of time to verify that the results of the model “make sense” must be
done Once the model is debugged and validated, the model can then be run for an
“appropriate” length of time to estimate the system’s output
Th e second phase is the most crucial and probably the most neglected among
simulation users Simulation, by the very nature of its inherent randomness, is a
statistical experiment Th erefore, the output of simulation must be interpreted
sta-tistically Indeed, the simulation experiment has peculiar statistical properties that
must be considered when interpreting the results Otherwise, the simulation output
may be heavily biased
We must always keep in mind that, just as in any other physical experiment, a
simulation study must be subjected to all the proper statistical techniques Failing
to do so may render simulation results that are worthless Unfortunately, this aspect
Trang 3510 ■ Simulation of Industrial Systems
of simulation is often ignored because a user may not be well trained in the use of
statistical techniques Th is defi ciency, coupled with lack of knowledge about the
peculiarities of the simulation experiment, has contributed to the misuse of
simu-lation Fortunately, there is a trend that simulation languages include automatic
features to assist with applying statistical tests on the simulation output
1.8 Organization of the Book
Th is book encompasses three major parts In the fi rst part (Chapters 2 through 4),
the prominent theoretical aspects of simulation are discussed and explained Th is
part includes the mechanics of constructing a discrete simulation model using the
concept of events It also shows how input data are prepared for use by the model
Methods for collecting data internally by a simulation language processor are also
detailed Finally, the statistical aspect of the simulation experiment is explained,
and its impact on simulation output is emphasized
Although Chapters 5 and 6 treat simulation in a general sense, they tie to
DEEDS by introducing and defi ning the terminology and the concepts used in
the development of DEEDS Th e reader is encouraged to review at least Chapters 3
through 6 before beginning Part II
In Part II, Chapter 7 provides an overview of the VBA essentials needed for
programming in the DEEDS environment Chapter 8 presents features of the
ProgramManager, the user interface for program management Also in Chapter 8 is
a description of the EventsManager module where the simulation program resides
and how to develop and execute a program Chapter 9 presents details of
develop-ing simulation programs in DEEDS It also presents Simulator procedures and
methods for DEEDS classes Chapter 10 presents the output features of DEEDS
and model validation tools such as simulation reports and the VBA Interactive
Debugger Chapter 11 details how to conduct simulation experiments in DEEDS
Chapter 12 presents a variety of programs that demonstrate the fl exibility of
DEEDS Chapter 13 presents advanced features of DEEDS that assist the modeler
with complex decision-making schemes
In Part III, Chapter 14 presents concepts on the design and development of
large and complex simulation models Also presented in Chapter 14 is an
over-view of management issues related to simulation projects In Chapters 15 through
21, DEEDS simulation programs are designed and developed for a spectrum of
traditional application areas that include facilities layout, material handling,
inventory control, scheduling, maintenance, quality control, and supply chain
logistics
In Chapter 22, the research features of DEEDS are demonstrated In contrast
to the traditional “what if” approach to simulation, design of experiments and
genetic algorithms techniques are integrated into the DEEDS environment to
pro-duce a powerful tool that can be used for “optimizing” models
Trang 36Simulation Modeling ■ 11
For Further Reading
1 Banks, J and J Carson II, Discrete-Event System Simulation Englewood Cliff s, NJ:
Prentice-Hall, Inc., 1984
2 Gordon, G., Th e Application of GPSSV to Discrete System Simulation Englewood
Cliff s, NJ: Prentice-Hall, Inc., 1975
3 Henrickson, J and R Crain, Th e GPSSIH User’s Manual, 2nd ed Annandale, VA:
Wolverine Software Corporation, 1983
4 Law Averill, M., Simulation Modeling and Analysis, 4th ed New York: McGraw-Hill
8 Pritsker, A A B., Modeling and Analysis Using Q-GERT Networks, 2nd ed New York:
Halsted Press, Wiley, 1979
9 Pritsker, A A B and C E Sigal, Management Decision Making: A Network
Simula-tion Approval Englewood Cliff s, NJ: Prentice-Hall, Inc., 1983.
10 Russell, E., Building Simulation Models with SIMSCRIPT 11.5 Los Angeles, CA:
CACI, Inc., 1983
11 Schriber, T., Simulation Using GPSS New York: Wiley, 1974.
12 Shannon, R., Systems Simulation, Th e Art and Science Englewood Cliff s, NJ:
Prentice-Hall, Inc., 1975
Problems
1-1 Customers arrive at a two-window drive-in bank for service Each lane can
accommodate a total of three cars If both lanes are full, 25 percent of the customers that cannot be served at the windows will park in a six-space lot and seek service inside the bank Th e remaining 75 percent balk to other bank branches What measures of performance will be suitable for evaluating the eff ectiveness of drive-in service?
1-2 Categorize the following situations as either discrete or continuous (or a
com-bination of both) In each situation, specify the objective of developing a simulation model
a Orders of diff erent sizes arrive randomly for an item An order that not be fi lled from available stock must await arrival of new shipments that occur in two equal deliveries at the beginning and the middle of each month
can-b A factory produces an item at a specifi ed rate Produced goods are stocked
in an adjacent warehouse Customers place their orders through dealers, who in turn send their orders to the warehouse with intervening delay periods Demand for the item experiences seasonal fl uctuations
Trang 3712 ■ Simulation of Industrial Systems
c World population is aff ected by the availability of natural resources, food production, environmental conditions, educational level, healthcare, and capital investments in industry and agriculture
d Goods arrive on pallets at a receiving bay of an automated warehouse
Th e pallets are loaded on a lower conveyor belt and lifted through an up- elevator to an upper conveyor that moves the pallets to corridors Th e corridors are served by cranes that pick the pallets up from the conveyor and place them in storage bins When an order is received, the pallets are moved by cranes from the bins to the upper conveyor Th ese pallets are moved by a down-elevator to the lower conveyor, which then moves them
to the shipping bay
1-3 Consider the single-server queueing situation Suppose that the time between
successive arrivals is ten minutes Th e service time is only eight minutes per customer Show how the simulation clock will advance over 100 simulation minutes Assume that the fi rst arrival occurs at time zero
1-4 In the single-queueing situation, explain how you would determine the
inter-arrival and service times of a real-life situation
1-5 Explain why you would agree or disagree with the following statement: “Th e
majority of discrete simulation situations can be viewed as (simple or
com-plex) queueing systems consisting of sources that generate customers, queues where customers may wait, and facilities where customers are served.”
1-6 Simulation is basically a statistical experiment whose output is subject to
random error Discuss your views regarding the factors that may “bias” lation results How can such bias be reduced in simulation?
Trang 38Chapter 2
Probability and Statistics
in Simulation
2.1 Role of Probability and Statistics in Simulation
Simulation is applied to environments in which randomness is a key element in the
description of the system As we stated in Chapter 1, randomness in simulation is
represented using probability distributions For example, in many service facilities,
the random arrival or departure of customers is typically described by a Poisson
process
Because randomness is synonymous with simulation, simulation output must
be viewed as a sample in a statistical experiment Th erefore, simulation output
must be subjected to proper statistical inference tests Also, performance measures
from a simulation model typically must be expressed with appropriate confi dence
intervals
Th is chapter is not intended as a review of probability or statistics Rather, it is
off ered as a quick reference for simulation users on
1 Characteristics of probability distributions commonly used in simulation
models
2 Statistical goodness-of-fi t models used to identify distributions
3 Confi dence intervals and the application of hypothesis testing to output data
Information sources to model random behavior may be from closed-form probability
distributions or histograms derived from historical data or data collection eff orts
Also, because simulation is an experimental design to estimate system performance
measures, statistical inference techniques are critical to the decision-making
Trang 3914 ■ Simulation of Industrial Systems
process Figure 2.1 summarizes the organization of this chapter relative to the
sim-ulation experiment Further details on these topics may be found in the references
cited at the end of the chapter
in Simulation
Th is section introduces the defi nitions and properties of some continuous and
dis-crete distributions that are commonly used in simulation Th e next section then
shows how goodness-of-fi t tests are used to identify distributions from raw data
Th e following notation and defi nitions will be used throughout the chapter
Given x is a continuous random variable in the interval [a, b], we use f (x) to
repre-sent the probability density function (pdf) of x Th e cumulative density function
(CDF) is represented by the notation F x (X ).
Th e functions f (x) and F x (X ) have the following properties:
For the case where x is discrete over the values a, a + 1, …, and b, f(x) and F x (X ) are
replaced by p(x) and P x (X ), in which case integration is replaced by summation.
2.2.1 Properties of Common Distributions
The simulation experiment
Statistical inference methods (Section 2.3)
Figure 2.1 Role of probability and statistics in simulation.
Trang 40Probability and Statistics in Simulation ■ 15
Th e shape of uniform f (x) is shown in Figure 2.2 Th e uniform [0, 1] distribution
plays a key role in simulation Specifi cally, uniform [0, 1] random numbers are used
to generate random samples from any pdf Th is technique is detailed in Section 3.3
2.2.1.2 Negative Exponential Distribution
f (x) = μe −μx , x > 0, μ > 0
F x (X ) = 1 − μe −μX , X > 0
Th e negative exponential pdf appears as shown in Figure 2.3 Th is
distribu-tion applies frequently in the simuladistribu-tion of the inter-arrival and service times of
facilities It also applies in many reliability problems to describe the time-to-failure
of a system’s component
Exponential random variables possess a unique forgetfulness or lack of memory
property Th at is, given T is the time period that elapsed since the occurrence of the
Figure 2.2 Uniform density function.
b a