SlideShare a Scribd company logo
© Copyright 2010 Jeffrey Strickland, Ph.D.
Discrete Event Simulation with ExtendSim
Lesson 1
Missile Defense Agency
Directorate of Modeling and Simulation
Verification, Validation, and Accreditation
© Copyright 2007 Dr. Jeffrey Strickland
What we’ll do
Lesson 1: Introduce Simulation modeling and
Discrete Event Simulation
Lesson 2: Introduce ExtendSim modeling and explore
a single-server queue model (MM1)
Analytic solution
Simulation solution
Inherent problems and DOE
Lesson 3: Construct a bank lobby model (several
versions: basic, a variety of resourcing methods,
hierarchical, and with animation)
Lesson 4: Build a simple BMDS End-to-End model
© Copyright 2007 Dr. Jeffrey Strickland
Lesson 1 Learning Objectives
Learn about the specification of a Discrete Event Simulation
(DES)
Distinguish a DES from other simulations
Learn about basic queuing processes and problems associated
with simulating them
Learn how to use appropriate statistical method to validate a
simple queuing model
Learn how to model a simple queuing problem in Extend
Learn how to design a simulation experiment and analyze the
results
Learn how to build basic and complex hierarchical models
Learn how to construct basic model animation
Learn how to build customized Extend blocks
© Copyright 2007 Dr. Jeffrey Strickland
Extend Models
It would be nice to model people returning to the moon, from
and end-to-end perspective, but it would take us a few years to
do so.
Reality: we have three days to learn about DES and Extend
Our models will be simple enough to build in three days, yet
complex enough to demonstrate many of the modeling
constructs and methodologies of the former
Resource pools, queues, and resource controls
Multiple random variate inputs and input tables for arrival
processes and service processes
Mixed modeling blocks (DES, Generic, Utility, etc.)
Hierarchical modeling
User interfaces and Notebook utility
Customized block development
© Copyright 2007 Dr. Jeffrey Strickland
Bank Model
Hierarchical modeling
Statistics collection
Buttons
Notebooks
Ghost Connectors
Multiple random inputs
© Copyright 2007 Dr. Jeffrey Strickland
Circuit Card Assembly
Multiple queues
Multiple services
Parallel servises
Serial services
Conveyer belts
Batching
© Copyright 2007 Dr. Jeffrey Strickland
Transportation
Labor pools
Task completion delays
Transferring goods
Transporting goods
© Copyright 2007 Dr. Jeffrey Strickland
Different Kinds of Simulation
Monte Carlo Simulation
Estimate stochastic, static model quantities that are difficult to
compute by exact computations. A scheme employing random
numbers which is used for solving certain stochastic problems
where the passage of time plays no substantive role.
1
Dynamic Simulation
Dynamic system simulations observe the behavior of the
system models over time. The time advance mechanism used
here include continuous, discrete time, and discrete event.
2
Differential Equation System Specification (DESS)2a
Discrete Time System Specification (DTSS)2b
Discrete Event System Specification (DEVS)2b
© Copyright 2007 Dr. Jeffrey Strickland
Discrete-Event Simulation
Estimate stochastic, dynamic, and discrete model outputs. A
scheme for modeling a system as it evolves over time by a
representation in which state variables change instantaneously
at separate points in time.
In simple terms, DEVS describes how a system with discrete
flow units or jobs evolves over time.
Technically, this means that a computer tracks how and when
state variables, such as queue lengths and resource availability,
change over time.
State variables change as the result of an event (or discrete
event) occurring in the system.
A characteristic is that discrete-event models focus only on the
time instances when these discrete events occur.
This feature allows for significant time compression because it
makes possible to skip through all time segments between
events when the state of the system remains unchanged.
© Copyright 2007 Dr. Jeffrey Strickland
Formalized by Bernard Zeigler, University of Arizona,
1976 & 1990, 2000 [see references]
Provides a means of specifying a mathematical
model of a system
Fundamental components
States
Inputs
Outputs
Transform functions
Time base
Discrete Event Simulation
© Copyright 2007 Dr. Jeffrey Strickland
State Set
(attributes or variable)
Position Fuel Size
Weapons Health Strength
Percept Team Plans
S
Location Appear
Y
Output
Events
Output
Event
Generators
Time Advance
ta
M Model
:03 :01
dint
Internal
Transition
Function
Move Explode
X
External
Imput
Events
:03 :01
Physical models
dext
External
Transition
Function
DEVS formalism
Components of Discrete Event
Simulation
© Copyright 2007 Dr. Jeffrey Strickland
Basic System Specification
Formalisms
Discrete Event System Specification (DEVS)
DEVS = (X, Y, S, δext, δint, λ, ts)
X is the set of inputs
Y is the set of outputs
S is the set of sequential states
δext: Q  X  S is the set of external state transition function
δint: S  S is the set of internal state transition function
λ: S  Y is the output function that maps
ts: S o
+   is the time advance function
Q = {(s,e)|sS, 0 < e < ta(s)} is the set of total states
Discrete Time System Specification (DTSS)
Differential Equation System Specification (DESS)
© Copyright 2007 Dr. Jeffrey Strickland
Basic Definitions
System State: a collection of variables containing all
information necessary to operate the model and record relevant
change in it over time.
Discrete-event dynamic system: system where the system
state change only at discrete points in time, which mark the
occurrence of an event.
Event: any occurrence that causes an instantaneous change in
the system state.
Arrival
Begin service
End service
© Copyright 2007 Dr. Jeffrey Strickland
Ordering Components
Event Scheduling
Events are generated and scheduled for the future
Event Queue Processing
Activity Scanning
Independent modules waiting to be executing
Sequential Model Execution
Process Interaction
Control each object through actions until delayed
Object List Processing
© Copyright 2007 Dr. Jeffrey Strickland
Event Scheduling
Need a mechanism to increment time by a variable amount between
events.
Must be able to sequence events according to the time of
occurrence and apply the associated transition function or event
routine to make changes to the system state.
Accomplished by creating an event notice for each occurrence when
its future time is determined.
Requires at least two items of information:
The actual time the event will occur
The type of event that is scheduled to occur
Event notices are stored in a list called the event list—ordered by
time of occurrence.
The process of creating an event notice, recording the necessary
information about the event, and placing it in the event list is called
scheduling the event.
© Copyright 2007 Dr. Jeffrey Strickland
The System Clock
The system clock is a special system variable that holds the
current system time.
The simulation progresses through time in the following way:
The first event notice on the event list is selected.
The system clock is set to the event time on this event
notice.
Then the event routine for this type of event is
executed to produce the appropriate changes in the
system state for this type of event.
Finally, the event notice is discarded.
This process repeats until the event list is empty or
some other signal is given to stop the simulation.
The routine that implements this process is called the
timing routine—the heart of discrete-event simulation.
© Copyright 2007 Dr. Jeffrey Strickland
Model Development
The essence of modeling discrete-event simulation is to
determine:
1. what variables or components are needed to
adequately represent the systems state,
2. what events are needed to represent the system
changes, and
3. what state changes occur within each event,
including the details of which events are
schedules and when are they scheduled.
This is usually and iterative process.
There is no one unique model that represents a system.
© Copyright 2007 Dr. Jeffrey Strickland
Monte Carlo Theory
Random numbers are used to drive statistical models of processes
and to make decisions.
The core of these algorithms is the uniformly distributed number
between zero and one.
A series of independent and identically distributed numbers in the
range from 0 to 1
Written as IID U(0,1)
Deterministic mathematical algorithms generate a series of numbers
that appear random
X(n) = (ax(n-1) + c)mod(m)
U(0,1) = x(n)/MAX(m)
Random methods tend to generate very skewed sequences of
numbers.
© Copyright 2007 Dr. Jeffrey Strickland
Random Variates
Uniform random numbers drive the selection values from other
distributions (random variates)
Inverse Transform Methods assign the U(0,1) number as the Y-
axis and traces it back to the X value through the desired
cumulative distribution function.
Acceptance-Rejection Methods use an intermediate function to
simplify the selection of numbers and maintain random
selection.
Composition Methods decompose the distribution into a
summed series of simpler distributions.
© Copyright 2007 Dr. Jeffrey Strickland
Characteristic Statistical Distributions
Statistical
Distribution
Potential Application
Uniform Source of random numbers between 0 and 1
Probability of Kill or Detection
Exponential Interarrival times of customers at a constant rate
Gamma Time to serve a customer
Weibull Time to failure for a piece of equipment
Normal Errors on the impact point of a bomb
Beta Proportion of defective items in a shipment
Bernoulli Success or failure of a specific experiment
Poisson Number of items in a batch of random size
Lognormal Task times with right-skewed distributions
Empirical Curves custom fitted to collected data
© Copyright 2007 Dr. Jeffrey Strickland
Output Analysis to Verify the Model
Finding the true distribution among events being generated of
time
Finite-Horizon Simulations start idle and execute to defined
terminating event
Eliminates the effects associated with starting the system
Steady-State Simulations run for long period of time until the
parameters achieve their steady-state
Eliminates bias in the starting values
© Copyright 2007 Dr. Jeffrey Strickland
Languages for Simulation
1950’s began seeking languages specifically
designed for simulation problems
General Simulation Program (GSP) 1960
The First Simulation-specific Programming Language
By K.D. Tocher and D.G. Owen, General Electric
Proceedings of the Second International Conference on
Operations Research
© Copyright 2007 Dr. Jeffrey Strickland
Evolved Definition of Simulation
Language
Six key characteristics:
Generate Random Numbers
Transformation for Statistical Distributions
List Processing
Statistical Analysis
Report Generation
Timing Execution
© Copyright 2007 Dr. Jeffrey Strickland
Typical Simulation Program
Finished?
Start
Stop
0. Invoke Initialization
1. Invoke Timing
2. Invoke Event Handler
Main
0. Update state variables
1. Increment counters
2. Generate future events
Event Routines
1. Compute interest data
2. Write reports
Reports
1.Select next event
2.Advance sim clock
Timing
1. Statistical distributions
2. Mathematical operations
Mathematics
1. Set clock
2. Set state variables
3. Load event list
Initialization
NO
YES
Legend
Programmer’s
responsibility
Language’s
Responsibility
© Copyright 2007 Dr. Jeffrey Strickland
Activity
Scan
GSP
SIMPAC
CSL
ESP
ECSL
OPS-1,2
OPS-3
OPS-4
1960
1965
1970
1980
1990
GPSS V6000
Process
Interaction
GPSS
GPSS II
GPSS III
GPSS/360
GPSS IV
GPSS/H
GPSS 85
GPSS PC
GPSS PL/I
SIMULA I
SIMULA 67
NGPSS
CONSUM
Event
Interaction
GASP
GASP II
GERTS
GASP IV
GASP PL/I
SLAM
SIMAN SLAM II
GEMS
SPS-1
SIMSCRIPT
QUICKSCRIPT
SIMSCRIPT II
SIMSCRIPT II+
SIMSCRIPT II.5
SIMFACTORY II.5
MOSIM
NETWORK II.5
COMNET II
© Copyright 2007 Dr. Jeffrey Strickland
Sim Language Comparisons
GPSS/H
SIMULATE
GENERATE
RVEXPO(1,1.0)
QUEUE SERVER
SEIZE SERVER
LVEQ DEPART SERVERQ
TEST L N$LVEQ, 1000,
STOP
ADVANCE
RVEXPO(2,0.5)
STOP RELEASE SERVER
TERMINATE 1
START 1000
END
SLAM II
GEN, 1,,,,,,72;
LIM,1,1,100;
NETWORK;
RESOURCE/SERVER(1),1
CREATE,EXPON(1.0,1),1,1;
AWAIT(1),SERVER;
COLCT,INT(1),DELAY IN
QUEUE,,2;
ACTIVITY,EXPON(0.5,2),,DON
E;
ACTIVITY,,,CNTTR;
DONE FREE,SERVER
TERM;
CNTR TERM,1000;
END;
;
INIT;
FIN;
SIMAN
BEGIN
CREATE,,EX(1,1):EX(1,1)
;
MARK(1);
QUEUE, 1;
SEIZE :SERVER;
TALLY :1, INT(1);
COUNT :1,1;
DELAY :EX(2,2);
RELEASE :SERVER;
DISPOSE;
END;
© Copyright 2007 Dr. Jeffrey Strickland
SIMSCRIPT II.5
DO
WAIT EXPONENTIAL.F(MEAN.INTERARRIVAL.TIME,1) MINUTES
ACTIVATE A CUSTOMER NOW
LOOP
…
LET TIME.OF.ARRIVALS=TIME.V
REQUEST 1 SERVER(1)
LET DELAY.IN.QUEUE=TIME.V-TIME.OF.ARRIVAL
IF NUM.DELAYS=TOT.DELAYS
ACTIVATE A REPORT NOW
ALWAYS
WORK EXPONENTIAL.F(MEAN.SERVICE.TIME,2) MINUTES
RELINQUISH 1 SERVER(1)
© Copyright 2007 Dr. Jeffrey Strickland
Visual Interactive Simulation (1)
Arena (SIMAN)SimProcess (SimScript II.5)
© Copyright 2010 Dr. Jeffrey Strickland
Visual Interactive Simulation (2)
Extend
OPNET
© Copyright 2007 Dr. Jeffrey Strickland
Alan Pritsker’s Seven Principles
1. Conceptualizing a model requires system knowledge, engineering
judgment, and model-building tools.
2. The secret to being a good modeler is the ability to remodel
3. The modeling process is evolutionary because the act of modeling
reveals important information piecemeal.
4. The problem or problem statement is the primary controlling element
in model-base problem solving.
5. In modeling combined systems, the continuous aspects of the
problem should be considered first. The discrete aspects of the
problem should then be developed.
6. A model should be evaluated according to its usefulness. From an
absolute perspective, a model is neither good or bad, nor is it
neutral.
7. The purpose of simulation modeling is knowledge and
understanding, not models.
© Copyright 2010 Dr. Jeffrey Strickland
References
Banks, J., Carson, J.S. II, Nelson, B., & Nicol, D.M. (2001).
Discrete-Event System Simulation. Prentice Hall.
Cloud, D.J. & Rainey, L.B. (Eds.). (1998). Applied Modeling and
Simulation: An integrated Approach to Development and
Operation. McGraw-Hill.
Law, A.M. & Kelton, D.W. (1998). Simulation Modeling &
Analysis, 2nd Ed., 234-266. McGraw-Hill.
Schriber, T.J. & Brunner, D.T. (1998). How discrete-event
simulation software works. In Handbook of Simulation, 765-811.
Wiley. Chapter 24.
Zeigler, B.P, Praehofer, H., & Kim, T.G. (2000). Theory of
Modeling and Simulation, 2nd Ed., 75-96. Academic Press.

