IE 477 Digital Simulation - Personal websites at UBIE 477的數(shù)字仿真在UB的個(gè)人網(wǎng)站_第1頁(yè)
IE 477 Digital Simulation - Personal websites at UBIE 477的數(shù)字仿真在UB的個(gè)人網(wǎng)站_第2頁(yè)
IE 477 Digital Simulation - Personal websites at UBIE 477的數(shù)字仿真在UB的個(gè)人網(wǎng)站_第3頁(yè)
IE 477 Digital Simulation - Personal websites at UBIE 477的數(shù)字仿真在UB的個(gè)人網(wǎng)站_第4頁(yè)
IE 477 Digital Simulation - Personal websites at UBIE 477的數(shù)字仿真在UB的個(gè)人網(wǎng)站_第5頁(yè)
已閱讀5頁(yè),還剩53頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論