question

Tee Hiett avatar image
1 Like"
Tee Hiett asked Cliff King commented

Function of Initialized random streams option?

What is the function of the Global Preferences > Environment > Initialize random strains based on system time?

Thanks,

Tee

FlexSim HC 5.3.6
random streamsenvironment
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Cliff King avatar image
1 Like"
Cliff King answered Cliff King commented

Tee,

The mouse-over tooltip says "Initializes FlexSim's random streams based on the current system time when FlexSim starts".

Try the following exercise and I think it will help you understand this a little better.

  1. Uncheck the "Initial random streams based on system time" box in File > Global Preferences > Environment, and click Apply.
  2. Restart FlexSim.
  3. Open a Script Console (Debug > Script Console menu), type uniform(1,100) into the window, and click the execute button (green arrow) to generate a random number between (and inclusive of) 1 and 100 using random number stream #0. I can predict you will get the result 59.2542!
  4. Click the execute button again, and you will get the result 42.4590!
  5. Reset the model, and execute the uniform distribution again, and you will get the number 59.2542 again if you have the Statistics > Repeat Random Streams menu checked; otherwise, you will get the number 53.2397 which will be generated by the third number in the 0th stream of 2 billion random numbers.
  6. Now check the "Initial random streams based on system time" box in File > Global Preferences > Environment, hit Apply and see what you get with the above exercise. No one can predict what you will get, because the random number streams (of which there are an unlimited number of them in our software, each identified by a unique integer starting with 0) are all initialized with a number associated with the system time clock when you open the software rather than predetermined generator seed values. When you check the Statistics > Repeat Random Streams menu, you will still be able to repeat the random streams generated by the system clock when first opening the software.
  7. If you want to go further with this exercise, try using uniform(1,100, #) with different #'s for the random stream identifiers.
  8. To go even further try all this in an Experimenter and you will learn that it doesn't matter whether you have the "Initial random streams based on system time" box checked or not, the Experimenter overrides it and does it own thing. With the experimenter, we want to be able to repeat any of the individual replication runs that occurred during an experiment by using the Explore tab, and this wouldn't be possible if the streams were randomly initialized by the system time clock.

You may want to go back and reread this earlier post of mine (https://answers.flexsim.com/questions/30437/can-you-please-explain-random-number-streams-and-h.html) after going through the above exercise, and it will probably all make more sense to you. Or just move forward with your simulations and try not to worry about how random the random numbers really are. It hurts your brain to much, and most likely isn't worth the pain! haha

Cliff

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Tee Hiett avatar image Tee Hiett commented ·

Thanks Cliff. So if I run the experimenter with "initialize random streams" unchecked, check the option "initialize random streams" and rerun the experimenter, I will get a different set of random numbers for the experiment?

0 Likes 0 ·
Cliff King avatar image Cliff King Tee Hiett commented ·

I never tested the effect "Initialize random streams based on system time" has on an experiment, but my understanding is that is has no effect. In other words, it gets ignored. If you test and find out differently, please update this post for us all. I do know for sure the "Repeat Random Streams" menu option has no effect on an experiment though.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.