Hi
How executestring(triangular(1,3,2,9)) uses random seed? I tested it and I have a doubt that it doesn't recognize it at all.
Example:
string myDistr = "triangular(1,3,2,9)";
double ret = executestring(myDistr);
return ret;
Hi
How executestring(triangular(1,3,2,9)) uses random seed? I tested it and I have a doubt that it doesn't recognize it at all.
Example:
string myDistr = "triangular(1,3,2,9)";
double ret = executestring(myDistr);
return ret;
I just tested it with two different distributions that use the same stream being executed in different order. I got the results that would be expected: Each distribution generates the same number in each position regardless of which one 'used up' the previous numbers from the stream.
Left side is the triangular distribution from your post, right side is uniform(0, 1, 9).
What I did notice though is that different numbers get generated when I open FlexSim and run the code without first resetting. I guess the random number stream is not correctly initialized at at that point (?)
If you run on Script window the code below once, then change the random seed (5) to 6 you will get the same list on numbers as in the first run. Isn't that wrong? It should generate different stream of numbers, right?
string myDistr = "triangular(1,3,2,6)";
for (int i=1; i<=10; i++){
double ret = executestring(myDistr);
print (myDistr,"/",i,"->",ret);
}
print("----");
It should and it does so on my end.
Again though, only after I reset the model at least once. If I open a fresh FlexSim instance and generate the values without resetting first I get the same results as you.
11 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved