Lesson 40 Simulation Methods
Lesson 40 Simulation Methods
SIMULATION THEORY
Lesson 40
Learning objectives:
Hello students,
Now when you are aware of the methods of simulation and techniques of
random number generation I’ll take few examples of business / practical
application of simulation. Simulation is widely used for the following
Firstly, let us find out how simulation can be utilized for an inventory
problem.
Example 1
Using the random number to simulate a sample, find the probability that a
packet does not contain any defective product, when the production line
produces 10% defective products. Compare your answer with the expected
probability.
Solution
Given that 10 per cent of the total production is defective and 90 per cent is
non-defective. If we have 100 random numbers (0 to 99), then 90 or 90 per
cent of them represent non-defective products and remaining 10 (or 10 per
cent) of them represent defective products. Thus, the random numbers 00 to
89 are assigned to variables representing non-defective products and 90 to
100 are assigned to variables representing defective products.
Table 1
A 86 02 22 57 51 68
B 39 77 32 77 09 79
C 28 06 24 25 93 22
D 97 66 63 99 61 80
E 69 30 16 09 05 53
F 33 63 99 19 87 26
G 87 14 77 43 96 43
H 99 53 93 61 28 52
I 93 86 52 77 65 15
J 18 46 23 34 25 85
Here it may be noted that out of ten simulated samples 6 contain one or
more defectives and 4 contain no defectives. Thus, the expected percentage
of non-defective products is 40 per cent. However theoretically the
probability that a packet of 6 products containing no defective products is
(0.9) 6 = 0.53144 = 53.14%
Example 2
A bakery keeps stock of a popular brand of cake. Previous experience shows the
demand pattern for the item with associated probabilities, as given below:
Use the following sequence of random numbers to simulate the demand for next 10
days.
Random numbers: 25, 39, 65, 76, 12, 05, 73, 89, 19, 49.
Also estimate the daily average demand for the cakes on the basis of simulated data.
Solution
The simulation calculations for a period of 10 days are given in table below:
Example 3
Demand (daily) : 0 1 2 3 4
Each time an order is placed, the store incurs an ordering cost of Rs. 10 per order.
The store also incurs a carrying cost of Re 0.05 per book per day. The inventory
carrying cost is calculated on the basis of stock at: the end of each day. The
manager of the bookstore wishes to compare two options for his inventory decision
A : Order 5 books when the inventory at the beginning of the day plus orders
outstanding is less than 8 books.
B: Order 8 books when the inventory at the beginning of the day plus orders
outstanding is less than 8.
Currently (beginning of 1st day) the store has a stock of 8 books plus 6 books
ordered two days ago and expected to arrive next day. Using Monte Carlo
simulation for 10 cycles, recommend which option the manager should choose.
The two digit random numbers are: 89, 34, 78, 63, 61, 81, 39, 16, 13, 73
Solution
Given that stock in hand is of 8 books and stock on order is 5 books (expected next
day)
Table 5 Option A
Since 5 books have been ordered four times as shown in Table 5, therefore, total
ordering cost Rs. (4 x 10)=Rs. 40.
Closing stock of 10 days is of 39 (= 5 + 9 + 6 + 3 + 2 + 3 + 7 + 4) books.
Therefore, the holding cost at the rate of Re 0.5 per book per day is Rs. (39 x 0.5) =
Rs. 19.5.
Total cost for 10 days = Ordering cost + Holding cost = Rs. (40 + 19.5) = Rs.
59.5.
Table 6 Option B
Since 8 books have been ordered three times as shown in Table 6, when the
inventory of books at the beginning of the day plus orders outstanding is less
than 8. Therefore, total ordering cost is : Rs. 30 (3 X 10)
Total cost for 10 days = Ordering Cost + Holding Cost + Rs. 52.20. Since
option B has lower total cost than option A, therefore, manager should choose
option B
Example :
From a single day's observation, we have gathered the following data (legacy):
In the first hour, 3 visitors arrive, the second hour 15 visitors arrive, then 4, 8, 12,
and 8 respectively for the duration of the day.
Monte Carlo:
Cumulative Intervals of
Hr. (variable) # Visitors Probability
Probability Random #'s
8am-9am 3 3/50 = .06
9am-10am 15 15/50 = .30
10am-11am 4 .08
11am-12noon 8 .16
12noon-1pm 12 .24
1pm-2pm 8 .16
Total 50 1.0
In the above table, we set up the variables, the values for the variables (#visitors)
and the probability of each value occurring.
Cumulative Intervals of
Hr. (variable) # Visitors Probability
Probability Random #'s
8am-9am 3 3/50 = .06 .06
9am-10am 15 15/50 = .30 .36
10am-11am 4 .08 .44
11am-12noon 8 .16 .60
12noon-1pm 12 .24 .84
1pm-2pm 8 .16 1.0
Total 50 1.0 1.0
When establishing intervals of random numbers, we always use 2-digit values and
start with 01! The interval of random numbers has to be equal to the probability for
each variable. All of the intervals must be unique. So:
Cumulative Intervals of
Hr. (variable) # Visitors Probability
Probability Random #'s
8am-9am 3 3/50 = .06 .06 00-05
9am-10am 15 15/50 = .30 .36 06-35
10am-11am 4 .08 .44 36-43
11am-12noon 8 .16 .60 44-59
12noon-1pm 12 .24 .84 60-83
1pm-2pm 8 .16 1.0 84-99
Total 50 1.0 1.0
We then determine how many trials we are going to run. Let's say we want to run
10 trials. We generate random numbers from our Random Number Table (given in
last lesson) to run these trials.
Let's use Row 1 from the table to get our random numbers. When a random
number is generated, we look to see where it falls relative to the random intervals
established above. We then assign the value (# visitors) to :
From the above table, we see for ten trials, the total number of visitors equals 85.
We take the average to determine the how many visitors will arrive per hour.
97/10 = 9.7
Based on this information, we do not need to staff another person at the front desk.
Our total daily costs are:
(6hrs/day)*($6/hr) = $36/day
Similarly Monte Carlo Simulation is useful and can be applied for Investment
Analysis, Maintenance Policies, Operational Gaming, and Systems Simulation.
I hope that the concept of simulation is now clear to you. It is suggested to you to
practice few problems to make the point clear. So let us stop here for now.