PREPARED BY: RAIHANA ZAINORDIN
INTRODUCTION Simulation is a representation of a real-world process or system. The idea behind simulation is to imitate a real-world situation mathematically, then to study its properties and finally to draw conclusions and make decisions based on the results.
MONTE CARLO METHOD 1
• Set up a probability distribution for important variables
2
• Build a cumulative distribution
3
• Establish an interval of random numbers
4
• Generate random numbers
5
• Do the simulation
EXAMPLE 1: Harry’s Auto Tire sells a popular radial tire. Recognizing that inventory costs can be quite significant with this product, Harry wishes to determine a policy for managing this inventory. To see what the demand would look like over a period of time, he wishes to simulate the daily demand for 10 days. From past data, Harry obtains the daily demand for his radial tires over the past 200 days and this is shown in the following table: Demand
Frequency (day)
0
10
1
20
2
40
3
60
4
40
5
30
Total
200
EXAMPLE 1: Demand
f
Probability
Cumulative Probability
Interval
0
10
10/200 = 0.05
0.05
01 – 05
1
20
20/200 = 0.10
0.15
06 – 15
2
40
40/200 = 0.20
0.35
16 – 35
3
60
60/200 = 0.30
0.65
36 – 65
4
40
40/200 = 0.20
0.85
66 – 85
5
30
30/200 = 0.15
1.00
86 – 00
Total
200
EXAMPLE 1: Demand
f
Probability
Cumulative Probability
Interval
0 1 2
10 20 40
0.05 0.10 0.20
0.05 0.15 0.35
01 – 05 06 – 15 16 – 35
3 4 5
60 40 30
0.30 0.20 0.15
0.65 0.85 1.00
36 – 65 66 – 85 86 – 00
Simulation table
EXAMPLE 1: Day 1 2 3 4 5 6 7 8 9 10
Random Number 52 37 82 69 98 96 33 50 88 90
Demand 3 3 4 4 5 5 2 3
Average daily demand
39 = 10 = 3.9
5 5 Interval
Types of Simulation Model
Fixed time model
Next event model
Not play with time
Play with time
EXAMPLE 2: Demand
f
Probability
Cumulative Probability
Interval
0
15
0.05
0.05
01 – 05
1
30
0.10
0.15
06 – 15
2
60
0.20
0.35
16 – 35
3
120
0.40
0.75
36 – 75
4
45
0.15
0.90
76 – 90
5
30
0.10
1.00
91 – 00
Lead Time (Day)
f
Probability
Cumulative Probability
Interval
1
10
0.20
0.20
01 – 20
2
25
0.50
0.70
21 – 70
3
15
0.30
1.00
71 – 00 Simulation table
EXAMPLE 2: Day
1 2 3 4 5 6 7 8 9 10
Receive Begin
RN
Demand
End
Lost Sales
Order?
RN
Lead Time
06 63 57
1 3 3
9 6 3
0 0 0
No No Yes
02
-
0
2 0
No
-
-
10
-
9
-
6 3 10
94 52
5 3
7 4
69 32
3 2
7 4 2
2 10 7
30 48
2 3
0 7
88
4
3
10 10 -
0 0 0 0 0
No Yes No No No Yes
1 -
33 -
2 -
14
1
Interval
EXAMPLE 4: Number of Arrivals 0 1 2 3 4 5
Probability 0.13 0.17 0.15 0.25 0.20 0.10
Cumulative Probability 0.13 0.30 0.45 0.70 0.90 1.00
Interval 01 – 13 14 – 30 31 – 45 46 – 70 71 – 90 91 – 00
Simulation table
EXAMPLE 4: Unloading Rate 1 2 3 4 5
Probability 0.05 0.15 0.50 0.20 0.10
Cumulative Probability 0.05 0.20 0.70 0.90 1.00
Interval 01 – 05 06 – 20 21 – 70 71 – 90 91 – 00
Simulation table
Number of Arrivals
Unloading Rate
EXAMPLE 4:
Day
Delay
RN
Number of Arrivals
Total to be unloaded
RN
Unloading Rate
Actually Unload
1
-
52
3
3
37
3
3
2
0
06
0
0
63
3
0
3
0
50
3
3
28
3
3
4
0
88
4
4
02
1
1
5
3
53
3
6
74
4
4
6
2
30
1
3
35
3
3
7
0
10
0
0
24
3
0
8
0
47
3
3
03
1
1
9
2
99
5
7
29
3
3
10
4
37
2
6
60
3
3
11
3
66
3
6
74
4
4
12
2
91
5
7
85
4
4
13
3
35
2
5
90
4
4
14
1
32
2
3
73
4
3
15
0
00
5
5
59
3
3
EXAMPLE 5: Time between failures (hours) 0.5 1.0 1.5 2.0 2.5 3.0 Total
f
5 6 16 33 21 19 100
Probability Cumulative Probability
0.05 0.06 0.16 0.33 0.21 0.19
0.05 0.11 0.27 0.60 0.81 1.00
Interval
01 – 05 06 – 11 12 – 27 28 – 60 61 – 81 82 – 00
Simulation table
EXAMPLE 5: Repair time required (hours) 1 2 3 Total
f
28 52 20 100
Probability Cumulative Probability
0.28 0.52 0.20
0.28 0.80 1.00
Interval
01 – 28 29 – 80 81 – 00
Simulation table
Time Between
EXAMPLE 5:
Machine
RN
Time between breakdown
1 2 3 4 5 6 7 8 9 10
57 17 36 72 85 31 44 30 26 09
2.0 1.5 2.0 2.5 3.0 2.0 2.0 2.0 1.5 1.0
Breakdown time
Start repair
RN
02:00 02:00 07 03:30 03:30 60 05:30 05:30 77 08:00 08:00 49 11:00 11:00 76 13:00 13:00 95 15:00 16:00 51 17:00 18:00 16 18:30 19:00 14 19:30 20:00 85
Repair Time
Repair time required
Finish repair
Breakdown duration
1
03:00
2 2
05:30 07:30
1.0 2.0 2.0
2 2 3
10:00 13:00
2.0 2.0
2 1
16:00 18:00 19:00
3.0 3.0 2.0
1 3
20:00 23:00
1.5 3.5