Search code examples
simulationanylogic

Why do two flowcharts set up exactly the same end with different results every time the simulation is run even when I use a fixed seed?


Why do two flowcharts set up exactly the same as shown in the image below produce different results for every simulation run?

How would one go about ensuring they are exactly the same?

enter image description here

Thanks!


Solution

  • The problem is that they all sample from the same random data stream thus impacting the number the next item will sample

    In order to solve this, you need to provide them each their own random object, with the same seed, so that they each have the same stream of random numbers.

    See the example below where both the flow charts have exactly the same setup and the same results.

    enter image description here

    I simply created a random object for both the source and delay blocks for each stream and use them in the distributions. That way I am sure they all have unique, but identical random data streams.

    enter image description here

    enter image description here