Decision Maths Lesson 14 – Simulation. Wiltshire Simulation There are many times in real life where we need to make mathematical predictions. How long.

Slides:



Advertisements
Similar presentations
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics.
Advertisements

6.1 Simulation Probability is the branch of math that describes the pattern of chance outcomes It is an idealization based on imagining what would happen.
Chapter 15: Quantitatve Methods in Health Care Management Yasar A. Ozcan 1 Chapter 15. Simulation.
E&CE 418: Tutorial-4 Instructor: Prof. Xuemin (Sherman) Shen
Capacity Setting and Queuing Theory
Chapter 10: Simulation Modeling
Chapter 6 Probability and Simulation
PROBABILITY. Probability Concepts - Probability is used to represent the chance of an event occurring - Probabilities can be represented by fractions,
QUEUING MODELS Based on slides for Hilier, Hiller, and Lieberman, Introduction to Management Science, Irwin McGraw-Hill.
Simulation of multiple server queuing systems
Simulation.
ATM QUEUES Kemal Cilengir Kristina Feye Jared Kredit James Winfield.
© 2004 by Prentice Hall, Inc., Upper Saddle River, N.J F-1 Operations Management Simulation Module F.
Project 2: ATM’s & Queues
Queuing Theory. Queuing theory is the study of waiting in lines or queues. Server Pool of potential customers Rear of queue Front of queue Line (or queue)
Monté Carlo Simulation MGS 3100 – Chapter 9. Simulation Defined A computer-based model used to run experiments on a real system.  Typically done on a.
Chapter 11: understanding randomness (Simulations)
+ AP Statistics: Chapter 11 Pages Rohan Parikh Azhar Kassam Period 2.
Slide - 1 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation Simulation of a bank: Three tasks or processes:
Copyright © 2010 Pearson Education, Inc. Unit 3: Gathering Data Chapter 11 Understanding Randomness.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc., All Rights Reserved. Waiting Line Models.
Simulation Examples ~ By Hand ~ Using Excel
IGCSE ICT Computer Simulation.
4/11: Queuing Models Collect homework, roll call Queuing Theory, Situations Single-Channel Waiting Line System –Distribution of arrivals –Distribution.
Introduction to Operations Research
Project 2: ATM’s & Queues. ATM’s & Queues  Certain business situations require customers to wait in line for a service Examples:  Waiting to use an.
1 QUEUES. 2 Definition A queue is a linear list in which data can only be inserted at one end, called the rear, and deleted from the other end, called.
Areas Of Simulation Application
Computer Science 112 Fundamentals of Programming II Modeling and Simulation.
Lesson Objective Understand how we can Simulate activities that have an element of chance using probabilities and random numbers Be able to use the random.
1.3 Simulations and Experimental Probability (Textbook Section 4.1)
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 11 Understanding Randomness.
WOOD 492 MODELLING FOR DECISION SUPPORT Lecture 24 Simulation.
WOOD 492 MODELLING FOR DECISION SUPPORT Lecture 25 Simulation.
MATH 2400 Ch. 10 Notes. So…the Normal Distribution. Know the 68%, 95%, 99.7% rule Calculate a z-score Be able to calculate Probabilities of… X < a(X is.
1 ISE 195 Introduction to Industrial & Systems Engineering.
Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we.
CDAE Class 22 Nov. 9 Last class: 4. Queuing analysis and applications Quiz 6 Today: Result of Quiz 6 4. Queuing analysis and applications Project.
Simulation Chapter 16 of Quantitative Methods for Business, by Anderson, Sweeney and Williams Read sections 16.1, 16.2, 16.3, 16.4, and Appendix 16.1.
Simulation in Healthcare Ozcan: Chapter 15 ISE 491 Fall 2009 Dr. Burtner.
If you toss a coin ten times, what is the probability of getting three or more “heads” in a row? If an airline overbooks a certain flight, what is the.
Simulations. Simulations – What’s That? Simulations are used to solve probability problems when it is difficult to calculate the answer theoretically.
1 Probability and Statistics Confidence Intervals.
MODELING AND SIMULATION CS 313 Simulation Examples 1.
Introduction Imagine the process for testing a new design for a propulsion system on the International Space Station. The project engineers wouldn’t perform.
1 BIS 3106: Business Process Management (BPM) Lecture Nine: Quantitative Process Analysis (2) Makerere University School of Computing and Informatics Technology.
Queuing Theory Simulation & Modeling.
Copyright © 2009 Pearson Education, Inc. Chapter 11 Understanding Randomness.
Probability What are your Chances? Warm Up Write each fraction in simplest form
Abu Bashar Queuing Theory. What is queuing ?? Queues or waiting lines arise when the demand for a service facility exceeds the capacity of that facility,
1 Copyright © 2014, 2012, 2009 Pearson Education, Inc. Chapter 9 Understanding Randomness.
Inter Arrival Times. Instead of giving a chance that someone, or something arrives in a particular time interval or not, we use the inter arrival times.
Modeling and Simulation
Chapter 1 What is Simulation?. Fall 2001 IMSE643 Industrial Simulation What’s Simulation? Simulation – A broad collection of methods and applications.
CHAPTER 5 Probability: What Are the Chances?
Monte Carlo Simulation Random Number Generation
Unit 1 Day 6: Simulations.
Prepared by Lloyd R. Jaisingh
Uniform Distributions and Random Variables
Models of Traffic Flow 1.
Simulation Statistics
Day 6: Simulations Unit 1: Statistics.
2.7: Simulation.
Modeling and Simulation CS 313
3.7 Simulations Unit 1: Statistics.
Understanding Randomness
COMP60611 Fundamentals of Parallel and Distributed Systems
Probability Simulations
Day 6: Simulations Unit 1: Statistics.
Probability using Simulations
Presentation transcript:

Decision Maths Lesson 14 – Simulation

Wiltshire Simulation There are many times in real life where we need to make mathematical predictions. How long should a set of traffic lights stay red. How long should appointments be at a doctors surgery. What is the best queueing system for a bank or building society branch to operate to satisfy its customers. In all the above the situations; you could observe what would happen in real life and try lots of scenarios. But in many situations it can be better to create a simulation to study. This can clearly be less time consuming and cost effective.

Wiltshire Simulation Simulation means the imitation of the operation of a system. You will have clearly heard of flight simulators that can be used to train pilots. In this lesson we will be looking at Stochastic simulations. This is where you study situations where chance effects the outcome. The methods used are commonly called Monte Carlo methods. Monte Carlo is associated with gambling, dice, and roulette wheels. Many of the methods use these random devices to model situations.

Wiltshire Simulation Think about the following situation: At a bank 20% of customers spend 1 minute at the window. 30% of customers spend 2 minutes at the window. 40% of customers spend 3 minutes at the window. 10% of customers spend 4 minutes at the window The bank wish to investigate different queuing systems by using a computer to simulate the times that customers spend at the cashier window.

Wiltshire Simulation They use the following simulation: The computer generates random numbers from 00 – 99 inclusive. (this can also be done on your calculator) A rule is devised which assigns a service time to each randomly generated number that reflects the percentages already given. 20% of the customers spend 1 minute at the window. So 20% of the random numbers can be used to represent this outcome. We could use the numbers 00 – 19.

Wiltshire Simulation The following table shows how the rest of the numbers could be used. The way the simulation works is you now generate a random number and this will represent 1 person. The table will indicate how long that simulated person will spend at the cashier. Time Simulated Customer is at window Random numbers 1 minute00 – 19 2 minutes20 – 49 3 minutes50 – 89 4 minutes90 – 99

Wiltshire Simulation A cashier serves 5 people in a row; generate a possible scenario working out how long it takes to serve everyone. Example: 72, 74, 17, 98, 57 This queue would take = 14 minutes to serve. Time Simulated Customer is at window Random numbers 1 minute00 – 19 2 minutes20 – 49 3 minutes50 – 89 4 minutes90 – 99

Wiltshire Using Random Numbers When using random numbers it is important that every outcome is uniformly distributed. An example to avoid would be rolling two dice and adding totals together. The P(total 2) = 1/36 but the P(total 7) = 1/6. You should choose your numbers carefully but you could be clever and not use all the numbers in certain cases. Assign the following distributions random numbers.

Wiltshire Exercise Probability 1/103/102/104/10 Range Probability 1/133/135/132/13 Range Probability 4/177/175/171/17 Range

Wiltshire Exercise Probability 1/103/102/104/10 Range00 – 0910 – 4950 – 6970 – 99 Probability 1/133/135/132/13 Range00 – 0607 – 2728 – 6263 – Probability 4/177/175/171/17 Range00 – 1920 – 5455 –

Wiltshire The Collectors Problem A manufacturer of breakfast cereals is giving away cards with pictures of football teams on them. There are 6 different cards in the set; Argentina, Brazil, Columbia, Denmark, England, France. There is only one card in a box at a time and they are distributed randomly. Naturally a football fan would like to collect all 6 cards.

Wiltshire The Collectors Problem i)Simulate the number of packets the fan will have to buy in order to collect all six cards. ii)Perform the simulation several times, recording the number of packets the collector buys before having a complete set. iii)Display the data and find the mean number of packets bought. iv)How would you carry out the simulation if there where 10 cards in the set.

