Professional Documents
Culture Documents
9 Simulation
9 Simulation
x f(x)
0 0.10
1 0.30
2 0.40
3 0.20 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
Problem
• The Dynaco Manufacturing Company produces a product in a process
consisting of operations of five machines. The probability distribution of the
number of machines that will break down in a week follows:
Machines Break Down per week 0 1 2 3 4 5
Probability .10 .10 .20 .25 .30 .05
• Simulate the repair time for 7 weeks and then compute the average weekly
repair time. Use the following U(0, 99) numbers for simulation. Use r1 for
number of breakdowns and r2 for repair time.
r1 20, 31, 98, 24, 01, 56, 48
r2 58, 47, 23, 69, 35, 21, 41, 14, 59, 28, 13, 09, 20, 73, 77, 29, 50
Week r1 Breakdowns r2 Repair time Total repair time
1 20 2 58 2
47 2 4
2 31 2 23 1
69 2 3
3 98 5 35 2
21 1
41 2
14 1
59 2 8
4 24 2 28 1
13 1 2
5 1 0 0
6 56 3 9 1
20 1
73 2 4
7 48 3 77 2
29 1
50 2 5
Clock N Arr. Serv. Next Arr Next Dep Next E. Time in system
0 0 80 -- 80 -- 80 A
80 1 10 27 90 107 90 A
2 17 5 22
3 0 92 92
4 71 32 103
0 0 0.20 16 16 0 16 A
Queue 1 Queue 2
Next Next
Clock N1 ra Arr. Serv1 Next Dep. N2 rs2 Serv2 Dep. Next
Arr. Q Q2 Event
1
0 0 0.20 16 16 0 16 A
16 1 0.77 3 6 19 22 0 19 A
Queue 1 Queue 2
Next Next
Clock N1 ra Arr. Serv1 Next Dep. N2 rs2 Serv2 Dep. Next
Arr. Q Q2 Event
1
0 0 0.20 16 16 0 16 A
16 1 0.77 3 6 19 22 0 19 A
19 2 0.50 7 26 22 0 22 D1
22 1 8 26 30 1 0.13 4 26 26 A D2
26 2 0.41 9 35 30 0 30 D1
30 1 3 35 33 1 0.01 9 39 33 D1
33 0 35 2 39 35 A
35 1 0.35 10 5 45 40 2 39 39 D2
39 1 45 40 1 0.37 2 41 40 D1