More Related Content

PPTX
PPTX
dataflowdiagram2 121005140736-phpapp01
PPT
Unit1 pg math model
PPTX
Introduction to TreeNet (2004)
PDF
STABILITY ANALYSIS AND CONTROL OF A 3-D AUTONOMOUS AI-YUAN-ZHI-HAO HYPERCHAOT...
PDF
MULTIPROCESSOR SCHEDULING AND PERFORMANCE EVALUATION USING ELITIST NON DOMINA...
PDF
My Postdoctoral Research
PPTX
Ai saturdays presentation
dataflowdiagram2 121005140736-phpapp01
Unit1 pg math model
Introduction to TreeNet (2004)
STABILITY ANALYSIS AND CONTROL OF A 3-D AUTONOMOUS AI-YUAN-ZHI-HAO HYPERCHAOT...
MULTIPROCESSOR SCHEDULING AND PERFORMANCE EVALUATION USING ELITIST NON DOMINA...
My Postdoctoral Research
Ai saturdays presentation

What's hot (11)

PDF
Machine learning in science and industry — day 1
PDF
Free ebooks download ! Edhole
PPTX
Ml10 dimensionality reduction-and_advanced_topics
PDF
Machine learning in science and industry — day 3
PDF
30thSep2014
PDF
[M4A2] Data Analysis and Interpretation Specialization
PDF
Machine Learning Lecture 2 Basics
PDF
Machine learning in science and industry — day 2
PDF
Generative Adversarial Networks : Basic architecture and variants
PDF
Dynamic Kohonen Network for Representing Changes in Inputs
PPT
Jörg Stelzer
Machine learning in science and industry — day 1
Free ebooks download ! Edhole
Ml10 dimensionality reduction-and_advanced_topics
Machine learning in science and industry — day 3
30thSep2014
[M4A2] Data Analysis and Interpretation Specialization
Machine Learning Lecture 2 Basics
Machine learning in science and industry — day 2
Generative Adversarial Networks : Basic architecture and variants
Dynamic Kohonen Network for Representing Changes in Inputs
Jörg Stelzer
Ad

