Many thanks for your replies Simon and Jameson. >From my perspective it would be great if Julia could replicate the python functions random.getstate(), random.setstate(state) amd random.jumpahead(n) on https://docs.python.org/2/library/random.html .
My trouble with your suggestion Jameson is my strategies will be drawing from different distributions ( e.g poisson for one, normal for another). I realise I could use inverse CDF method on unif draws (but thought this would take longer to run than simply drawing from the correct distributions (maybe I'm wrong). Thanks again. Steve On Monday, February 23, 2015 at 5:02:01 PM UTC, Steve Kay wrote: > > I'm trying to build a simulation model with sequential stages. I only want > to set the seed for the random number generator once at the very start of > the simulation comparing different possible strategies. Stage 1 is common > to all strategies and involves running lots of sims to reach stage 2 . At > this stage my strategies follow different routes. Ideally I'd like to store > the state of the random number generator just before starting stage 2 (and > be able to recall it at a later time). That way I can run my first strategy > through, then reset to the same state at the start of stage 2 and run the > next strategy through, etc. All strategies then facing the same random > conditions (without having to rerun stage 1 or set another seed at stage > 2).. Are there such commands that store and reset the number generator to a > particular state? Any help much appreciated. > > Best, > > Steve >
