Michael J. Bonafilia Modeling, Simulation, Analysis Homework #7

advertisement
Michael J. Bonafilia
Modeling, Simulation, Analysis
Homework #7
DESS 8.22
Table 1 below lists the results of various random number tests. Three test sequences of 100 numbers each
were generated, using the Excel RAND() function. There was no documentation on how the random
numbers were generated. The following random number tests were performed: Frequency (KolmogorovSmirnov, Chi-square), Runs (Up/Down, Above/Below Mean), Runs Length (Up/Down, Above/Below
Mean), and Autocorrelation (for every five points).
All tests for all samples passed, except for the Frequency (Kolmogorov-Smirnov) and Runs (Up/Down) –
both for test group 3. For most tests, the sample test statistic was well below the corresponding critical
value. Based on this finding (for 300 random numbers generated), it appears that Excel has an adequate
random number generator.
Table 1
Frequency
(KolmogorovSmirnov)
D
DD.05
Pass/Fail
Frequency (Chisquare)




Pass/Fail
Runs Tests
(Up/Down)
Mean,a
Var,a
a
Zo

Pass/Fail
Runs Test
(Above / Below
Mean)
n1
n2
b
Mean,b
Var,b
Zo
Test 1
Test 2
Test 3
0.067 0.104261 0.859688
0.136
0.136
0.136
Pass
Pass
Fail
Test 1
Test 2
Test 3
8.4
11.8
12.2
16.9
16.9
16.9
Pass
Pass
Pass
Test 1
Test 2
Test 3
66.333333 66.33333 66.33333
17.455556 17.45556 17.45556
62
63
80
-1.037183 -0.79783 3.271115
1.96
1.96
1.96
Pass
Pass
Fail
Test 1
Test 2
Test 3
48
52
51
52
48
49
49
51
49
50.42
50.42
50.48
24.667539 24.66754 24.72748
-0.285907 0.116779 -0.29763

Pass/Fail
Runs Length
(Up / Down)
Mean,a
Var,a

1.96
Pass
1.96
Pass
1.96
Pass
Test 1
Test 2
Test 3
66.333333 66.33333 66.33333
17.455556 17.45556 17.45556
2.255 1.557379 1.665207

5.99
5.99
5.99
Pass/Fail
Pass
Pass
Pass
Test 1
Test 2
Test 3
Runs Length
(Mean)
w1
w2
E(I)
E(A)

0.4992
0.4992
0.4998
0.2496
0.2496
0.2499
2.0064103 2.00641 2.001601
49.840256 49.84026 49.96002
1.3609134 3.807895 5.022038

5.99
5.99
5.99
Pass/Fail
Pass
Pass
Pass
Test 1
Test 2
Test 3
Autorcorrelation
(every 5 points)
M
p,im
sigma,pim
Zo

