Get VL Random Number Seed

Returns current seed for all VL based random numbers.

Parameters

  • Current Seed - Global variable to receive see, Text (recommended) for returned seed value.

Comments

Returns the current seed information from the VL random number stream. It does not return the starting seed viewable in Advanced Random number control unless the simulation has just been reset and no samples have been taken from the VL Stream. This is intended for use by simulation experts who want to swap seeds during a run and even then it is largely obsolete.

Use with Set VL Random Number Seed to swap seeds in and out of the random number generator if you want to emulate “Common Random Numbers” in a context where SIMUL8 does not do this for you already.

This command is almost obsolete now that VL random sampling is always stream-swapped automatically in the context of the object event that called the VL.

The VL random number stream is a single stream (within each Stream Set) that is used to sample random numbers when there is no simulation object context that can be used for a stream. So every Simulation Object has a number of streams, one of that is reserved for sampling from within VL (e.g. if you sample a distribution directly in VL).

If there is no Simulation Object context (for example in Time Check VL) then this central single stream would be used. If you are concerned about the fact that there is only one stream for this “no context” case then you can implement your own multiple streams within this single stream by using Get VL Random Number Seed and Set VL Random Number Seed to remember and swap the current seed value.

Related Commands

See Also