Decision Maths - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Decision Maths

Description:

It is possible to have one single queue waiting for multiple tills. ... Finally you can have lots of tills each with there own single queue. ... – PowerPoint PPT presentation

Number of Views:210
Avg rating:3.0/5.0
Slides: 25
Provided by: bengr1
Category:
Tags: decision | maths | tills

less

Transcript and Presenter's Notes

Title: Decision Maths


1
Decision Maths
  • Lesson 14 Simulation

2
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.

3
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.

4
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.

5
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.

6
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.

7
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 3 3 1 4 3 14
    minutes to serve.

8
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.

9
Exercise
10
Exercise
11
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.

12
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.

13
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 dont cross for 25 seconds
    and then cross for 5 seconds.
  • During the 5 second period all the people waiting
    can cross.

14
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?

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

16
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.

17
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.

18
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.

19
Bank Queue Problem
  • Rule to generate arrival times.
  • Rule to generate service times.

20
Bank Queue Problem
  • Rule to generate arrival times.
  • Rule to generate service times.

21
Bank Queue Problem
  • Use the table to calculate the number of people
    in the queue at any given time.

22
Bank Queue Problem
23
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 Sainsburys.
  • Finally you can have lots of tills each with
    there own single queue.
  • Again this is a common sight in supermarkets.

Till A
Per 4
Per 3
Per 2
Per 1
Till B
Per 8
Per 7
Per 5
Per 1
Till A
Till B
Per 6
Per 4
Per 3
Per 2
24
Ex 6B pg 174
Write a Comment
User Comments (0)
About PowerShow.com