Download presentation
Presentation is loading. Please wait.
Published byMalcolm Burke Modified over 9 years ago
1
Simulation Concepts Dr. Jason Merrick
2
Simulation with Arena — A Quick Peek at Arena C3/2 The above was just one “replication” -- a sample of size one (not worth much) We will do multiple replications: Confidence intervals on expectations –e.g., 95% c.i. on E(avg. time in queue): What about your replications? Randomness in Simulation
3
Simulation with Arena — A Quick Peek at Arena Simulation Replications Inter-arrival Times –9.84, 0.44, –2.39, 2.63, 4.82, 3.98 –2.90, 2.54, 1.96, 3.29 –0.32, 3.54, 3.98, 0.49 –4.79, 1.45 Service Times –8.72, 3.05 –1.98, 1.60, 8.79, 16.23 –2.03, 10.46, 4.15, 0.90 –3.11, 1.42, 0.62, 3.70 –2.67, 2.77
4
Simulation with Arena — A Quick Peek at Arena C3/4 Comparing Alternatives Usually, simulation is used for more than just a single model “configuration” Often want to compare alternatives, select or search for the best (via some criterion) Simple processing system: What would happen if the arrival rate were to double? –Cut inter-arrival times in half –Rerun the model for double-time arrivals –Make five replications
5
Simulation with Arena — A Quick Peek at Arena C3/5 Results: Original vs. Double-Time Arrivals Note variability Danger of making decisions based on one (first) replication Hard to see if there are really differences Need: Statistical analysis of simulation output data
6
Simulation with Arena — A Quick Peek at Arena C3/6 Scheduling Dynamics: The Event-Scheduling World View Identify characteristic events — change state Decide on logic to: effect state changes for each event type, observe statistics Keep a simulation clock, future event calendar Jump from one event to the next, process, observe statistics, update event calendar Stopping rule Usually done with general-purpose programming language (C, FORTRAN, etc.)
7
Simulation with Arena — A Quick Peek at Arena C3/7 Events for our Simple Processing System Arrival of a new part Update time persistent statistics Mark arrival time Machine busy? Start processing Make machine busy Tally time in queue Go to end of queue Increase queue length Schedule next arrival NoYes Departure of completed part Increment number produced Compute & tally flowtime Update time-persistent stats Queue Empty Start processing next part Tally time in queue Schedule departure event Make machine idle NoYes
8
Simulation with Arena — A Quick Peek at Arena C3/8 Events for Simple Processing System (cont’d.) The End –Update time-persistent statistics (to end of the simulation) –Compute final output performance measures using current values of statistical accumulators After each event, the event calendar’s top record is removed to see what time it is, what to do Also must initialize everything This is not the only way to view a simulation
9
Simulation with Arena — A Quick Peek at Arena C3/9 Simulation Dynamics: The Process-Interaction World View Identify characteristic entities in the system Tell a “story” about what happens to a “typical” entity –Multiple copies of entities co-exist, interact, compete –“Code” is non-procedural Usually requires special simulation software This is the view normally taken by Arena Underneath, still SIMAN executes the simulation using event-scheduling
10
Simulation with Arena — A Quick Peek at Arena Process View of the Simple Processing System Entity enters the system Entity goes to end of queue Is the server busy? Start processing Seize the machine Stay in queue No Yes Mark departure time Calculate flow time Increment total production Increment queue length Mark arrival time at queue When service time is finished release the server Entity leaves the system Mark arrival time Decrement queue length Calculate time in queue
11
Simulation with Arena — A Quick Peek at Arena Process View Used in most simulation languages Much easier to think about Do not have to define separate event logic for each possible event Similar to flow charting in business process analysis Leaves the complicated event programming to the simulation software designer
12
Simulation with Arena — A Quick Peek at Arena Simulation as a Tool Simulation can be used for –Comparison To compare system alternatives and their performance measures across various factors (decision variables) with respect to some objectives –Prediction To predict the behavior of the system at some future point in time. –Investigation To learn about and gain insight into the behavior of the system given various inputs.
13
Simulation with Arena — A Quick Peek at Arena Objectives of the Simulation Study These are given in the "To" + "Action verb" + "Qualifiers" format. The objectives will assist in identifying decision variables, output measures, and presentation requirements. Examples –To investigate how to improve system throughput. (rather loose) –To compare the cost and throughput changes given an increase from 2 to 3 machines available.
14
Simulation with Arena — A Quick Peek at Arena Complex Systems A system is –a group of interacting elements functioning as a complex whole (American Heritage Dictionary) –a group of objects that are joined together in some regular interaction or interdependence towards the accomplishment of some purpose (B,C&N) Must decide on an artificial boundary for the system The system state is the collection of variables that “describe” the system at any given time
15
Simulation with Arena — A Quick Peek at Arena System Description A verbal and/or pictorial representation of the major elements of the system under study –Especially the flow characteristics of entities passing through the systems. Distill the system description down to a "text book" word problem for performing the study. –Graphical descriptions, flow charts, etc.. Get buy in for the system description from –system experts –management –decision makers
16
Simulation with Arena — A Quick Peek at Arena Simulation as a Decision Making Tool Input variables –List all input data and its form –e.g. if it needs to be extracted from a file in a certain format. –Pay close attention to the probability distributions and their parameters. Output variables –A formal listing and description of the outputs required including all statistical measures to be observed. Decision variables –List the factors and their levels which are to be varied during the experiments.
17
Simulation with Arena — A Quick Peek at Arena C3/17 Overview of a Simulation Study Understand the system –It is not possible to model a system without first observing and understanding it –Visit the system and observe –Go to experts with a deep understanding of the system –ask them how the system works Be clear about the goals –What are the project objectives? –What do you want to get out of this study? understanding the system testing alternative configurations –The simulation you build cannot do everything - time and money constraints –Tell management what you will deliver ahead of time
18
Simulation with Arena — A Quick Peek at Arena Overview of a Simulation Study Formulate the model representation –What level of detail is required for the project objectives –What needs to be modeled in detail? –What can be modeled at a higher level? –What is the system boundary? –What are the entities, attributes, global variables, output variables, decision variables of interest? –Make the management/decision makers aware of the modeling assumptions before building the model –To get buy in you will need to speak in English, not mathematics
19
Simulation with Arena — A Quick Peek at Arena Overview of a Simulation Study Translate into modeling software –Represent the modeling assumptions in the simulation software –If there are difficulties, talk about them –It is often beneficial to go back and check how the system really works to get past implementation problems –Show system experts an animation of the simulation as you go along Verify “program” –Try obvious inputs and look for the obvious outputs –Test extreme inputs to see what happens –Walk through the program logic –Structure any code to avoid confusion –Output your inputs to ensure they follow your assumed input processes
20
Simulation with Arena — A Quick Peek at Arena Overview of a Simulation Study Validate model –Does model adequately represent real world system? –Are model generated behavioral data characteristic of real world system's behavioral data? –Does the model's user have confidence in model's results? (credibility) –Turing Test - people knowledgeable about the system are asked to examine one or more sets of system data as well as sets of model data without knowing which sets are which, (can they tell the difference) Design experiments –What input variables do you want to test the effect of? –What decision variables do you want to test the effect of? –What alternative configurations of the system do you want to test? Make runs –Go get a cup of coffee
21
Simulation with Arena — A Quick Peek at Arena Overview of a Simulation Study Analyze –Carry out statistical analysis to make accurate and precise statement about the results Get insight –Can you understand the results at a gut feeling level? –Can you explain the logic behind your results? –Remember there is a world outside your model –Be sensitive to the implications of what you are saying Document results –You cannot present your analysis to all interested parties –Good documentation is readable by a non-simulation expert –Put the technical stuff in appendices
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.