question

Cliff King avatar image
2 Likes"
Cliff King asked Sebastien commented

Can you please explain random number streams and how they are used in the software?

Choose One
random streamrepeat random streamsrandom numbersstreamrandom number stream
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
8 Likes"
Cliff King answered Sebastien commented
Random numbers are needed during a simulation run to pull random samples from the various stochastic distributions (i.e. exponential, lognormal, erlang, etc.) used throughout the model to define process times, arrival rates and such. In our software, you can specify which stream of random numbers should be used to generate samples from the various distributions defined in your model. There are an unlimited number of streams available within the software, and you can specify a different stream ID for every distribution used in the model, if you want. The streams can be thought of as a list of pseudo-random numbers that are generated with what we call the "random number generator". The random number generator is a sophisticated algorithm that uses an initial "seed" value to generate a stream of pseudo-random numbers, one after the other, as needed, whenever a stochastic distribution is called during the simulation run. Each stream will generate a uniquely different set of numbers because each stream is initiated with a unique seed value.

There is a setting available under the "Statistics" menu that allows you to either "Repeat Random Numbers" or not. If the menu setting is checked, then each of the streams will be initiated with their default seed value and therefore generate the same stream of random numbers every time the model is ran. If the "Repeat Random Numbers" menu option is not checked, then a different seed value will be used to initiate each of the streams every time the model runs and therefore the stream of random numbers will be different; thereby generating different samples from the distributions referencing the streams, and therefore generating different model results for every run. There is no need to bother with this menu setting when using the Experimenter to run a model. During an experiment, the setting is ignored, and each stream is initiated with a predefined seed value that is unique to both the stream and the replication being run during the experiment. By using predefined seed values for each of the streams based on the replication number, we are able to 1) better compare results for a specific replication number a cross various scenarios defined in an experiment, and 2) manually rerun a specific replication of a specific scenario to further investigate something of interest discovered for a particular run of the experiment. In FlexSim HC, you can specify a specific scenario and replication number to run of your model using the "Explore" tab of the "Simulation Experiment Control" window, and in standard FlexSim you need to "Choose a default reset scenario" on the "Scenarios" tab and specify a replication number in the "Repeat Streams of Replication" field on the "Advanced" tab.

· 5
5 |100000

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

Normand Côté avatar image Normand Côté commented ·

@Cliff King, you mentioned: "There are an unlimited number of streams available within the software". Can you elaborate on the type of random number generator implemented in Flexsim (i.e MRG32, MT19937, WELL, etc.) and what is the period of the generator ?

Thanks

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Normand Côté commented ·
2 Likes 2 ·
Sebastien avatar image Sebastien commented ·

@Cliff King. @Phil BoBo Thank you for this detailed explanation of the random stream. When we use a function without calling a specific stream, is the first stream simply called or is it random too ? Can we have repeatability by not explicitly defining a random stream ?


0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Sebastien commented ·

If you don't specify a stream, it uses stream 0. All distribution calls made without a specific stream specified will be using the same stream.

0 Likes 0 ·
Sebastien avatar image Sebastien Phil BoBo ♦♦ commented ·

@Phil BoBo. Thank you for the fast response !

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.