Date post: | 07-Jul-2018 |
Category: |
Documents |
Upload: | yousuf-ali-shah |
View: | 213 times |
Download: | 0 times |
of 23
8/18/2019 System Modeling and Simulution
1/23
Basic Simulation Modeling II
8/18/2019 System Modeling and Simulution
2/23
CONTENTS
• The Nature of Simulation• Sstems! Models! and Simulation
• "iscrete#E$ent Simulation
• %lternati$e %&&roaches to Modeling and CodingSimulations
• Ste&s in a Sound Simulation Stud
• Other T&es of Simulation
• %d$antages! "isad$antages! and 'itfalls of Simulation
8/18/2019 System Modeling and Simulution
3/23
T)E N%T*+E O, SIM*-%TION
• Simulation Imitate the o&erations of a facilit or &rocess!usuall $ia com&uter
/ 0hats eing simulated is the system
/ To stud sstem! often ma3e assum&tions4a&&ro5imations! oth
logical and mathematical! aout ho6 it 6or3s / These assum&tions form a model of the sstem
/ If model structure is sim&le enough! could use mathematical
methods to get e5act information on 7uestions of interest 8
analytical solution
8/18/2019 System Modeling and Simulution
4/23
The Nature of Simulation :contd.;
• But most com&le5 sstems re7uire models that are alsocom&le5 :to e $alid;
/ Must e studied $ia simulation 8 e$aluate model numericall and
collect data to estimate model characteristics
• E5am&le Manufacturing com&an considering e5tendingits &lant
/ Build it and see if it 6or3s out<
/ Simulate current! e5&anded o&erations 8 could also in$estigate
man other issues along the 6a! 7uic3l and chea&l
8/18/2019 System Modeling and Simulution
5/23
The Nature of Simulation :contd.;
• Some :not all; a&&lication areas / "esigning and anal>ing manufacturing sstems / E$aluating militar 6ea&ons sstems or their logistics re7uirements
/ "etermining hard6are re7uirements or &rotocols forcommunications net6or3s
/ "etermining hard6are and soft6are re7uirements for a com&utersstem
/ "esigning and o&erating trans&ortation sstems such as air&orts!free6as! &orts! and su6as
/ E$aluating designs for ser$ice organi>ations such as call centers!fast#food restaurants! hos&itals! and &ost offices
/ +eengineering of usiness &rocesses
/ "etermining ordering &olicies for an in$entor sstem
/ %nal>ing financial or economic sstems
8/18/2019 System Modeling and Simulution
6/23
The Nature of Simulation :contd.;
• *se! &o&ularit of simulation / Se$eral conferences de$oted to simulation! notal the 0inter
Simulation Conference :666.6intersim.org;
• Sur$es of use of O+4MS techni7ues :e5am&les @;
/ -ongitudinal stud :1A(#1A; Simulation consistentl ran3edas one of the three most im&ortant techni7ues
/ 12A9 &a&ers in Interfaces :1AA; Simulation 6as second onl to
the road categor of Dmath &rogramming
http://www.wintersim.org/http://www.wintersim.org/
8/18/2019 System Modeling and Simulution
7/23
The Nature of Simulation :contd.;
• Im&ediments to acce&tance! use of simulation / Models of large sstems are usuall $er com&le5
But no6 ha$e etter modeling soft6are @ more general! fle5ile! ut still
:relati$el; eas to use
/ Can consume a lot of com&uter time But no6 ha$e faster! igger! chea&er hard6are to allo6 for much etter
studies than Fust a fe6 ears ago @ this trend 6ill continue
)o6e$er! simulation 6ill also continue to &ush the en$elo&e on com&uting
&o6er in that 6e as3 more and more of our simulation models
/ Im&ression that simulation is DFust &rogramming Theres a lot more to a simulation stud than Fust Dcoding a model in some
soft6are and running it to get Dthe ans6er
Need careful design and analsis of simulation models / simulation
methodolog
8/18/2019 System Modeling and Simulution
8/23
SGSTEMS! MO"E-S! %N" SIM*-%TION
• System % collection of entities :&eo&le! &arts! messages!machines! ser$ers! @; that act and interact together to6ard
some end :Schmidt and Talor! 1AH;
/ In &ractice! de&ends on oFecti$es of stud
/ Might limit the oundaries :&hsical and logical; of the sstem / udgment call le$el of detail :e.g.! 6hat is an entit
8/18/2019 System Modeling and Simulution
9/23
Sstems! Models! and Simulation :contd.;
• T&es of sstems / Discrete
State $ariales change instantaneousl at se&arated &oints in time
Ban3 model State changes occur onl 6hen a customer arri$es or de&arts
/ Continuous State $ariales change continuousl as a function of time
%ir&lane flight State $ariales li3e &osition! $elocit change continuousl
• Man sstems are &artl discrete! &artl continuous
8/18/2019 System Modeling and Simulution
10/23
• 0as to stud a sstem
Sstems! Models! and Simulation :contd.;
/ Simulation is Dmethod oflast resort
8/18/2019 System Modeling and Simulution
11/23
Sstems! Models! and Simulation :contd.;
• Classification of simulation models / Static $s. dynamic
/ Deterministic $s. stochastic
/ Continuous $s. discrete
• Most o&erational models are dnamic! stochastic! and
discrete / 6ill e called discrete-event simulation models
8/18/2019 System Modeling and Simulution
12/23
"ISC+ETE#EJENT SIM*-%TION
• Discrete-event simulation Modeling of a sstem as ite$ol$es o$er time a re&resentation 6here the state$ariales change instantaneousl at se&arated &oints in time / More &recisel! state can change at onl a countable numer of
&oints in time
/ These &oints in time are 6hen events occur
• Event Instantaneous occurrence that ma change the stateof the sstem
/ Sometimes get creati$e aout 6hat an De$ent is @ e.g.! end ofsimulation! ma3e a decision aout a sstems o&eration
• Can in &rinci&le e done hand! ut usuall done oncom&uter
8/18/2019 System Modeling and Simulution
13/23
"iscrete#E$ent Simulation :contd.;
• E5am&le Single#ser$er 7ueue / Estimate e5&ected a$erage dela in 7ueue :line! notser$ice;
/ State $ariales Status of ser$er :idle! us; / needed to decide 6hat to do
6ith an arri$al Current length of the 7ueue / to 3no6 6here to store an
arri$al that must 6ait in line Time of arri$al of each customer no6 in 7ueue / needed to
com&ute time in 7ueue 6hen ser$ice starts
/ E$ents %rri$al of a ne6 customer Ser$ice com&letion :and de&arture; of a customer Mae / end#simulation e$ent :a Dfa3e e$ent; / 6hether
this is an e$ent de&ends on ho6 simulation terminates :amodeling decision;
8/18/2019 System Modeling and Simulution
14/23
Time#%d$ance Mechanisms
• Simulation clock Jariale that 3ee&s the current $alue of:simulated; time in the model
/ Must decide on! e consistent aout! time units
/ *suall no relation et6een simulated time and :real; time needed
to run a model on a com&uter
• T6o a&&roaches for time ad$ance
/ Next-event time advance :usuall used; @ descried in detail
elo6
/ Fixed-increment time advance :seldom used; @
8/18/2019 System Modeling and Simulution
15/23
Time#%d$ance Mechanisms :contd.;
• More on ne5t#e$ent time ad$ance / Initiali>e simulation cloc3 to H
/ "etermine times of occurrence of future e$ents / event list
/ Cloc3 ad$ances to ne5t :most imminent; e$ent! 6hich is e5ecuted E$ent e5ecution ma in$ol$e u&dating e$ent list
/ Continue until sto&&ing rule is satisfied :must e e5&licitl stated;
/ Cloc3 DFum&s from one e$ent time to the ne5t! and doesnt De5ist
for times et6een successi$e e$ents @ &eriods of inacti$it are
ignored
8/18/2019 System Modeling and Simulution
16/23
Com&onents and Organi>ation of a "iscrete#
E$ent Simulation Model
• Each simulation model must e customi>ed to target sstem• But there are se$eral common com&onents! general
organi>ation / System state / $ariales to descrie state
/ Simulation clock / current $alue of simulated time / Event list / times of future e$ents :as needed;
/ Statistical counters / to accumulate 7uantities for out&ut
/ Initialization routine / initiali>e model at time H
/ Timin routine / determine ne5t e$ent time! t&e ad$ance cloc3
/ Event routines / carr out logic for each e$ent t&e
/ !ibrary routines / utilit routines to generate random $ariates! etc.
/ "e#ort enerator / to summari>e! re&ort results at end
/ $ain #roram / ties routines together! e5ecutes them in right order
8/18/2019 System Modeling and Simulution
17/23
Com&onents and Organi>ation of a "iscrete#
E$ent Simulation Model :contd.;
8/18/2019 System Modeling and Simulution
18/23
Com&onents and Organi>ation of a "iscrete#
E$ent Simulation Model :contd.;
• More on entities / OFects that com&ose a simulation model
/ *suall include customers! &arts! messages! etc. @ ma include
resources li3e ser$ers
/ Characteri>ed data $alues called attributes / ,or each entit resident in the model theres a record :ro6; in a
list ! 6ith the attriutes eing the columns
• %&&roaches to modeling
/ Event-schedulin / as descried ao$e! coded in general#&ur&ose
language
/ %rocess / focuses on entities and their De5&erience! usuall
re7uires s&ecial#&ur&ose simulation soft6are
8/18/2019 System Modeling and Simulution
19/23
"etermining the E$ents and Jariales
• ,or com&le5 models! it might not e o$ious 6hat thee$ents are
• Event-ra#h method :Schruen 1A(! and suse7uent
&a&ers; gi$es formal gra&h#theoretic method of anal>ing
e$ent structure
• Can anal>e 6hat needs to e initiali>ed! &ossiilit of
comining e$ents to sim&lif model
• Soft6are &ac3age :SILM%; to uild! e5ecute a simulationmodel $ia e$ent#gra&h re&resentation
8/18/2019 System Modeling and Simulution
20/23
STE'S IN % SO*N" SIM*-%TION ST*"G
,igure 1.?
8/18/2019 System Modeling and Simulution
21/23
OT)E+ TG'ES O, SIM*-%TION
• Continuous simulation / T&icall! sol$e sets of differential e7uations numericall o$er
time
/ Ma in$ol$e stochastic elements
/ Some s&eciali>ed soft6are a$ailale some discrete#e$entsimulation soft6are 6ill do continuous simulation as 6ell
• Combined discrete-continuous simulation
/ Continuous $ariales descried differential e7uations
/ "iscrete e$ents can occur that affect the continuousl#changing
$ariales
/ Some discrete#e$ent simulation soft6are 6ill do comined
discrete#continuous simulation as 6ell
8/18/2019 System Modeling and Simulution
22/23
Other T&es of Simulation :contd.;
• $onte Carlo simulation / No time element :usuall; / 0ide $ariet of mathematical &rolems
/ E5am&le E$aluate a Ddifficult integral -et & *:a! b;! and let ' :b / a; : & ; Then
%lgorithm Lenerate & *:a! b;! let ' :b / a; : & ; re&eat a$erage the ' s@ this a$erage 6ill e an uniased estimator of I
% % %L S S% % %L S %
8/18/2019 System Modeling and Simulution
23/23
%"J%NT%LES! "IS%"J%NT%LES! %N"
'IT,%--S O, SIM*-%TION
• %d$antages / Simulation allo6s great fle5iilit in modeling com&le5 sstems! sosimulation models can e highl $alid
/ Eas to com&are alternati$es / Control e5&erimental conditions / Can stud sstem 6ith a $er long time frame
• "isad$antages / Stochastic simulations &roduce onl estimates / 6ith noise / Simulation models can e e5&ensi$e to de$elo& / Simulations usuall &roduce large $olumes of out&ut / need to
summari>e! statisticall anal>e a&&ro&riatel
• 'itfalls / ,ailure to identif oFecti$es clearl u& front / Ina&&ro&riate le$el of detail :oth 6as; / Inade7uate design and analsis of simulation e5&eriments / Inade7uate education! training