Chap. 4: SimulationWhat Is Simulation?What Is a SystemDetailsLine QueueSlide 6The Monte Carlo MethodArrival Pattern for Service FacilityHow to Apply This to a SimulationArrival SimulationService SimulationBank SimulationTime Management TechniquesThe Heart of the Monte Carlo MethodHomework QuestionsTHE MONTE CARLO METHODChap. 4: SimulationWhat Is Simulation?the representation of the behavior or characteristics of one system through the use of another system, esp. a computer program designed for that purpose.To successfully create a simulation, you need to keep a goal in mind.What Is a SystemA system is a group of interacting, interrelated, or interdependent elements forming a complex whole. Ex. - Sales for a business - Two volleyball teams competing - Line management at a bankDetailsLine QueueGoals:Determine if you need to employ more tellersDetermine if you should create a new queue system altogetherOr simply if what you have is working.Your focus here is the line queueThe size of the queue is only detail that mattersLine QueueComponents:Tellers – servicing customersCustomers – entering bank to receive serviceQueue – the line where customers wait to be helpedThe two variable factors here are:Time till next arrival (TA)Time till end of current service (TS)The Monte Carlo MethodTA and TS are vary complicated variablesSimply assume they are random- easier for us to understand- easier for us to replicateEx: Two evenly matched Volleyball teams- flip a coin- why does this work?Arrival Pattern for Service FacilityAssume α = average time in seconds between arrivals.Interarrival time is time between consecutive arrivals.Note: We can not find the interarrival frequency, only interarrival density, that is, the number of times you can expect an interarrival time in the range of t to t’Ex: Number of arrival times in this range for 100 consecutive customers.Negative Exponential DistributionHow to Apply This to a Simulation•Take the integral of f to find the cumulative distribution function.•Plug random values from 0-1 into inverse function F-1(x) to create our original function f.Now we can create accurate arrival times using random numbers!!Cumulative DistributionArrival Simulation1. Generate the first customer.2. Select a random number x between 0 and 1.3. Compute F-1(x).4. Allow F-1(x) seconds to elapse.5. Generate the next customer.6. Go to step 2.Service SimulationAssume exponential distribution as well, then,G-1(y) where y is a random number, gives us a simulated time for completing a service with a customer.ß = average service time per customerFollow same set of instructions as will arrival timessubstitute G-1(y) in for F-1(x)decrement Q instead of incrementing itBank SimulationTime Management TechniquesCritical Event TechniqueDetermine amount of time till next eventAdd that time to clockCarry out whatever change needs to take placeTime Slice MethodChoose some small increment of time“Sweep” though simulation and update new state for every incrementThe Heart of the Monte Carlo MethodGenerating new events using inverse functionsAny distribution can be usedCan be used to simulate much more complicated systemsMany queues feeding to one teller eachOne queue feeding many tellersQueue of tellers servicing from a “central teller”Homework Questions1. Why does flipping a coin for two evenly matched volleyball teams work for determining the next event in a simulation?2. Which Time Management Technique did we use in the Bank
View Full Document