Random state

From SUMOwiki
Revision as of 14:28, 5 July 2007 by Dgorissen (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In the <M3> tag there is the following option:

   <Option key="seedRandomState" value="default"/>

It determines how the random number generators are seeded. The possible values are:

  • default: do nothing, the same seed will be used each time matlab is started
  • random: the initial state is initialized randomly
  • file: load the state from the file <outputDirectory>/randState.dat

If the setting is 'default' you can be 100% certain that the results wil be exactly the same each time you start matlab and run for the first time. So with an example:

  • start matlab
  • run 'go'
  • exit matlab
  • start matlab
  • run 'go'
  • exit matlab

In both cases the results will be exactly the same as long as you don't change the configuration settings in between of course.

So note that the results are NOT the same in this case:

  • start matlab
  • run 'go'
  • run 'go'
  • exit matlab

Here you will get 2 different results!

If you also want the same results in this setting you must load the random state from disk.