Pass/Fail
18
18
18
-0.067612 0.034311 0.056689
0.0680885 0.068088 0.068088
-0.993009 0.503919 0.832586
1.96
1.96
1.96
Pass
Pass
Pass
See end for Random Data subject to above tests.
DESS P9.11
The results are listed in Tables 1, 2, and 3. Table 1 displays the cumulative frequency for each interval,
Table 2 displays the “look-up” table similar to Table 9.3 (pg. 331), and Table 3 displays the random
variable results (X) from inputting 5 random numbers (R) into the look-up table. The random numbers
were generated using the Excel RAND() function. Lastly, Fig. 1 is an inverse cumulative distribution
function for X.
Table 1 – Cumulative Distribution for X
Interval
Frequency Relative Freq. Cumulative Freq.
15-30
10
0.07
0.07
30-45
20
0.13
0.20
45-60
25
0.17
0.37
60-90
35
0.23
0.60
90-120
30
0.20
0.80
120-180
20
0.13
0.93
180-300
10
0.07
1.00
150
Table 2 – Lookup Table for X
i
Input, ri
1
0
2
0.07
3
0.20
4
0.37
5
0.60
6
0.80
7
0.93
8
1.00
Output, xi
15
30
45
60
90
120
180
300
Table 3 – X-values generated from random numbers
R
Xi
ai
0.1817
30
115.4
0.6509
90
150
0.0988
30
115.4
0.8026
120
461.5
0.2471
45
88.2
Slope, ai
214.3
115.4
88.2
130.4
150.0
461.5
1714.3
ri
0.07
0.6
0.07
0.8
0.2
X
42.9
97.6
33.3
121.2
49.2
Fig. 1 – Inverse CDF of X
350
300
X
250
200
150
100
50
0
0
0.07 0.20 0.37 0.60 0.80 0.93 1.00
R
ProModel HW
The results of my model of EX9 are listed below in Table 1. I compared the models by the total number of
entities processed during a simulation time of eight hours. That is, the total number of customers served.
The results are identical for all but one distribution, N(5,1). Using the ProModel model, I obtained a value
of 81. Using my model, I obtained 80. I am currently unable to explain this discrepancy. Also listed below
is a text file for the model I created.
Table 1
Distribution
Total Customers
Served, EX9 Model
Total Customers Served,
Mike's Model of EX9
D(5)
N(5,1)
N(5,2)
E(5)
T(2,5,7)
U(5,3)
L(5,1)
79
81
72
67
87
79
83
79
80
72
67
87
79
83
Text File for Model (EX9)
************************************************************************
********
*
*
*
Formatted Listing of Model:
*
*
C:\ProMod4\models\Example9.mod
*
*
*
************************************************************************
********
Time Units:
Distance Units:
Minutes
Feet
************************************************************************
********
*
Locations
*
************************************************************************
********
Name
---------Reception
Step_1
Step_2
Step_3
Cap
--5
1
1
1
Units
----1
1
1
1
Stats
----------Time Series
Time Series
Time Series
Time Series
Rules
Cost
---------- -----------Oldest, ,
Oldest, ,
Oldest, ,
Oldest, ,
************************************************************************
********
*
Entities
*
************************************************************************
********
Name
Speed (fpm) Stats
Cost
---------- ------------ ----------- -----------Customer
150
Time Series
************************************************************************
********
*
Path Networks
*
************************************************************************
********
Name
Type
T/S
From
Speed Factor
-------- ----------- ---------------- -------- -----------Net1
Passing
Time
N1
N2
N3
To
BI
Dist/Time
-------- ---- --------N2
N3
N4
Bi
Bi
Bi
.1
.1
.1
************************************************************************
********
*
Interfaces
*
************************************************************************
********
Net
Node
---------- ---------Net1
N1
N2
N3
N4
Location
---------Reception
Step_1
Step_2
Step_3
************************************************************************
********
*
Processing
*
************************************************************************
********
Process
Entity
Location
Move Logic
-------- ---------- -----------Customer Reception
1 Move on Net1
Customer Step_1
1 Move on Net1
Customer Step_2
1 Move on Net1
Customer Step_3
Routing
Operation
Blk
Output
Destination Rule
------------------
---- -------- ----------- -----
Wait 2
1
Customer Step_1
FIRST
Wait N(5,1)
1
Customer Step_2
FIRST
Wait 5
1
Customer Step_3
FIRST
Wait 5
Cust_Served=Cust_Served+1
1
Customer EXIT
FIRST
1
************************************************************************
********
*
Arrivals
*
************************************************************************
********
Entity
Location
Qty each
First Time Occurrences Frequency
Logic
-------- --------- ---------- ---------- ----------- ---------- ----------Customer Reception 1
0
150
E(5)
************************************************************************
********
*
Variables (global)
*
************************************************************************
********
ID
Type
Initial value Stats
----------- ------------ ------------- ----------Cust_Served Integer
0
Time Series
************************************************************************
********
*
Streams
*
************************************************************************
********
Stream #
Seed #
Reset
------------ ------------ -----------1
1
No
Random Data used in for P8.22
Test Data 1 Test Data 2
0.325550614 0.798628913
0.268044177 0.952636745
0.673186522 0.056795906
0.576160509 0.003920271
0.683687293 0.712310876
0.704236109 0.816442421
0.514157206 0.49234699
0.749244288 0.551115041
0.539480381 0.712144112
0.448153623 0.178650404
0.528059089 0.736940201
0.27963544 0.701041477
0.510979626 0.139670548
0.542232046 0.915783529
0.472248698 0.121360742
0.165787781 0.095171971
0.413122449 0.895256326
0.48690005 0.523704345
0.056713352 0.51170044
0.193160936 0.621344324
0.244882727 0.433934434
0.204584102 0.881400542
0.431790091 0.446045106
0.821811377 0.82031521
Test Data 3
0.772758183
0.29500766
0.481551259
0.526242045
0.434446427
0.909687508
0.25234649
0.506209746
0.697240986
0.815051549
0.832591528
0.092724987
0.863426344
0.921451115
0.782729234
0.395131376
0.796567319
0.298970367
0.399300086
0.737472452
0.928278546
0.834923625
0.996245116
0.334606875
0.220863856
0.315261619
0.395684429
0.228104295
0.423606774
0.453452803
0.571305486
0.002504328
0.806329744
0.175742489
0.178309198
0.385960241
0.726853929
0.643763035
0.60809196
0.282462288
0.273460747
0.869323059
0.833085608
0.945078576
0.828021611
0.211569595
0.036315262
0.863511354
0.756338086
0.207671055
0.748755249
0.736630038
0.654926627
0.245731393
0.539335434
0.024625989
0.063168788
0.591989527
0.140475811
0.824268868
0.355884256
0.350601625
0.469884454
0.946545329
0.233002221
0.526142421
0.45604305
0.010120285
0.602641108
0.749653092
0.554340616
0.390517017
0.478949053
0.527008637
0.963149895
0.306443952
0.797380215
0.282419581
0.854029884
0.63882131
0.07540895
0.802621248
0.754608226
0.218712189
0.183739592
0.717863175
0.345568884
0.043335395
0.808237095
0.907837782
0.08618579
0.64196874
0.986318848
0.848731162
0.600068786
0.486877876
0.838945764
0.497674715
0.874702984
0.669336929
0.769310195
0.606756092
0.162909161
0.142195328
0.711638469
0.2127308
0.440509843
0.458497018
0.110536258
0.787915046
0.324998094
0.017607789
0.137423527
0.847782409
0.282367376
0.341324867
0.362849421
0.755491475
0.893099886
0.345310623
0.506952339
0.990249883
0.385448687
0.702881425
0.209798245
0.639895648
0.626483454
0.905330971
0.466794162
0.596796646
0.351184147
0.190836265
0.414281403
0.868987944
0.541929029
0.496321909
0.588796833
0.785027347
0.964899334
0.487688611
0.801171089
0.512595209
0.408872553
0.748670947
0.908698211
0.536455628
0.742052259
0.906557811
0.515585943
0.780870565
0.141143669
0.383303748
0.637438694
0.496744474
0.73881017
0.066009708
0.49266982
0.721625987
0.300142604
0.91183804
0.372714028
0.635795475
0.358691878
0.924262914
0.39740738
0.149204084
0.544640857
0.129182182
0.909540204
0.805671704
0.713130457
0.969973867
0.324676625
0.860459063
0.779784416
0.47407181
0.07057434
0.321923385
0.820894492
0.216128171
0.806096838
0.888368981
0.883090749
0.045569473
0.749123816
0.356327726
0.705919484
0.04658126
0.685885714
0.294922354
0.643770434
0.680763907
0.993661377
0.959706429
0.488164697
0.476818763
0.048398879
0.536718687
0.455426974
0.959638814
0.824116135
0.855888421
0.891506255
0.694260657
0.545240017
0.013537895
0.166998142
0.300082892
0.325407241
0.035843958
0.234836048
0.536155716
0.796615259
0.769787862
0.297915492
0.039375001
0.913208062
0.827700614
0.059055592
0.196298664
0.060506317
0.443869903
0.457642002
0.713424645
0.754769097
0.865548223
0.760426212
0.357150541
0.786790931
0.285063763
0.822545997
0.435567943
0.924093228
0.730921052
0.586975904
0.901680218
0.612748591
0.015243709
0.919790244
0.471314666
0.992657175
0.09744235
0.192644583
0.173771863
0.824791313
0.486811591
0.187957563
0.142552866
0.223021981
0.510199965
0.885184992
0.613131191
Download