Wiltshire Pedestrian Crossing A pedestrian crossing in a busy city centre is studied. At peak times pedestrians arrive at the crossing at a rate of 1 every 10 seconds. You can model this by assuming that in any 5-second period there is a 0.5 chance of 0 pedestrians and a 0.5 chance of 1 pedestrian arriving. The first pedestrian to arrive at the crossing will press the button to request the lights. The lights then show ‘don`t cross’ for 25 seconds and then ‘cross’ for 5 seconds. During the 5 second period all the people waiting can cross.

Wiltshire Pedestrian Crossing i)Use a coin to simulate a period of about 100 seconds, drawing your results in a table. ii)Use the results of your simulation to display results on: a)The number of people crossing each time. b)The total lengths of time for which the traffic is allowed to flow freely. iii)How could this model be made more realistic?

Wiltshire Doctors Surgery A Doctor is analysing the amount of time that patients spend in her surgery waiting room. Her first appointment is at 09:00. Appointments are made at 10 minute intervals. Her last appointment is at 11:20 Each patients visit can vary from 5 to 15 minutes. Patients can arrive up to 5 minutes early, but they are never late.

Wiltshire Doctors Surgery i)Making suitable assumptions simulate the doctors surgery for 3 mornings. (think about using a table to help you). ii)Find the patients average waiting time.

Wiltshire Arrival and service time This example can clearly be looked at in more detail. With any example that involves queuing (pedestrian problem) a more complex analysis is required. One possibility is to study the inter-arrival times or intervals. This just means the time that elapses between successive arrivals. We can use random numbers to explore the possibilities between arrivals.

Wiltshire Bank Queue Problem A small building society has just one service counter. During lunchtime hours long queues sometimes build up. The following tables were drawn up by observing customers at the building society during lunchtime. The first shows the duration of a persons service time. The second shows the time that elapses between customers arriving a the bank. Simulate the branch for 30 minutes. Arrival123 Probability1/31/21/6 Service1234 Probability1/104/103/102/10

Wiltshire Bank Queue Problem Rule to generate arrival times. Rule to generate service times. Arrivalnumbers 1 minute 2 minutes 3 minutes Servicenumbers 1 minute 2 minutes 3 minutes 4 minutes

Wiltshire Bank Queue Problem Rule to generate arrival times. Rule to generate service times. Arrivalnumbers 1 minute00 – 31 2 minutes32 – 79 3 minutes80 – 95 Servicenumbers 1 minute00 – 09 2 minutes10 – 49 3 minutes50 – 79 4 minutes80 – 99

Wiltshire Bank Queue Problem Use the table to calculate the number of people in the queue at any given time. CustomerRandomIntervalRandomserviceArrive Service start Service endWait

Wiltshire Bank Queue Problem CustomerRandomIntervalRandomserviceArrive Service start Service endWait

Wiltshire The queuing discipline For any queuing system there is normally a set of rules, called the queuing discipline. FIFO or First in First out. It is possible to have one single queue waiting for multiple tills. This is commonly seen at petrol stations or the self service tills in Sainsbury`s. Finally you can have lots of tills each with there own single queue. Again this is a common sight in supermarkets. Per 4Per 3Per 2Per 1 Till A Till B Per 8Per 7Per 5Per 1Till A Till BPer 6Per 4Per 3Per 2

Wiltshire Ex 6B pg 174