Similar to Extend sim 01 (20)

PDF
PPT
02 20110314-simulation
PPTX
Time Simulation Discrete Event (time) Simulation.pptx
PPTX
In this presentation concepts of simulation and modelling
PDF
Modeling & Simulation Lecture Notes
PDF
PDF
Into to simulation
PDF
Introduction to Modeling and Simulation
PDF
Jerry banks introduction to simulation
PPTX
Discrete event simulation
PPTX
Introduction to System, Simulation and Model
PPT
Discreate Event Simulation_PPT1-R0.ppt
PPT
Lecture 2 - System, model simulation.ppt
PPT
Lecture 2 - System, model simulation.ppt
PPT
DOCX
MODELING & SIMULATION.docx
PDF
Introduction to simulation.pdf
PDF
SIMULATION.pdf
02 20110314-simulation
Time Simulation Discrete Event (time) Simulation.pptx
In this presentation concepts of simulation and modelling
Modeling & Simulation Lecture Notes
Into to simulation
Introduction to Modeling and Simulation
Jerry banks introduction to simulation
Discrete event simulation
Introduction to System, Simulation and Model
Discreate Event Simulation_PPT1-R0.ppt
Lecture 2 - System, model simulation.ppt
Lecture 2 - System, model simulation.ppt
MODELING & SIMULATION.docx
Introduction to simulation.pdf
SIMULATION.pdf
Ad

