Random functions
Hi Silico community,
A general quick question: for any of the random functions, I have noticed that there is determinism to the randomness. For example, if I use 'random(1)' (i.e., return random numbers between 0 and 1 each tick), I still end up with the same random numbers (if that makes sense), e.g., 0.4, 0.7, 0.3, 0.8, 0.1 ... and so on. Whilst it is great to see random numbers come out of the simulation, when I restart and go back to 0 ticks, the same pattern emerges. I just wondered if there was a random seed generator and if I shared the model with someone else, they'd get different values?
-
Hi there,
The model elements are seeded so that each element, such as a variable, has the same numbers generated each time and regardless of the viewer. Therefore, you should be able to share the model with others, and those viewers should be able to see the same variables values and graphs.
Hope this helps. Best wishes,
Martin0 -
Hi Martin,
Thank you. This does help Martin but is there a way to truly randomise such that each model run produces a random set of numbers each time? If not, is the only way to produce true randomness to delete the equation and retype?
Regards,
Adam
0 -
Hi Adam,
I don't think our current set-up would produce a new random time series if you overwrite or retype the variable's equation because the seeds for the random function are fixed for each element. Instead, you would have to create a new variable that would get a differently seeded random function.
We are thinking about expanding the functionality of the random functions, though. Our developers are already aware of the wish to generate new variable values, and if you have any other feedback, I'll make sure to pass it on.
Best wishes,
Martin0
Please sign in to leave a comment.
Comments
3 comments