Chap 01 Slides
Chap 01 Slides
Chap 01 Slides
Slide 1 of 51
CONTENTS
1.1 The Nature of Simulation 1.2 Systems, Models, and Simulation 1.3 Discrete-Event Simulation 1.4 Simulation of a Single-Server Queueing System 1.5 Simulation of an Inventory System 1.6 Alternative Approaches to Modeling and Coding Simulations 1.7 Steps in a Sound Simulation Study 1.8 Other Types of Simulation 1.9 Advantages, Disadvantages, and Pitfalls of Simulation
Simulation Modeling and Analysis Chapter 1 Basic Simulation Modeling Slide 2 of 51
Slide 3 of 51
Slide 4 of 51
Slide 6 of 51
But now have better modeling software more general, flexible, but still (relatively) easy to use
But now have faster, bigger, cheaper hardware to allow for much better studies than just a few years ago this trend will continue However, simulation will also continue to push the envelope on computing power in that we ask more and more of our simulation models
Theres a lot more to a simulation study than just coding a model in some software and running it to get the answer Need careful design and analysis of simulation models simulation methodology
Slide 7 of 51
State of a system: Collection of variables and their values necessary to describe the system at that time
Might depend on desired objectives, output performance measures Bank model: Could include number of busy tellers, time of arrival of each customer, etc.
Simulation Modeling and Analysis Chapter 1 Basic Simulation Modeling Slide 8 of 51
State variables change instantaneously at separated points in time Bank model: State changes occur only when a customer arrives or departs
State variables change continuously as a function of time Airplane flight: State variables like position, velocity change continuously
Continuous
Slide 9 of 51
Slide 10 of 51
Most operational models are dynamic, stochastic, and discrete will be called discrete-event simulation models
Slide 11 of 51
Event: Instantaneous occurrence that may change the state of the system
Sometimes get creative about what an event is e.g., end of simulation, make a decision about a systems operation
Status of server (idle, busy) needed to decide what to do with an arrival Current length of the queue to know where to store an arrival that must wait in line Time of arrival of each customer now in queue needed to compute time in queue when service starts Arrival of a new customer Service completion (and departure) of a customer Maybe end-simulation event (a fake event) whether this is an event depends on how simulation terminates (a modeling decision)
Slide 13 of 51
Events
Generally introduces some amount of modeling error in terms of when events should occur vs. do occur Forces a tradeoff between model accuracy and computational efficiency
Slide 14 of 51
Continue until stopping rule is satisfied (must be explicitly stated) Clock jumps from one event time to the next, and doesnt exist for times between successive events periods of inactivity are ignored
Slide 15 of 51
Slide 16 of 51
Slide 18 of 51
Approaches to modeling
Event-scheduling as described above, coded in general-purpose language Process focuses on entities and their experience, usually requires special-purpose simulation software
Simulation Modeling and Analysis Chapter 1 Basic Simulation Modeling Slide 19 of 51
Slide 20 of 51
Why expected?
A continuous-time average Area under Q(t) = queue length at time t, divided by T(n) = time simulation ends see book for justification and details Another continuous-time average Area under B(t) = server-busy function (1 if busy, 0 if idle at time t), divided by T(n) justification and details in book
Many others are possible (maxima, minima, time or number in system, proportions, quantiles, variances )
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 24 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 25 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 26 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 27 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 28 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 29 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 30 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 31 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 32 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 33 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 34 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 35 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Slide 36 of 51
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, 2.0, 0.7, 0.2, 1.1, 3.7, 0.6,
Final output performance measures: Average delay in queue = 5.7/6 = 0.95 min./cust. Time-average number in queue = 9.9/8.6 = 1.15 custs. Server utilization = 7.7/8.6 = 0.90 (dimensionless)
Simulation Modeling and Analysis Chapter 1 Basic Simulation Modeling Slide 37 of 51
Density function
Slide 38 of 51
Slide 39 of 51
Are these the answers? Steady-state vs. terminating? What about time in queue vs. just time in system?
Slide 40 of 51
Slide 42 of 51
Inventory review, reorder stationary (s, S) policy at beginning of each month, review inventory level = I
If I s, dont order (s is an input constant); no ordering cost If I < s, order Z = S I items (S is an input constant, order up to S); ordering cost = 32 + 3Z; delivery lag ~ U(0.5, 1) month
Simulation Modeling and Analysis Chapter 1 Basic Simulation Modeling Slide 43 of 51
Average total cost per month: Add ordering, holding, shortage costs per month
Try different (s, S) combinations to try to reduce total cost
Simulation Modeling and Analysis Chapter 1 Basic Simulation Modeling Slide 44 of 51
Reaction of individual cost components to changes in s and S overall? Uncertainty in output results (this was just one run)?
Slide 46 of 51
By support functions random-number generation, variate generation, event-list management, event routines, etc. Decompose the model itself; assign different parts of model to different processors message-passing to maintain synchronization, or forget synchronization and do rollbacks if necessary virtual time
Web-based simulation
Central simulation engine, submit jobs over the web Wide-scope parallel/distributed simulation
Simulation Modeling and Analysis Chapter 1 Basic Simulation Modeling Slide 47 of 51
Slide 48 of 51
Algorithm: Generate X ~ U(a, b), let Y = (b a) g(X); repeat; average the Ys this average will be an unbiased estimator of I
Slide 50 of 51
Disadvantages
Pitfalls
Stochastic simulations produce only estimates with noise Simulation models can be expensive to develop Simulations usually produce large volumes of output need to summarize, statistically analyze appropriately
Failure to identify objectives clearly up front In appropriate level of detail (both ways) Inadequate design and analysis of simulation experiments Inadequate education, training
Slide 51 of 51