question

Rania A avatar image
0 Likes"
Rania A asked Jason Lightfoot commented

Randomness Seed, delay task

  1. Object current = param(1);
  2. treenode activity = param(2);
  3. Token token = param(3);
  4. treenode processFlow = ownerobject(activity);
  5. /***popup:StatisticalDistribution*/
  6.  
  7.  
  8. double ASRS_speed = 1.0; // Set your ASRS speed (you can adjust this value accordingly)
  9.  
  10. /***popup:StatisticalDistribution*/
  11.  
  12. // Define initial mean and standard deviation
  13. double initialMean = 9;
  14. double initialStdDev = 1.19;
  15.  
  16. // Adjust mean and standard deviation based on ASRS speed
  17. double adjustedMean = initialMean / ASRS_speed;
  18. double adjustedStdDev = initialStdDev / ASRS_speed;
  19.  
  20. // Generate random delays using normal distribution
  21. double random = normal(adjustedMean, adjustedStdDev, getstream(activity));
  22.  
  23. return random;

Hello everyone , in my delay task I have this custom code. I use this delay to introduce randomness and uncertainty in my system. I run my scenario for 100 times, however in mnay repetitions i get the same results. In order to avoid that, I think I have to seed a randomness seed ,so in every run different numbers are used. Is there a way to do that ?

Thank you in advance.

FlexSim 20.0.10
delayrandomnessseed
· 1
5 |100000

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

Krzysztof J avatar image
-1 Like"
Krzysztof J answered Jason Lightfoot commented

Hi,

it depends on what you mean by "run scenario for 100 times". If you are using experimenter module it is ok (see attached model). If you do it manually you need to uncheck option "repeat Random Streams" (Statistics Tab).

Grecja_konsultacja.fsm


· 4
5 |100000

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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

Change the experimenter setting to repeat stream of replication number on the advanced tab:

1697458665015.png


1697458665015.png (6.4 KiB)
5 |100000

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