IE 477 Digital Simulation - Personal websites at UBIE 477的数字仿真在UB的个人网站_第1页
IE 477 Digital Simulation - Personal websites at UBIE 477的数字仿真在UB的个人网站_第2页
IE 477 Digital Simulation - Personal websites at UBIE 477的数字仿真在UB的个人网站_第3页
IE 477 Digital Simulation - Personal websites at UBIE 477的数字仿真在UB的个人网站_第4页
IE 477 Digital Simulation - Personal websites at UBIE 477的数字仿真在UB的个人网站_第5页
已阅读5页,还剩53页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、1SimulationFundamentals and Software2Introduction to simulationWhat is simulation?Why do we use it?When do we use it?3Introduction to simulationIn this course,Understand stochastic (probabilistic) systemsPerformance over timeMostly event based (vs continuous)Some systems where time is not a factorCo

2、mplex quality acceptance planGamblers betting strategies (Monte Carlo sim)4Simulation languagesIn this class, we will use Arena (based on SIMAN)Arena is on the computers in the public lab on the 4th floorOther discrete event simulation languagesGPSSSLAMSIMSCRIPT5Random numbersStochastic systems can

3、have more than one outcomeRandom numbers select one possible outcomeServe as a “seed to set initial conditionsComputers generate “pseudorandom numbers 6Introduction to simulationSimulation deals with systemsTypes of systemsDiscrete (focus of this course)State of system changes at specific points in

4、time (events)7Introduction to simulation (2)Types of systems (cont)ContinuousState of system changes continuously over time* How can we make this system discrete?8Models Simulation attempts to model the “real worldBut what is a model?Model set of assumptions/approximations about how the system works

5、Study the model instead of the real system usually much easier, faster, cheaper, saferCan try wide-ranging ideas with the modelMake your mistakes on the computer where they dont count, rather than for real where they do count9Models (2)Often, just building the model is instructive regardless of resu

6、ltsModel validity (any kind of model not just simulation)Care in building to mimic reality faithfullyLevel of detailGet same conclusions from the model as you would from system10Models(3)Types of modelsIconic (physical)Model airplane in a wind tunnelSymbolic (mathematical)Represents system in terms

7、of logical/quantitative relationships11Models (4)Two types of symbolic models:AnalyticalEquations give exact resultsLinear programmingInventory model (optimal order quantity)Queuing theory (statistical)*If possible, use analytical model12Models (5)Symbolic models (cont)SimulationUse only if analytic

8、al model is not possible or practical Imitates operations of real worldSimilar to observing operations of real systemsResults are estimates of system - NOT EXACT13Characteristics of simulation modelsTime is dynamicOutcomesStochasticBased on random variable inputsState variables are discrete14Advanta

9、ges of simulationCan estimateExpected value (mean/average outcome)Most likely (mode outcome)Dispersion/shape (statistical distribution of all outcomes)Tool for controlled statistical experimentsAllows statistical evaluation (comparison) of alternate strategies15Advantages of simulation (2)Provides i

10、nsight into complex interactionsCompresses or expands timeCan identify bottlenecksCan model uncertainty, nonstationarity16Disadvantages of simulationProvides estimates onlyAnalysis of results may be difficultDecision maker may not believe resultsSometimes used when not appropriate17DefinitionsEntity

11、 Person, object, or thing whose movement through the system changes the state of the system.AttributeProperty or characteristic of an entity or other object. A variable associated with an entity.18ExamplesEntityAttribute Customerarrival timedeparture timeMachinestatus (idle, busy, down)Airlinertype

12、capacityairspeed19Definitions (cont)Global variables Characteristic of the system, rather than an entityResource An object which acts upon an entity. Queues Places where entities wait for resources. 20Definitions (cont)State of system Values of a set of variables describing a system Event Instantane

13、ous occurrence that causes a change in state.Activity Time consuming element in a system21The simulation clockRepresents real system time (called TNOW in Arena)Updating the simulation clockFixed increment time advance methodIncrement clock by fixed amountIf an event is scheduled to occur during incr

14、ement, follow appropriate actionsVery inefficient (why?)22The simulation clock (2)Next event time advance methodAdvance clock to time of next event Requires list of scheduled events sorted by timeMost efficient (why?)23Simple service model exampleSystem has two major eventsOne major activityPopulati

15、onQueueArrivalResourceDepartureArena calls this a server24Simple service model exampleWe could enumerate all arrival times and all process times in advanceUsual practice is to determine them when they are needed25Event-oriented simulation of a single server systemArrivalStatus of resourceCustomer jo

16、ins queueAdd one to queueDetermine next arrival timeBusyCustomer enters serviceSet server to busyDetermine next departure timeIdle26If next event is a departureDepartureStatus of queueRemove customer from queueand begin serviceSubtract 1 from queueDetermine next departureNot emptySet server status t

17、o idleEmpty27Single server systemmanual simulation example28Single server systemmanual simulation example29Arrivals and departures30State diagramSystem is empty31Recapping the simulationData collected during simulationsObservational Time-dependentKnow the difference!32Recapping the simulation (2)Obs

18、ervational dataSequence of equally weighted observationsObservations are mostly timesTime in queueTime in systemBut the time the observation occurs or sequence- is generally meaningless or irrelevant33Calculating observational dataArena uses TALLY to collect observational dataExampleCustomerTime in

19、QueueTime in System103214324412501Average = 4/5=0.8 14/5=2.834Calculating time-dependent dataArena uses DSTAT to collect time dependent dataAlso known as time-persistent dataSequence of values weighted by the length of time the value persistsNormally not times (queue length, customers in system) Dur

