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,Simulation,Fundamentals and Software,2,Introduction to simulation,What is simulation?Why do we use it?When do we use it?,3,Introduction to simulation,In this course,Understand stochastic (probabilistic) systemsPerformance over timeMostly event based (vs continuous)Some systems where time is not a factorComplex quality acceptance planGamblers betting strategies (Monte Carlo sim),4,Simulation languages,In 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 languagesGPSSSLAMSIMSCRIPT,5,Random numbers,Stochastic systems can have more than one outcomeRandom numbers select one possible outcomeServe as a “seed” to set initial conditionsComputers generate “pseudorandom” numbers,6,Introduction to simulation,Simulation deals with systemsTypes of systemsDiscrete (focus of this course)State of system changes at specific points in time (events),7,Introduction to simulation (2),Types of systems (cont)ContinuousState of system changes continuously over time,* How can we make this system discrete?,8,Models,Simulation attempts to model the “real world”But what is a model?Model set of assumptions/approximations about how the system worksStudy 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 count,9,Models (2),Often, just building the model is instructive regardless of resultsModel 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 system,10,Models(3),Types of modelsIconic (physical)Model airplane in a wind tunnelSymbolic (mathematical)Represents system in terms of logical/quantitative relationships,11,Models (4),Two types of symbolic models:AnalyticalEquations give exact resultsLinear programmingInventory model (optimal order quantity)Queuing theory (statistical)*If possible, use analytical model,12,Models (5),Symbolic models (cont)SimulationUse only if analytical model is not possible or practical Imitates operations of real worldSimilar to observing operations of real systemsResults are estimates of system - NOT EXACT,13,Characteristics of simulation models,Time is dynamicOutcomesStochasticBased on random variable inputsState variables are discrete,14,Advantages of simulation,Can 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 strategies,15,Advantages of simulation (2),Provides insight into complex interactionsCompresses or expands timeCan identify bottlenecksCan model uncertainty, nonstationarity,16,Disadvantages of simulation,Provides estimates onlyAnalysis of results may be difficultDecision maker may not believe resultsSometimes used when not appropriate,17,Definitions,Entity 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.,18,Examples,EntityAttribute Customerarrival timedeparture timeMachinestatus (idle, busy, down)Airlinertype capacityairspeed,19,Definitions (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.,20,Definitions (cont),State of system Values of a set of variables describing a system Event Instantaneous occurrence that causes a change in state.Activity Time consuming element in a system,21,The simulation clock,Represents 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 increment, follow appropriate actionsVery inefficient (why?),22,The simulation clock (2),Next event time advance methodAdvance clock to time of next event Requires list of scheduled events sorted by timeMost efficient (why?),23,Simple service model example,System has two major eventsOne major activity,24,Simple service model example,We could enumerate all arrival times and all process times in advanceUsual practice is to determine them when they are needed,25,Event-oriented simulation of a single server system,Arrival,Status of resource,Determine next arrival time,Busy,Idle,26,If next event is a departure,Departure,Status of queue,Remove customer from queueand begin serviceSubtract 1 from queueDetermine next departure,Not empty,Set server status to idle,Empty,27,Single server systemmanual simulation example,28,Single server systemmanual simulation example,29,Arrivals and departures,30,State diagram,System is empty,31,Recapping the simulation,Data collected during simulationsObservational Time-dependentKnow the difference!,32,Recapping the simulation (2),Observational dataSequence of equally weighted observationsObservations are mostly timesTime in queueTime in systemBut the time the observation occurs or sequence- is generally meaningless or irrelevant,33,Calculating observational data,Arena uses TALLY to collect observational dataExampleCustomerTime in QueueTime in System103214324412501Average = 4/5=0.8 14/5=2.8,34,Calculating time-dependent data,Arena 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) Duration of value is important,35,Calculating time-dependent data,Example 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?,36,Calculating time-dependent data,Values must be time-weightedThus,Average = The values (300, 0) are weighted by the length of time (1, 29) they existWhat if we left the money in for two days?,37,Calculating time-dependent data,What if we put $300 in on the first day$300 on the second dayAnd took it all out on the fifth day?,38,Calculating time-dependent data,Average = $60,39,Calculating time-dependent data,To 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,40,Back to manual example,Recall the state diagram (number of customers in system)Calculate the average in system,41,Calculating average in system,Numerator1*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?,42,Simulation Modeling Perspectives- continued,43,Discrete and Continuous Simulation,Discrete 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),44,Discrete and Continuous Simulation,Continuous SimulationDependent variables change continuouslyEx: A water faucet filling water tanks at a certain rate (maybe constant),45,Discrete and Continuous Simulation,Combined 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 moved,46,The World Views of Discrete (Event) Simulation Modeling,47,The World Views of Discrete (Event) Simulation Modeling,EventTakes places at an “isolated” point in time to start or finish 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 simulation modeling: event, activity scanning, and process orientations,48,The World Views of Discrete (Event) Simulation Modeling,Event OrientationSystems modeled only by changes that occur at discrete event times, e.g., arrival, departureEvents may change systems state (an attribute or attributes that describe 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 service activity of “deposit” (which may take a prescribed duration with a probability distribution),49,The World Views of Discrete (Event) Simulation Modeling,Activity = f Current State(s), Event(s)From an entitys perspective, an activity may also have to concern current current state of other entitiesEx: 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 wait,50,Arrival,Start,NIS = NIS + 1TCi = TNOW,Teller busy?,NIQ = NIQ + 1TQi = TNOW,Teller idle 1st in line?,NIQ = NIQ - 1TiQi = TNOW-TQi,Teller = busySchedule end of activity = TSend,NIS = NIS - 1Teller = idleTiSCi = TNOW TCi NQ = NQ+1,Simulationover?,ComputeStatisticsPrint reprot,End,PossibleWait,Service(Activity),Service ends * TNOW = TSend(departure),ContinueTNOW continuesto advance,*TNOW = Tsim,No,No,Yes,Yes,Yes,No,The Bank Teller Simulation,51,The World Views of Discrete (Event) Simulation Modeling,Relation 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 TIQ: TQi=TNOW TIQci=TNOW-TQi Note: (1) Statistics for time-persistent variables(2) Statistics based on observations,52,The World Views of Discrete (Event) Simulation Modeling,Activity Scanning OrientationModel activities and prescribed conditions that cause an activity to start and endEvents 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 orientation)Scanning process slow - system inefficientNot widely used in discrete simulation,53,The World Views of Discrete (Event) Simulation Modeling,Process OrientationModel sequences of elements that occur in defined patterns, e.g., waiting in queue for a busy serverLogic of the sequence of events generalized 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., SLAMSYSTEMS,54,Example: SLAM II Network Model (Process orientation),CREATE entities with time between arrivals following an exponential distribution thathas mean = 0.4 (min) (var = 0.4) A Poisson Process,CREATE nodeCREATE, TBC, TF, MA, MC, M;,Time to create

温馨提示

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

评论

0/150

提交评论