We're encountering a problem with the RandomSeed attribute for all models, new and old.
When creating a new model and adding an object, that has RandomSeed as an attribute, the RandomSeed generated is not a valid number for statistical distributions in methods (z_).
See the attached files.
Has anyone else experienced this?
Solved! Go to Solution.
The maximum allowed stream number for z_ functions is 500000. Note that when you use stream number x, Plant Simulation will create all streams from 1 to x (and allocate memory for them). There should not be a need to use more than 500000 random number streams for z_ functions. It is often okay to use just the random number stream 1.
All objects automatically use a random number stream of their own. RandomSeed just sets the seed value for the stream. If two objects have the same RandomSeed value, they will not share a random number stream. Instead they will still use two separate streams that will generate the same random numbers. The seed value can be any integer number. If, for example, you set RandomSeed to 1000000000, this has no negative effect (like creating additional random numbers streams and using memory for them). The seed value is just a value that (kind of) initializes the random number stream, so that it generates a certain sequence of random numbers.
If you have the need to use z_ functions in a way that you use a separate random number stream for each object, you could give each object a user-defined attribute of data type integer and assign a unique number between 1 and 500000 to it. As an alternative you could give each object a user-defined attribute of data type randtime, and use 'MyObject.RandtimeAttr.rollDice' instead of calling a z_ function. Plant Simulation will automatically use separate random number streams for all the user-defined attributes.