More from Jeffrey Strickland, Ph.D., CMSP (19)

PPTX
PPTX
PDF
Data science and_analytics_for_ordinary_people_ebook
PDF
Predictive Analytics using R
PPTX
Propensity models with logistic regression clarity
PPTX
Using math to defeat the enemy (7 7-2011)
PPSX
Training_backed_by_Experience
PPSX
Training backed by experience
PPT
MAPH - Math & Physics and Interdisciplinary Course
PDF
R version 3 Examples
PDF
Predictive Modeling with Enterprise Miner
PDF
Predictive Modeling with Enterprise Miner
PPTX
SEAS Space Surveillance Study
PDF
Knights of the Cross - preview
PDF
Knights of the Cross - preview
PPT
Forrest Gump and the Joint Distribution
PDF
Predictive Modeling and Analytics select_chapters
PPTX
I/ITSEC2009 Best Tutorial
Data science and_analytics_for_ordinary_people_ebook
Predictive Analytics using R
Propensity models with logistic regression clarity
Using math to defeat the enemy (7 7-2011)
Training_backed_by_Experience
Training backed by experience
MAPH - Math & Physics and Interdisciplinary Course
R version 3 Examples
Predictive Modeling with Enterprise Miner
Predictive Modeling with Enterprise Miner
SEAS Space Surveillance Study
Knights of the Cross - preview
Knights of the Cross - preview
Forrest Gump and the Joint Distribution
Predictive Modeling and Analytics select_chapters
I/ITSEC2009 Best Tutorial

