C3B Discrete Event Models
-
Upload
saif-eldin -
Category
Documents
-
view
228 -
download
0
Transcript of C3B Discrete Event Models
-
8/13/2019 C3B Discrete Event Models
1/34
Types of ModelsDiscrete Event Models
Course Notes for:
Introduction to Modeling and SimulationDr. Edwin Z. Crues
Simulation and rap!ics "ranc!Simulation# $o%otics and Software DivisionEngineering Directorate
N&S& 'o!nson Space Center
-
8/13/2019 C3B Discrete Event Models
2/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !
Topics
&ttri%utions
Discrete Event Simulation (DES)
Continuous vs. Discrete
DES Concepts
& Simple DES System
Definitions Tools
*a% +review
-
8/13/2019 C3B Discrete Event Models
3/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent "
&ttri%ution
I want to t!an, Martin Steele (-ennedy SpaceCenter) for s!aring !is ,nowledge and notes onDiscrete Event Simulation.
Muc! of t!e content in t!is lecture comes fromMartins presentations# notes andconversations.
Martin is a leading e/pert in t!e field and !asprovided DES modeling in support many ofN&S& !uman spaceflig!t systems.
-
8/13/2019 C3B Discrete Event Models
4/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent #
Discrete Event Simulation (DES)
Discrete Event Simulation (DES) can %e aneffective met!od for analy0ing systems orprocesses t!at can accurately %e modeled as
transitions %etween discrete states orconditions
DES is often used for process analysis
DES can give insig!t a%out system performance
DES typically incorporates stoc!astic 1 pro%a%ilisticaspects of t!e system
-
8/13/2019 C3B Discrete Event Models
5/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent $
Discrete Event Simulation (DES)(Continued)
Discrete Event Simulation (DES) is a met!od of modeling asystem as a set of serial and parallel processes and events ast!ey evolve over time# at discrete points in time w!en t!e stateof t!e system c!anges.
T!is is contrasted wit! a Continuous Simulation w!ere t!esystem evolves as a continuous function (differential) over time2using numerical met!ods on a digital computer# continuoustime is appro/imated %y relatively small %ut e3ual timeincrements4.
DES is a dynamic and usually stoc!astic simulation of systemoperational processes t!at progresses as se3uence of eventst!at occur at discrete points in time# mar,ing a c!ange of statein t!e system.
-
8/13/2019 C3B Discrete Event Models
6/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent %
Discrete Event Simulation (DES)(Continued)
DES typiclly '(es use of Process )lows for nlysis, which includesEntitiesEents & Process*esources
Pro++ilistic Eentsoic of Process )low *eltionships
Entitiesenter thesyste'
Eperiencepro++ilisticeents
/o throuh seril &prllel processes
Collect sttistics lonthe wy
Entities progress through the process logic.
This progression is time & event based, and
constrained by resources.
0ith the inclusion of pro++ilistic eents nd stochsticprocessin ti'es, Discrete Eent Si'ultion is possi+le.
-
8/13/2019 C3B Discrete Event Models
7/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 1
Continuous vs. Discrete(Continuous)
Engineering analysis of filling a tan, wit! li3uid
& detailed analysis of t!is pro%lem loo,s at t!e fill rate#tan, geometry# atmosp!eric conditions# properties of t!eli3uid# etc. and models t!is as a continuous system
(using differential e3uations) T!is will tell you a%out a lot of component level (p!ysical
1 c!emical) details a%out t!e process
-
8/13/2019 C3B Discrete Event Models
8/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 2
Continuous vs. Discrete(Discrete)
5or a System +erformance Model:
T!ings (entities) arrive at t!e
system# are processed# and leave &t discrete points in time (i.e.# at a
discrete event)
Entities arrive 1 leave t!esystem
+rocessing %egins 1 ends
6!at do we want to ,now:
7ow many t!ings are in t!e
system8 Work in Process (WIP)
7ow long does it ta,e to gett!roug! t!e system8
Cycle Time
7ow many t!ings can get t!roug!in a given amount of time (e.g.# perday)8
Throughput
The circular objects represent the entities that areprocessed by the system
+erformance &nalysis of t!e Tan, 5illing System If you want to understand !ow well t!e tan, filling system
wor,s# a different type of analysis is re3uired
-
8/13/2019 C3B Discrete Event Models
9/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 3
DES Concepts(Elements o a !imple !ystem)
T!e process s!own previously assumes t!at t!e entity isprocessed as soon as it arrives
6!at affects 9 T!e flow of entities8 T!e performance of t!e system8
In most systems# & process is preceded %y a line ("ueue) & process re3uires a resource (server)
-
8/13/2019 C3B Discrete Event Models
10/34
-
8/13/2019 C3B Discrete Event Models
11/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 44
DES Concepts(E$amples o Discrete !ystems)
"an,s $etail Stores 5actories !paceports
Communications Systems 7ospital Emergency $ooms Call Centers
If you stand in line (or an entity wastes time in a3ueue)# you may %e a%le to model 1 analy0e t!esystem using DES.
It depends on: T!e level of detail re3uired T!e results desired
E/amples:
-
8/13/2019 C3B Discrete Event Models
12/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 4!
DES Concepts(%asic Constructs)
Entity &rrival time model &ttri%utes Se3uence;$outing +er entity type Time
Process +rocess time model ueue si0e 1 protocol $esource re3uirements
Resource (Server)
Types States Daily Sc!edules Maintenance Sc!edules $elia%ility (MT"5) uantity
Decisions (ProbabilisticEvents)
General Simulation/SystemCharacteristic
Terminating Steady State
&rrival time model &ttri%utes Se3uence;$outing +er entity type Time
Entity Movement $outes Transporters Conveyors
Variables Expressions Event Calenar
Sets $esource Counter Tally Entity Type Entity +icture
Si!nals
Match / "atch # Separate
Data Export / $mport
-
8/13/2019 C3B Discrete Event Models
13/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 4"
DES Concepts(& !econd 'ook)
DES typiclly '(es use of Process )lows for nlysis, which includesEntitiesEents & Process*esources
Pro++ilistic Eentsoic of Process )low *eltionships
Entitiesenter thesyste'
Eperiencepro++ilisticeents
/o throuh seril &prllel processes
Collect sttistics lonthe wy
Entities progress through the process logic.
This progression is time & event based, and
constrained by resources.
0ith the inclusion of pro++ilistic eents nd stochsticprocessin ti'es, Discrete Eent Si'ultion is possi+le.
-
8/13/2019 C3B Discrete Event Models
14/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 4#
& Simple DES System
Source Process
&rrivalTime +rocess Time
Model
System Metrics:
? Cycle Time: t!e time an Entity is in t!eSystem
? 6I+ (6or, in +rocess): t!e num%er of Entitiesin t!e System
? T!roug!put: t!e num%er of products produced
Specific =%@ect Metrics:
? Time in a ueue? Num%er in a ueue? $esource Atili0ation (percent of time "usy)
=utputs
-
8/13/2019 C3B Discrete Event Models
15/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 4$
& Simple DES System(<ernate ie)
Source Process
&rrival
Time
+rocess Time
Model
=utputs
-
8/13/2019 C3B Discrete Event Models
16/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 4%
& Simple DES System(E$tension)
Sin,
SourceProcess
1 ?
Process
2
Process
3
Sin,SourceProcess
1 ?
Process
2
Re-ProcessLoop
Inspect/Test
-
8/13/2019 C3B Discrete Event Models
17/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 41
DES Definitions
CapacityG t!e num%er of units of a resource t!at e/ist in a systemH typically# t!is ist!e amount of simultaneous wor, t!at may %e accomplis!ed in a given process. &ne/ample is t!e num%er of entities (or aggregated entities) t!at can %e !eld (in a3ueue) or t!at can %e simultaneously serviced (%y a resource).
CombinerG a process in w!ic! two or more entities in a simulation are merged into asingle operating entity ("atc!J module in &renaH Entity Com%inerJ %loc, in Mat*a%
SimEvents)
Cycle %imeG t!e time t!at elapses %etween an entityKs arrival and departure from asystem
Discrete Event Simulation (DES)G a met!odology for process 1 system analysis#t!roug! time>%ased 1 resource constrained pro%a%ilistic simulation models# providing
insig!t into operational system performance.
-
8/13/2019 C3B Discrete Event Models
18/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 42
DES Definitions(Continued)
EntityG t!e dynamic o%@ects t!at are created# move t!roug! a set of modeledprocesses (t!e model of a systemH a networ, of lin,s and nodes)# move into and outof 5i/ed o%@ects# and are destroyed during t!e course of a simulation run. T!eyaffect and are affected %y ot!er entities in t!e modeled system# ot!er o%@ects in t!emodeled system# and t!e state of t!e system model. T!ey are also c!aracteri0ed %yattri%utes (data values) t!at constitute part of t!e system state for a discrete>eventmodel and# in some applications# can !ave t!eir own intelligent %e!avior. In o%@ectoriented DES# entities can ma,e decisions# re@ect re3uests# decide to ta,e a rest# etc.
E/amples: customers# wor, pieces# S!ips in a !ar%or# s!oppers in a supermar,et# planesat an airport# p!one calls in a communications system
EventG an instantaneous occurrence t!at may c!ange t!e state of t!e system
Event CalenarG &n event calendar is defined as an array of lists# eac! of w!ic!contains future events.
&acilityG a specific e/ample of a typically fi/ed resource in a DES model (e.g.# a%uilding or fi/ed location)
-
8/13/2019 C3B Discrete Event Models
19/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent 43
DES Definitions(Continued)
MoelG & description or representation of a system# entity# p!enomena# or process(adapted from "an,s# '.# ed. (
-
8/13/2019 C3B Discrete Event Models
20/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !5
DES Definitions(Continued)
ueueG a temporary !olding place# typically organi0ed in an ordered rowH t!eprotocol for t!e 3ueue (typically# first in first out# first in last out# or priority order)determines t!e manner in w!ic! t!e contents are removed (for service)H some3ueues may !ave a ma/imum capacityH 3ueues typically e/ist %efore a process t!atre3uires a resource (i.e.# input 3ueuesJ t!at %uffer entities waiting for a processingresource to %e free)# %ut may also e/ist after a process t!at re3uires a resource (i.e.#output 3ueuesJ t!at free up t!e current processing resource and %uffers processed
entities until t!ey are a%le to move to su%se3uent processes)
ReplicationG (t!e process of) repeating an o%servation under identical statisticalconditions allowing estimation of varia%ility. 5or e/ample# in some simulation models#some parameters may %e defined %y pro%a%ility distri%ution functions (pdf)# so t!ateac! su%se3uent run (i.e.# replication) of t!e simulation model randomly selects avalue from t!at pdf# producing a different yet statistically identical %e!avior for t!e
particular process.
ResourceG an element of a system t!at provides a service ("an,s# '.# ed. (
-
8/13/2019 C3B Discrete Event Models
21/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !4
DES Definitions(Continued)
SeparatorG t!e process in w!ic! a composite entity (i.e.# two or more previouslycomponent) is separated into independent component operating entities (SeparateJmodule in &renaH Entity SplitterJ %loc, in Mat*a% SimEvents)
ServerG a resource t!at performs a process
SimulationG T!e imitation of t!e c!aracteristics of a system# entity# p!enomena# orprocess using a computational model.
Simulation %ime nitG t!e constant rate measure of t!e progression of eventsw!en running a model. If a model is run in real>time# t!e simulation time unitmatc!es real>time (e.g.# < second of simulation time e3uals < second of real>time)H!owever# if a faster or slower progression of simulation events is desired# t!esimulation time unit may %e greater t!an or less t!an real>time.
Sin*G t!e means of removing somet!ing from a system (Dispose module in &renaH
Entity Sin, in Mat*a% SimEvents) SourceG t!e point of originH an o%@ect t!at creates entities# usually at a specified rate
(Create module in &renaH Entity enerator in Mat*a% SimEvents)
StateG t!e collection of properties (e.g.# attri%utes# varia%les# statisticalaccumulators) necessary to descri%e a system
-
8/13/2019 C3B Discrete Event Models
22/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !!
DES Definitions(Continued)
Stochastic DataG information t!at contains at least some randomness# c!ance# orpro%a%ilityH information t!at is not deterministic. &s suc!# estimates wit! somemeasure of varia%ility are typically used to c!aracteri0e t!e data.
%imeG & non>spatial continuum in w!ic! events occur in apparently irreversi%lesuccession from t!e past t!roug! t!e present to t!e future. 2!ttp:;;www.merriam>we%ster.com;dictionary;time4
Real %imeG & non>spatial continuum in w!ic! events occur in apparently irreversi%lesuccession from t!e past t!roug! t!e present to t!e future t!at progresses at a steady ratecommensurate wit! normal !uman e/perience wit!out any ,ind of scaling# distortion# ordelay
Simulation %imeG & non>spatial continuum in w!ic! events occur in apparentlyirreversi%le succession from t!e past t!roug! t!e present to t!e future t!at is artificiallycontrolled (e.g.# %y a computer or director) and can %e in eit!er compressed time# real>time#e/panded time# or delayed time as desired or possi%le %y t!e particular implementation.5or e/ample# a computer simulation may %e a%le to run t!e programmed events slowert!an real>time# in real>time# or faster t!an real>time wit!in t!e limits of t!e computationalplatform. &dditionally# t!e course of certain events during a simulation may %e delayed fora variety of reasons t!at may not or cannot occur in t!e real world situation.
-
8/13/2019 C3B Discrete Event Models
23/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !"
DES Definitions(Continued)
%ransporterG a resource t!at moves and is a%le to carry ot!er o%@ects %etweenlocations in a system# typically wit! a defined capacity and speed
tili+ationG t!e proportion of time somet!ing is %usy during a defined period of time2-elton# 6.D.# Sadows,i# $.+.# Sturroc,# D.T. Simulation wit! &rena# rd ed. Mcraw>7ill# BOO.4 2*aw# &. M. (BOOF). Simulation Modeling and &nalysis (t! ed.). "oston#M&: Mcraw>7ill.4
Vehicle ,nee to isambi!uate -ith %ransporter.G & device# mec!anism# orstructure for transporting persons or t!ingsH a mova%le resource in a system t!attransport entities in a system 2!ttp:;;www.merriam>we%ster.com;dictionary;ve!icle42!ttp:;;www.answers.com;topic;ve!icle4 2Simio Documentation4
or* in Pro!ressG (a,a# num%er in systemJ) t!e 3uantity of entities t!at e/ist in asystem at a given timeH t!is is an indicator of t!e amount of wor, t!at is currently inprocessH !owever# t!is measure also includes all value added (time an entity is %eingactively processed) and non>value added time (all time t!at an entity is not %eingactively processedH transport time# time spent in 3ueue)
-
8/13/2019 C3B Discrete Event Models
24/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !#
Tools
Spreads!eet +rogram
Speciali0ed Discrete Event Tools
Commercial
=pen Source
-
8/13/2019 C3B Discrete Event Models
25/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !$
Tools(!preadsheet DE!)
ou can perform simple DES wit! commonspreads!eet applications li,e E/cel or Calc
-
8/13/2019 C3B Discrete Event Models
26/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !%
Tools(Program *our #n DE!)
=f course# if you need somet!ing a little more capa%let!an a spreads!eet# you can always program yourown.
ou will !ave to %ecome familiar wit! common
computer science data constructs li,e data structures#lists# 3ueues# etc.
ou will also need to understand t!e concepts andpractices of multit!readed programing.
5ortunately# t!ere are also software paca,gesavaila%le in many languages (i.e. C# CPP# 'ava# etc.) to!elp wit! t!is.
-
8/13/2019 C3B Discrete Event Models
27/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !1
Tools(!peciali+ed DE! , Commercial)
&rena > &rena is a discrete event simulationsoftware simulation and automation softwaredeveloped %y Systems Modeling and ac3uired%y $oc,well &utomation
"asic Edition starts at QBL.OO
=nly runs on 6indows wit! specific !ardware
T!ey do !ave educational price pac,ages
& full featured and ro%ust commercial pac,age
T l
-
8/13/2019 C3B Discrete Event Models
28/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !2
Tools(!peciali+ed DE! - #ther Commercial)
&ny*ogic > is a grap!ical general purpose simulation tool w!ic! supports discrete event (process>centric)# system dynamics and
agent>%ased modeling approac!es. Enterprise Dynamics > is a simulation software platform developed %y INC=NT$=* Simulation Software. 5eatures include drag>and>drop modeling and instant BD and D &nimation.
E/tendSim > is a general purpose simulation software pac,age from Imagine T!at. 5le/sim > is a discrete event simulation software w!ic! includes t!e %asic 5le/Sim simulation software. oldSim > Com%ines system dynamics wit! aspects of discrete event simulation# em%edded in a Monte Carlo framewor,. *anner 6ITNESS > & discrete event simulation platform# wit! grap!ical BD 1 D and scripting interfaces# for modeling
processes and e/perimentation. *anner *>SIM Server > Cloud;Service %ased simulation engine for simulating standards %ased process models designed in
"usiness +rocess Management ("+M) suites and ot!er similar environments.
Micro Saint S!arp > eneral purpose full featured discrete event simulation tool developed %y &lion Science and Tec!nology#M&1D =peration.
NetSim > Networ, Simulation software wit! %uilt>in development environment +lant Simulation > Tecnomati/ +lant Simulation software developed %y Siemens +*M Software ena%les t!e simulation and
optimi0ation of production systems and processes. +roModel > a discrete>event simulation tool t!at also allows modeling of continuous processes. +roModel is used for evaluating#
planning or designing manufacturing# ware!ousing# logistics and ot!er operational and strategic applications. $en3ue > is general>purpose discrete event simulation software wit! integrated Risual "asic scripting and a grap!ical interface
for design and operation. SIMI= > 5ully supports %ot! discrete and continuous systems# along wit! large scale applications %ased on agent>%ased
modeling. SimEvents of Mat!6or,s > adds discrete event simulation to t!e M&T*&";Simulin, environment. SIMA* > produces several versions of its o%@ect>%ased simulation software. Simcad +ro > Dynamic Discrete and continuous simulation software. Risual interface wit! no coding environment. Support BD
and D &nimation and Ralue Stream Mapping. Rensim > +rimarily System Dynamics simulation software wit! functions to do discrete event simulation. Rensim %rings a
function to simulation software t!at few ot!er software pac,ages !ave > instant simulation# eac! c!ange of simuationparameters s!ows in real time.
T l
-
8/13/2019 C3B Discrete Event Models
29/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent !3
Tools(!peciali+ed DE! - #pen !ource)
Sim+y > is an open source process>orienteddiscrete event simulation pac,age implementedin +yt!on. It is %ased on Simula concepts# %utgoes significantly %eyond Simula in itssync!roni0ation constructs.
T!is is t!e pac,age t!at we will use for t!e la%.
T l
-
8/13/2019 C3B Discrete Event Models
30/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent "5
Tools(!peciali+ed DE! - #ther #pen !ource)
+owerDERS > is an integrated tool for !y%rid systems modeling and simulation %asedon t!e DERS formalism.
Tortuga > is an open source software framewor, for discrete>event simulation in 'ava.
5acsimile > is a free# open>source discrete>event simulation;emulation li%rary.
alatea > alatea is a &gent>%ased simulation platform.
M&S=N > is a fast discrete>event multiagent simulation li%rary core in 'ava# designedto %e t!e foundation for large custom>purpose 'ava simulations.
SystemC > is a set of CPP classes and macros w!ic! provide an event>drivensimulation ,ernel in CPP.
'aamSim > is an open source discrete>event simulation pac,age written in 'ava.
Tomas > is an open source simulation pac,age system written in Delp!i;+ascal. It is%ased on t!e Must pac,age.
-
8/13/2019 C3B Discrete Event Models
31/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent "4
*a% +review
*ets model a *unar Supply "ase
* % + i
-
8/13/2019 C3B Discrete Event Models
32/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent "!
*a% +review(%ack !tory)
T!e *unar Supply "ase (*S") is located on t!e lunar surface at7adley $ima near 7adley $ille
T!e *S" provides a collection point for resources e/tractedfrom t!e lunar environment
6ater (7B=)# o/ygen (=B)# !ydrogen (7B) and 7elium (7e). Minerals for space %ased construction# manufacturing and power.
Spacecraft fuel and energy production.
T!ese resources are launc!ed from t!e surface into lunar or%it
using $oc,et powered *unar Cargo S!uttles (*CS)
Electromagnetic linear accelerated *unar $esource Cargo +ods(*$C+)
* % + i
-
8/13/2019 C3B Discrete Event Models
33/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent ""
*a% +review(Proposition)
7ow would we go a%out modeling t!e flow ofresources t!roug! t!e *S"8
$esources are coming in:
E/port resources from collection operations. Import resources from incoming *CS flig!ts.
$esources are leaving wit! launc!es
6e can use a Discrete Event Simulation (DES)to model t!e interactions %etween t!eseprocesses.
*a% +review
-
8/13/2019 C3B Discrete Event Models
34/34
Edwin Z. Crues, Ph.D. Introduction to M&S: Types of Models - Discrete Eent "#
*a% +review(Problem !tatement)
Model t!e water e/port from t!e *S" & rover collects water units
T!e rover delivers water units to t!e *S"
T!e water units are loaded into an *$C+
T!e *$C+ are launc!ed into or%it
Model t!is system using Sym+y
6!at ,ind of information are we interested in8
MiningRover
LunarSupplyBase
Launch