question

Jacek Diakun avatar image
1 Like"
Jacek Diakun asked Phil BoBo edited

Two questions on Random Number Generator (RNG) used in FlexSim (RNG type, seed)

Hello,

I have two questions concerning Random Number Generators (RNG) implementated in FlexSim:

1) What type of RNG is implemented in FlexSim?

2) Is it possible to manually enter the seed for RNG in FlexSim? If it is possible - where can I find the right option?

Regards,

Jack

FlexSim 16.2.2
random number generator
5 |100000

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

Ben Wilson avatar image
3 Likes"
Ben Wilson answered Phil BoBo edited

What type of RNG is implemented in FlexSim?

@anthony.johnson addressed this question in a May 13, 2009 post on our old forum:

https://www.flexsim.com/community/forum/showthread.php?p=4318

Flexsim uses a prime modulus multiplicative linear congruential generator (PMMLCG), as described in Law and Kelton chapter 7.

Anthony also added an update in 2011:

https://www.flexsim.com/community/forum/showthread.php?t=1687&p=7839

For version 5, in addition to the Prime Modulus Multiplicative Linear Congruential Generator described here, we added an optional Combined MRG, which is implemented based on appendix 7B of Averill Law's 4th Edition. By default, however, Flexsim still uses the PMMLCG.

If there is anything in Anthony's description that is now out of date, the dev team may chime in below. If they don't, please consider Anthony's answer as the current correct answer.

Is it possible to manually enter the seed for RNG in FlexSim?

As noted by @Mischa Spelt:

...if you want to manually initialize the random streams you can use the randinit command.
· 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.

Mischa Spelt avatar image Mischa Spelt commented ·

Note that the release notes for FlexSim 6 (March 2012) state: "Added a new random number generator to generate seeds based on the replication number for the existing random number generator. Email support if you need a script to initialize the streams of a particular model back to the values used in prior versions." I am not sure whether this affects all random number generation or just that in the Experimenter though.

1 Like 1 ·
Phil BoBo avatar image Phil BoBo ♦♦ Mischa Spelt commented ·

Within the interactive FlexSim session, it initializes the streams based on the replication number specified in the experimenter's Advanced tab (replication 1 by default).

0 Likes 0 ·
repeat-streams.png (20.1 KiB)
Mischa Spelt avatar image
0 Likes"
Mischa Spelt answered

For the answer to the first question you will have to wait for a developer to reply, but if you want to manually initialize the random streams you can use the randinit command.

5 |100000

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

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.