| A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
RandNum |
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
Category: |
Simulation Modelling |
|
|
|
|
|
|
|
|
| 6 |
|
Family: |
Monte Carlo |
|
|
|
|
|
|
|
|
|
| 7 |
|
Arguments: |
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
Meaning: |
Compute a semi random number |
|
|
|
|
|
|
|
| 9 |
|
Description: |
This function
generates a random number. The number
it generates is actually a semi-random number, because it comes from a
pre-ordained sequence of random numbers from a seed. The Business Functions menu, under
Monte-Carlo, gives you the option to seed the generator. If the generator is re-initialised time and
again with the same seed, the identical set of random numbers will flow from
the RandNum function. In fact, because
the sequence of numbers is determined in one go rather than each number
dependent on the previous, you can even use PickRandom to choose what number
you'd like from the sequence, if desired.
The repeatability from a specific seed means that your workbooks are
repeatable. Our experience of
Monte-Carlo simulation work is that it really helps to have the random number
sequence repeatable, for debugging your model and seeing changes in
isolation. |
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# |
0.3932 |
|
0.5116 |
|
0.3194 |
|
0.4193 |
|
|
|
|
|
| 14 |
# |
0.7212 |
|
0.2831 |
|
0.8822 |
|
0.4358 |
|
|
|
|
|
| 15 |
# |
0.1638 |
|
0.4311 |
|
0.3989 |
|
0.0868 |
|
Average of 40 Numbers: |
0.4240 |
| 16 |
# |
0.1937 |
|
0.9648 |
|
0.2631 |
|
0.4346 |
|
|
|
|
|
| 17 |
# |
0.4330 |
|
0.2089 |
|
0.2095 |
|
0.9053 |
|
|
|
|
|
| 18 |
# |
0.4518 |
|
0.9786 |
|
0.2811 |
|
0.8356 |
|
|
|
|
|
| 19 |
# |
0.0127 |
|
0.6901 |
|
0.1886 |
|
0.1468 |
|
|
|
|
|
| 20 |
# |
0.6816 |
|
0.3459 |
|
0.2547 |
|
0.0546 |
|
|
|
|
|
| 21 |
# |
0.3631 |
|
0.3774 |
|
0.5306 |
|
0.1768 |
|
|
|
|
|
| 22 |
# |
0.7174 |
|
0.2265 |
|
0.6804 |
|
0.3049 |
|
|
|
|
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
This function creates a semi-random number. |
|
|
|
|
|
|
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
The points to note are: |
|
|
|
|
|
|
|
|
|
|
| 28 |
|
n The function is 'volatile', that is, it will
always recalculate
when the worksheet or workbook recalculates, |
| 29 |
|
not just if the workbook has changed. |
|
|
|
|
|
|
|
|
| 30 |
|
n The random numbers are semi-random, that is
they proceed in a
repeatable sequence for any given value of Seed. |
| 31 |
|
n Seed' provides a starting point for the
random numbers,
and is itself the first random number.
Seed is set as follows: |
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
|
|
-
When Business Functions is first loaded, Seed is set to 3167 - no reason for
this, any number from 0 to 32767 will do. |
| 34 |
|
|
|
-
Seed can be set as one of the input parameters to the Monte-Carlo when doing
a simulation. |
| 35 |
|
|
|
- It can also
be set from the Business Functions menu |
|
|
|
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
|
|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