20、ation of value is important35Calculating time-dependent dataExample of DSTATDeposit $300.00 on 1st day of a 30-day monthDraw it out on the second dayWhat is the average balance in the account for the month?36Calculating time-dependent dataValues must be time-weightedThus,Average = The values (300, 0

21、) are weighted by the length of time (1, 29) they existWhat if we left the money in for two days?37Calculating time-dependent dataWhat if we put $300 in on the first day$300 on the second dayAnd took it all out on the fifth day?38Calculating time-dependent dataAverage = $6039Calculating time-depende

22、nt dataTo determine “average Queue lengthNumber of customers in systemWeight number of customers by the length of timeIn general, for time persistent data:Average = ti = length of ith periodqi = quantity in ith period 40Back to manual exampleRecall the state diagram (number of customers in system)Ca

23、lculate the average in system41Calculating average in systemNumerator1*2 + 2*1 + 1*1 + 2*2 + 1*1 + 2*1 + 1*1 + 0*2 + 1*1 =14Denominator2 + 1 + 1 + 2 + 1 + 1 + 1 + 2 + 1 = 12Average = 14/12 = 1.167What is the average time in queue?42Simulation Modeling Perspectives- continued43Discrete and Continuous

24、 SimulationDiscrete SimulationDependent variables (system responses) change only at discrete time points (event times)Ex: Number of customers in the bank will be changed by:A customer arrives at bank (+1 arrival event) A customer departs bank (-1 departure event)No. of Customers in Bank321TimeADAADA

25、ADDD44Discrete and Continuous SimulationContinuous SimulationDependent variables change continuouslyEx: A water faucet filling water tanks at a certain rate (maybe constant)Level of Water in Tank QTimer1r2r = dQ/dt use of analog computerQ(t) = (0 to t) r dtr = Q/t - difference equation45Discrete and

26、 Continuous SimulationCombined SimulationSome continuous variables - values may cause discrete eventEx: Filled water tanks should be shipped away if a truck is available and the filling continued after a short stop, otherwise stop water until filled tanks are movedVTimesinusoidal signaldiscretizatio

27、n of a continuous variable (computer control)46The World Views of Discrete (Event) Simulation ModelingArrival EventStart of Service EventEnd of Service EventActivityProcessTime47The World Views of Discrete (Event) Simulation ModelingEventTakes places at an “isolated point in time to start or finish

28、an activityNo durationEx: “take-off as an event to the entire flight processProcessA time-ordered sequence of events that may encompass several activitiesActivityHas beginning (an event) and ending (an event)The entire duration is in between the twoLead to the three world views in discrete simulatio

29、n modeling: event, activity scanning, and process orientations48The World Views of Discrete (Event) Simulation ModelingEvent OrientationSystems modeled only by changes that occur at discrete event times, e.g., arrival, departureEvents may change systems state (an attribute or attributes that describ

30、e the systems status), e.g., busy idleActions may be taken as a result of events, according a decision logic associated with the specific combination of systems current state and events that are occurring, e.g., if teller is idle and customer arrives and the transaction is a deposit, initiate a serv

31、ice activity of “deposit (which may take a prescribed duration with a probability distribution)49The World Views of Discrete (Event) Simulation ModelingActivity = f Current State(s), Event(s)From an entitys perspective, an activity may also have to concern current current state of other entitiesEx:

32、System:A robot-machine mini cell Entity:Robot Current state:Idle Event:Arrival of a part Activities:If machine idle (available)Then pick up part and put on machine, otherwise wait50ArrivalStartNIS = NIS + 1TCi = TNOWTeller busy?NIQ = NIQ + 1TQi = TNOWTeller idle 1st in line?NIQ = NIQ - 1TiQi = TNOW-

33、TQiTeller = busySchedule end of activity = TSendNIS = NIS - 1Teller = idleTiSCi = TNOW TCi NQ = NQ+1 Simulationover?ComputeStatisticsPrint reprotEndPossibleWait Service(Activity) Service ends * TNOW = TSend(departure) ContinueTNOW continuesto advance*TNOW = TsimNoNoYesYesYesNoThe Bank Teller Simulat

34、ion51The World Views of Discrete (Event) Simulation ModelingRelation to StatisticsEx: Bank-Teller SystemCustomer: arrival (wait if teller busy) service departureSystem state: NIS=NIS+1 NIS=NIS-1Queue state: NIQ=NIQ+1 NIQ=NIQ-1Teller state: idle busy busy idle Cuss TIS: Tci=TNOW TISci=TNOW-Tci Cuss T

35、IQ: TQi=TNOW TIQci=TNOW-TQi Note: (1) Statistics for time-persistent variables(2) Statistics based on observations(1)(2)Time Simulated52The World Views of Discrete (Event) Simulation ModelingActivity Scanning OrientationModel activities and prescribed conditions that cause an activity to start and e

36、ndEvents that start or end the activity not scheduled by the model, but are initiated from the prescribed conditionConditions are scanned as simulated time advancesNecessary to scan the entire set of activities to ensure the activitys accountability (compare: entity state checking in event orientati

37、on)Scanning process slow - system inefficientNot widely used in discrete simulation53The World Views of Discrete (Event) Simulation ModelingProcess OrientationModel sequences of elements that occur in defined patterns, e.g., waiting in queue for a busy serverLogic of the sequence of events generaliz

38、ed and defined in a single statementA high-level simulation language with graph network symbols, e.g., SLAM II, SIMAN, SIMNETUser-friendly interface - but still have to programHigher-level - discrete use of symbols without programming, e.g., SLAMSYSTEMSTEntities flow through networksCREATEQUEUETERMINATEACTIVITY54Example: SLAM II Network Model (Process orientation)MAMCMTBCTF1EXPON(4)CREATE entities with time between arrivals following an exponential distribution thathas mean = 0.4 (min) (var = 0.4) A Poisson Proces

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论