Вы находитесь на странице: 1из 22

Example 2.

12: Project Simulation (An Activity Network)


Click the button to recalculate the spreadsheet and generate a new trial.

Paths

Activities

Lower
Limit

1
2
3
1
2
3

2
2
2
3
3
6

2
3

Upper
Limit

You may change the Example by


changing any of the values in green.

4
4
4
6
6
12
Seed for Random Numbers

12345

Number of Customers = 100

Simulation Table
Path 1
Activity 1 Activity 2 Activity 3
#VALUE! #VALUE! #VALUE!

Path 2
Path 3
Activity 1 Activity 2 Activity 1 Path 1
#VALUE! #VALUE! #VALUE! #VALUE!

#VALUE!

Completion Times
Path 2
Path 3
#VALUE!
#VALUE!

#VALUE!

Start

#VALUE!

#VALUE!

#VALUE!

on Times
Project
#VALUE!

Critical
Path
#VALUE!

#VALUE!

End

Experiment: Repeated Trials of the Project Simulation

Number of Trials:
400
Link to Measure of Performance (Sample Values):
Name of Measures:
Links
Project Completion Time #VALUE!
Critical Path #VALUE!
Click on Run Experiment to generate 400 trials, and to create a histogr
to show the distribution of the 400 samples of Project Completion Time
Response Table
Multi-Trial Summary
Seed for Random Numbers
Critical
Path
3
2
1
2
1
2
2
3
2
3
2
1
3
3
2
3
1
1
2
1
1
2
2
3
1
2
3
1
1
2
2
2
2
3
1
3
1
2

Bins
6
7
8
9
10
11
12

Frequency
0
2
5
35
132
129
97

Average
Median

10.21
10.14

Minimum
Maximum

6.65
11.99

Path
1
2
3
All

Frequency Rel.Freq.
102
25.5%
129
32.3%
169
42.3%
400
100.0%

Frequency Distribution of Project Com

150
Occurrences (No. of Trials)

Trial
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

Project
Completion
Time
10.66
9.57
9.93
10.85
9.44
10.81
9.77
11.75
11.19
11.26
11.36
6.65
9.87
9.37
10.72
11.45
9.05
9.48
10.52
10.18
10.06
8.73
10.30
11.93
9.49
9.57
9.70
10.14
9.86
8.33
10.59
10.95
8.42
11.24
10.54
11.51
10.30
9.90

132 129
97

100
50
0

35

06

9
Bin

10

11

12

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

9.89
11.39
9.63
9.70
8.48
10.44
8.94
10.11
11.97
9.90
10.01
8.53
9.35
9.77
8.98
10.39
11.05
11.43
9.93
9.06
10.85
10.46
7.93
8.97
11.57
8.47
11.40
10.57
11.27
11.88
10.82
9.75
11.65
10.29
9.76
10.84
9.35
9.23
9.03
7.61
11.43
11.91
10.14
9.49
9.02
11.61
9.60
11.60
10.47
11.25
11.29

3
3
2
2
1
3
2
3
3
2
2
2
1
1
1
3
2
3
3
1
1
3
1
1
3
2
3
2
3
3
2
3
2
2
2
2
2
1
1
1
3
3
3
3
1
3
3
3
3
2
2

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140

9.22
9.67
8.57
11.30
9.20
11.39
9.51
9.60
7.76
11.50
9.45
11.91
8.88
9.83
10.22
11.28
11.35
9.16
10.30
9.45
10.28
11.82
9.71
8.37
8.71
9.57
10.72
9.29
10.96
10.13
9.35
8.97
9.31
9.03
11.63
9.14
10.21
10.79
9.28
9.91
11.96
8.88
10.22
11.34
9.18
10.88
6.87
9.83
10.90
10.29
9.21

2
2
2
3
1
3
1
2
1
3
1
3
1
1
3
3
3
1
1
1
3
2
2
2
1
2
3
2
2
3
1
1
1
2
2
3
3
3
3
2
3
1
2
1
3
2
1
3
3
3
1

141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191

10.24
10.71
9.87
8.87
11.71
11.85
11.36
10.13
9.14
10.67
9.34
10.41
10.83
10.86
9.82
10.70
11.90
11.44
11.52
10.37
10.02
11.46
11.64
10.22
10.37
11.06
10.74
10.51
11.22
10.75
9.14
11.49
9.89
10.13
11.84
10.91
9.36
9.10
8.77
8.31
10.23
11.35
9.30
10.44
9.47
10.70
11.53
10.28
9.32
9.59
9.95

1
1
3
1
3
3
3
3
3
2
2
1
3
3
3
2
3
2
1
3
2
3
3
3
3
3
3
2
2
2
2
3
1
1
3
3
1
3
3
3
2
2
3
3
1
2
3
2
1
2
2

192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242

11.19
9.76
9.09
9.86
11.73
8.96
8.89
10.46
9.73
9.07
9.25
8.63
9.66
8.91
10.40
11.08
10.12
11.23
9.74
10.82
9.85
11.89
9.37
11.83
10.58
10.01
10.52
11.51
11.53
11.46
10.89
9.99
11.03
9.65
9.36
10.77
10.03
11.54
11.65
9.42
11.52
10.11
11.06
11.88
9.76
10.27
11.44
9.76
11.61
10.23
10.65

