2

I am running a Monte Carlo Experiment with several iterations using the 'random seed' option for unique simulation runs. It seems to be, that in some of those runs strange things happen, which is indicated by the output data.

I would like to collect the seed value for each of the Monte Carlo runs in order to reproduce the weird runs after the experiment by hand, using the 'fixed seed' option. Since I did not find a 'getSeedValue'-function - How can I do this?

I Already tried the proposed solution in: Parameter Variation: Fixed, but different seeds for runs but got a nullpointer exception.

seed value options

Error of copied solution from link

1 Answers1

2

I would say, without being 100% sure that you cant get the random seed, you need to instead use the seed you can control, using your own randomness... generally you can something like this in the custom random generator

new Random(getCurrentIteration()*100000+getCurrentReplication())

random

Then if you get an error, you can know in which iteration and which replication this error occurred, and you can use the same seed in your simulation experiment.

so if it occurred in iteration 143 and replication 5 then you will put the following in the random generator in your main simulation experiment>

new Random(143*100000+5)
Felipe
  • 8,311
  • 2
  • 15
  • 31