XML Schema for random number generators


The complexity of developing XML schemas for physics simulations forces us to split the project into smaller pieces and to first identify those areas where common ground between many applications can be found.

One common element of many simulations are random number generators (RNGs). We thus want to specify an XML Schema for the specification of RNGs. Here is our draft specification:
We specify the type of the RNG, e.g. a lagged Fibonacci or a linear congruential generator by the type attribute,
parameters specifying the RNG in more details using the Parameter schema , and the current and/or intitial state by
<STATE> and <INITIALSTATE> elements.

Here is a simple example using a linear congruential generator with multiplier 16807 modulo 231-1, performing the iteration x n+1 = xn * a mod m:

  <RNG type="linear congruential">
    <PARAMETER name="a">16087</PARAMETER>
    <PARAMETER name="m">2147483647</PARAMETER>
    <INITIALSTATE>331</INITIALSTATE>
    <STATE>1043618065</STATE>

  </RNG>

The state of this linear congruential generator just consists of its seed, and the intial state is the original seed. Other generators, such as lagged Fibonacci or Mersenne twisters have much more complex states, with up to thousands of numbers.

Topics to be discussed, and possible extensions include:
We encourage your comments and ideas .


Back to XML in Compuational Physics