3
3
3
1
3
2
1
2
2
2
3
2
3
1
2
2
1
3
3
3
1
3
3
3
2
3
2
3
3
1
3
1
2
2
3
2
2
1
3
3
2
2
3
3
2
3
3
2
3
3
1

243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293

10.02
9.93
11.15
11.55
11.01
9.72
9.18
10.13
10.89
9.56
10.85
9.97
10.68
11.99
9.52
10.75
9.18
8.89
9.50
9.92
9.76
9.67
9.82
10.63
9.92
9.67
11.04
9.51
10.75
8.02
9.53
9.15
10.86
10.60
11.86
9.42
9.78
10.73
11.65
9.17
10.69
10.14
7.58
10.94
11.56
10.63
11.06
11.77
10.68
9.12
8.26

3
2
2
3
1
2
1
1
1
1
2
2
2
3
1
3
1
3
2
2
1
1
2
3
2
2
1
2
3
1
2
3
3
3
3
3
2
3
3
2
2
3
1
3
1
2
3
3
3
1
2

294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344

10.02
10.94
9.22
9.72
10.14
8.73
11.14
9.15
9.41
11.06
8.71
11.20
10.93
11.85
9.59
9.05
8.85
11.24
11.03
10.10
9.24
10.07
10.69
11.13
9.94
10.49
11.70
11.97
10.93
8.83
10.93
10.02
9.75
9.76
11.88
11.29
10.93
9.61
10.28
10.91
10.12
8.58
10.38
10.17
10.09
11.49
8.46
9.86
10.24
8.04
9.32

3
3
1
2
1
2
3
1
1
3
1
3
3
3
1
2
2
2
3
1
3
3
2
3
3
3
3
3
3
1
1
2
1
3
3
2
2
1
2
2
1
2
2
3
3
3
1
2
3
1
1

345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395

11.52
10.13
9.24
11.31
11.96
10.26
10.21
8.96
10.13
8.96
9.58
9.47
10.27
10.36
9.29
11.40
10.05
10.86
11.30
11.94
9.97
10.59
9.67
9.84
10.13
11.12
9.64
9.60
9.92
10.19
11.85
9.89
7.47
9.53
10.97
9.85
9.05
10.40
9.06
10.30
11.51
9.63
8.90
9.63
10.67
10.97
11.32
9.55
11.35
10.61
10.96

1
3
2
2
3
3
1
1
1
1
3
1
2
2
3
2
2
3
3
3
1
1
3
2
3
3
1
2
2
3
3
1
3
3
3
1
2
3
3
3
3
3
2
3
1
1
2
2
3
2
3

396
397
398
399
400

9.93
10.74
10.69
10.98
10.74

2
2
3
3
2

You may change any value in green and re-run the experiment.
After making changes, click on Run Experiment.
These cells are linked to the output of a trial, and is the source
of the data in Column B under Project Completion Time .
rials, and to create a histogram
s of Project Completion Time .
12345

Distribution of Project Completion Time

132 129
97

35

9
Bin

10

11

12

Explanation of Model Logic:


You may change any of the values with a green background to change the
activity times. You may start with this spreadsheet and use it as a guide or
template, and create your own activity network.

The "Seed" for a Random N

The Model's Activity Times


For activity times, the model uses the function Uniform(low, high), written in
Visual Basic and supplied in the workbook. The low and high values, as well
as the returned value, are reals, not integers. All values between low and high
are equally likely to occur.

When you type a seed value and c


the Visual Basic code sets the so-c
Basic's random number generator,
determines the first "random" value
function. All the supplied VB functi
workbooks) for generating random
Basic's Rnd( ) function.

The Uniform(low, high) function uses the Visual Basic RND( ) function, which
generates a random value between 0 and 1. The first value generated by
RND( ) depends on the "seed" you specify on either the "One Trial" or
"Experiment" worksheet. The seed is any arbitrary positive integer (less than
2^31 - 1, approximately 2.1 billion).
The Uniform(low, high) function generates its "random" value by the simple
linear transformation:
Uniform = low + (high - low) * Rnd()

Why we do not use RAND a

In the Example workbooks, we do N


functions RAND() and RANDBETW
random values. The reason is simp
called "seed" value. But we can co
function and its seed.

Being able to control the seed value


generator allows us to repeat an ex
same results. The seed determine
values generated by the random ge
repeatability.

eed" for a Random Number Generator:

u type a seed value and click the button "Reset Seed",


Basic code sets the so-called random seed for Visual
ndom number generator, Rnd( ). The seed value
s the first "random" value generated by the Rnd( )
All the supplied VB functions (in all the Example
s) for generating random values are based on Visual
nd( ) function.

do not use RAND and RANDBETWEEN:

ample workbooks, we do NOT use Excel's built-in macro


RAND() and RANDBETWEEN(low,high), for generating
alues. The reason is simple: we cannot control their soed" value. But we can control Visual Basic's Rnd()
nd its seed.

e to control the seed value of a random number


allows us to repeat an experiment and get the exact
ults. The seed determines the first and subsequent
nerated by the random generator Rnd( ), which allows
ity.

Вам также может понравиться