Recently uploaded (20)

PPTX
Internet of Things (IOT) - A guide to understanding
DOCX
573137875-Attendance-Management-System-original
PPTX
additive manufacturing of ss316l using mig welding
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
Sustainable Sites - Green Building Construction
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Construction Project Organization Group 2.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Current and future trends in Computer Vision.pptx
PDF
PPT on Performance Review to get promotions
Internet of Things (IOT) - A guide to understanding
573137875-Attendance-Management-System-original
additive manufacturing of ss316l using mig welding
UNIT-1 - COAL BASED THERMAL POWER PLANTS
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
bas. eng. economics group 4 presentation 1.pptx
Safety Seminar civil to be ensured for safe working.
Sustainable Sites - Green Building Construction
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Construction Project Organization Group 2.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Embodied AI: Ushering in the Next Era of Intelligent Systems
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Operating System & Kernel Study Guide-1 - converted.pdf
Current and future trends in Computer Vision.pptx
PPT on Performance Review to get promotions

Extend sim 01

  • 1. © Copyright 2010 Jeffrey Strickland, Ph.D. Discrete Event Simulation with ExtendSim Lesson 1 Missile Defense Agency Directorate of Modeling and Simulation Verification, Validation, and Accreditation
  • 2. © Copyright 2007 Dr. Jeffrey Strickland What we’ll do Lesson 1: Introduce Simulation modeling and Discrete Event Simulation Lesson 2: Introduce ExtendSim modeling and explore a single-server queue model (MM1) Analytic solution Simulation solution Inherent problems and DOE Lesson 3: Construct a bank lobby model (several versions: basic, a variety of resourcing methods, hierarchical, and with animation) Lesson 4: Build a simple BMDS End-to-End model
  • 3. © Copyright 2007 Dr. Jeffrey Strickland Lesson 1 Learning Objectives Learn about the specification of a Discrete Event Simulation (DES) Distinguish a DES from other simulations Learn about basic queuing processes and problems associated with simulating them Learn how to use appropriate statistical method to validate a simple queuing model Learn how to model a simple queuing problem in Extend Learn how to design a simulation experiment and analyze the results Learn how to build basic and complex hierarchical models Learn how to construct basic model animation Learn how to build customized Extend blocks
  • 4. © Copyright 2007 Dr. Jeffrey Strickland Extend Models It would be nice to model people returning to the moon, from and end-to-end perspective, but it would take us a few years to do so. Reality: we have three days to learn about DES and Extend Our models will be simple enough to build in three days, yet complex enough to demonstrate many of the modeling constructs and methodologies of the former Resource pools, queues, and resource controls Multiple random variate inputs and input tables for arrival processes and service processes Mixed modeling blocks (DES, Generic, Utility, etc.) Hierarchical modeling User interfaces and Notebook utility Customized block development
  • 5. © Copyright 2007 Dr. Jeffrey Strickland Bank Model Hierarchical modeling Statistics collection Buttons Notebooks Ghost Connectors Multiple random inputs
  • 6. © Copyright 2007 Dr. Jeffrey Strickland Circuit Card Assembly Multiple queues Multiple services Parallel servises Serial services Conveyer belts Batching
  • 7. © Copyright 2007 Dr. Jeffrey Strickland Transportation Labor pools Task completion delays Transferring goods Transporting goods
  • 8. © Copyright 2007 Dr. Jeffrey Strickland Different Kinds of Simulation Monte Carlo Simulation Estimate stochastic, static model quantities that are difficult to compute by exact computations. A scheme employing random numbers which is used for solving certain stochastic problems where the passage of time plays no substantive role. 1 Dynamic Simulation Dynamic system simulations observe the behavior of the system models over time. The time advance mechanism used here include continuous, discrete time, and discrete event. 2 Differential Equation System Specification (DESS)2a Discrete Time System Specification (DTSS)2b Discrete Event System Specification (DEVS)2b
  • 9. © Copyright 2007 Dr. Jeffrey Strickland Discrete-Event Simulation Estimate stochastic, dynamic, and discrete model outputs. A scheme for modeling a system as it evolves over time by a representation in which state variables change instantaneously at separate points in time. In simple terms, DEVS describes how a system with discrete flow units or jobs evolves over time. Technically, this means that a computer tracks how and when state variables, such as queue lengths and resource availability, change over time. State variables change as the result of an event (or discrete event) occurring in the system. A characteristic is that discrete-event models focus only on the time instances when these discrete events occur. This feature allows for significant time compression because it makes possible to skip through all time segments between events when the state of the system remains unchanged.
  • 10. © Copyright 2007 Dr. Jeffrey Strickland Formalized by Bernard Zeigler, University of Arizona, 1976 & 1990, 2000 [see references] Provides a means of specifying a mathematical model of a system Fundamental components States Inputs Outputs Transform functions Time base Discrete Event Simulation
  • 11. © Copyright 2007 Dr. Jeffrey Strickland State Set (attributes or variable) Position Fuel Size Weapons Health Strength Percept Team Plans S Location Appear Y Output Events Output Event Generators Time Advance ta M Model :03 :01 dint Internal Transition Function Move Explode X External Imput Events :03 :01 Physical models dext External Transition Function DEVS formalism Components of Discrete Event Simulation
  • 12. © Copyright 2007 Dr. Jeffrey Strickland Basic System Specification Formalisms Discrete Event System Specification (DEVS) DEVS = (X, Y, S, δext, δint, λ, ts) X is the set of inputs Y is the set of outputs S is the set of sequential states δext: Q  X  S is the set of external state transition function δint: S  S is the set of internal state transition function λ: S  Y is the output function that maps ts: S o +   is the time advance function Q = {(s,e)|sS, 0 < e < ta(s)} is the set of total states Discrete Time System Specification (DTSS) Differential Equation System Specification (DESS)
  • 13. © Copyright 2007 Dr. Jeffrey Strickland Basic Definitions System State: a collection of variables containing all information necessary to operate the model and record relevant change in it over time. Discrete-event dynamic system: system where the system state change only at discrete points in time, which mark the occurrence of an event. Event: any occurrence that causes an instantaneous change in the system state. Arrival Begin service End service
  • 14. © Copyright 2007 Dr. Jeffrey Strickland Ordering Components Event Scheduling Events are generated and scheduled for the future Event Queue Processing Activity Scanning Independent modules waiting to be executing Sequential Model Execution Process Interaction Control each object through actions until delayed Object List Processing
  • 15. © Copyright 2007 Dr. Jeffrey Strickland Event Scheduling Need a mechanism to increment time by a variable amount between events. Must be able to sequence events according to the time of occurrence and apply the associated transition function or event routine to make changes to the system state. Accomplished by creating an event notice for each occurrence when its future time is determined. Requires at least two items of information: The actual time the event will occur The type of event that is scheduled to occur Event notices are stored in a list called the event list—ordered by time of occurrence. The process of creating an event notice, recording the necessary information about the event, and placing it in the event list is called scheduling the event.
  • 16. © Copyright 2007 Dr. Jeffrey Strickland The System Clock The system clock is a special system variable that holds the current system time. The simulation progresses through time in the following way: The first event notice on the event list is selected. The system clock is set to the event time on this event notice. Then the event routine for this type of event is executed to produce the appropriate changes in the system state for this type of event. Finally, the event notice is discarded. This process repeats until the event list is empty or some other signal is given to stop the simulation. The routine that implements this process is called the timing routine—the heart of discrete-event simulation.
  • 17. © Copyright 2007 Dr. Jeffrey Strickland Model Development The essence of modeling discrete-event simulation is to determine: 1. what variables or components are needed to adequately represent the systems state, 2. what events are needed to represent the system changes, and 3. what state changes occur within each event, including the details of which events are schedules and when are they scheduled. This is usually and iterative process. There is no one unique model that represents a system.
  • 18. © Copyright 2007 Dr. Jeffrey Strickland Monte Carlo Theory Random numbers are used to drive statistical models of processes and to make decisions. The core of these algorithms is the uniformly distributed number between zero and one. A series of independent and identically distributed numbers in the range from 0 to 1 Written as IID U(0,1) Deterministic mathematical algorithms generate a series of numbers that appear random X(n) = (ax(n-1) + c)mod(m) U(0,1) = x(n)/MAX(m) Random methods tend to generate very skewed sequences of numbers.
  • 19. © Copyright 2007 Dr. Jeffrey Strickland Random Variates Uniform random numbers drive the selection values from other distributions (random variates) Inverse Transform Methods assign the U(0,1) number as the Y- axis and traces it back to the X value through the desired cumulative distribution function. Acceptance-Rejection Methods use an intermediate function to simplify the selection of numbers and maintain random selection. Composition Methods decompose the distribution into a summed series of simpler distributions.
  • 20. © Copyright 2007 Dr. Jeffrey Strickland Characteristic Statistical Distributions Statistical Distribution Potential Application Uniform Source of random numbers between 0 and 1 Probability of Kill or Detection Exponential Interarrival times of customers at a constant rate Gamma Time to serve a customer Weibull Time to failure for a piece of equipment Normal Errors on the impact point of a bomb Beta Proportion of defective items in a shipment Bernoulli Success or failure of a specific experiment Poisson Number of items in a batch of random size Lognormal Task times with right-skewed distributions Empirical Curves custom fitted to collected data
  • 21. © Copyright 2007 Dr. Jeffrey Strickland Output Analysis to Verify the Model Finding the true distribution among events being generated of time Finite-Horizon Simulations start idle and execute to defined terminating event Eliminates the effects associated with starting the system Steady-State Simulations run for long period of time until the parameters achieve their steady-state Eliminates bias in the starting values
  • 22. © Copyright 2007 Dr. Jeffrey Strickland Languages for Simulation 1950’s began seeking languages specifically designed for simulation problems General Simulation Program (GSP) 1960 The First Simulation-specific Programming Language By K.D. Tocher and D.G. Owen, General Electric Proceedings of the Second International Conference on Operations Research
  • 23. © Copyright 2007 Dr. Jeffrey Strickland Evolved Definition of Simulation Language Six key characteristics: Generate Random Numbers Transformation for Statistical Distributions List Processing Statistical Analysis Report Generation Timing Execution
  • 24. © Copyright 2007 Dr. Jeffrey Strickland Typical Simulation Program Finished? Start Stop 0. Invoke Initialization 1. Invoke Timing 2. Invoke Event Handler Main 0. Update state variables 1. Increment counters 2. Generate future events Event Routines 1. Compute interest data 2. Write reports Reports 1.Select next event 2.Advance sim clock Timing 1. Statistical distributions 2. Mathematical operations Mathematics 1. Set clock 2. Set state variables 3. Load event list Initialization NO YES Legend Programmer’s responsibility Language’s Responsibility
  • 25. © Copyright 2007 Dr. Jeffrey Strickland Activity Scan GSP SIMPAC CSL ESP ECSL OPS-1,2 OPS-3 OPS-4 1960 1965 1970 1980 1990 GPSS V6000 Process Interaction GPSS GPSS II GPSS III GPSS/360 GPSS IV GPSS/H GPSS 85 GPSS PC GPSS PL/I SIMULA I SIMULA 67 NGPSS CONSUM Event Interaction GASP GASP II GERTS GASP IV GASP PL/I SLAM SIMAN SLAM II GEMS SPS-1 SIMSCRIPT QUICKSCRIPT SIMSCRIPT II SIMSCRIPT II+ SIMSCRIPT II.5 SIMFACTORY II.5 MOSIM NETWORK II.5 COMNET II
  • 26. © Copyright 2007 Dr. Jeffrey Strickland Sim Language Comparisons GPSS/H SIMULATE GENERATE RVEXPO(1,1.0) QUEUE SERVER SEIZE SERVER LVEQ DEPART SERVERQ TEST L N$LVEQ, 1000, STOP ADVANCE RVEXPO(2,0.5) STOP RELEASE SERVER TERMINATE 1 START 1000 END SLAM II GEN, 1,,,,,,72; LIM,1,1,100; NETWORK; RESOURCE/SERVER(1),1 CREATE,EXPON(1.0,1),1,1; AWAIT(1),SERVER; COLCT,INT(1),DELAY IN QUEUE,,2; ACTIVITY,EXPON(0.5,2),,DON E; ACTIVITY,,,CNTTR; DONE FREE,SERVER TERM; CNTR TERM,1000; END; ; INIT; FIN; SIMAN BEGIN CREATE,,EX(1,1):EX(1,1) ; MARK(1); QUEUE, 1; SEIZE :SERVER; TALLY :1, INT(1); COUNT :1,1; DELAY :EX(2,2); RELEASE :SERVER; DISPOSE; END;
  • 27. © Copyright 2007 Dr. Jeffrey Strickland SIMSCRIPT II.5 DO WAIT EXPONENTIAL.F(MEAN.INTERARRIVAL.TIME,1) MINUTES ACTIVATE A CUSTOMER NOW LOOP … LET TIME.OF.ARRIVALS=TIME.V REQUEST 1 SERVER(1) LET DELAY.IN.QUEUE=TIME.V-TIME.OF.ARRIVAL IF NUM.DELAYS=TOT.DELAYS ACTIVATE A REPORT NOW ALWAYS WORK EXPONENTIAL.F(MEAN.SERVICE.TIME,2) MINUTES RELINQUISH 1 SERVER(1)
  • 28. © Copyright 2007 Dr. Jeffrey Strickland Visual Interactive Simulation (1) Arena (SIMAN)SimProcess (SimScript II.5)
  • 29. © Copyright 2010 Dr. Jeffrey Strickland Visual Interactive Simulation (2) Extend OPNET
  • 30. © Copyright 2007 Dr. Jeffrey Strickland Alan Pritsker’s Seven Principles 1. Conceptualizing a model requires system knowledge, engineering judgment, and model-building tools. 2. The secret to being a good modeler is the ability to remodel 3. The modeling process is evolutionary because the act of modeling reveals important information piecemeal. 4. The problem or problem statement is the primary controlling element in model-base problem solving. 5. In modeling combined systems, the continuous aspects of the problem should be considered first. The discrete aspects of the problem should then be developed. 6. A model should be evaluated according to its usefulness. From an absolute perspective, a model is neither good or bad, nor is it neutral. 7. The purpose of simulation modeling is knowledge and understanding, not models.
  • 31. © Copyright 2010 Dr. Jeffrey Strickland References Banks, J., Carson, J.S. II, Nelson, B., & Nicol, D.M. (2001). Discrete-Event System Simulation. Prentice Hall. Cloud, D.J. & Rainey, L.B. (Eds.). (1998). Applied Modeling and Simulation: An integrated Approach to Development and Operation. McGraw-Hill. Law, A.M. & Kelton, D.W. (1998). Simulation Modeling & Analysis, 2nd Ed., 234-266. McGraw-Hill. Schriber, T.J. & Brunner, D.T. (1998). How discrete-event simulation software works. In Handbook of Simulation, 765-811. Wiley. Chapter 24. Zeigler, B.P, Praehofer, H., & Kim, T.G. (2000). Theory of Modeling and Simulation, 2nd Ed., 75-96. Academic Press.