Skip to content

Randomness and Seeds

The Master Seed belongs to the DES manager and travels with the model; its default is 42. fixed reuses the seed on reset; auto chooses a new seed for each reset. This seed-mode choice is remembered in your browser. Each experiment replication uses its own seed.

You set both in the Simulation clock window, which opens from the clock in the DES toolbar.

The Simulation clock window of the PalletYard example: Simulation end 01:00:00:00, an empty Statistics reset (warmup), Random seed 42 with the Fixed and Auto buttons, and Auto-save checkpoints with keep newest 10

Use a fixed seed to repeat a run, or save a snapshot to continue a run from the same point; use auto seed to collect different replications. See Experiments and runs for seed modes and replication seeds.

Stochastic production intervals in TaktSource and stochastic failure and repair delays in Downtime use seeded random numbers. Downtime uses fixed MTBF and MTTR delays by default; enabling Stochastic draws exponential delays around those means.

RNG v2 is the default for new experiments. New columns pin v2 at creation; otherwise the first recorded run or snapshot pins the version; the Matrix window shows RNG v2 on the experiment and each run. With the same seed, RNG version, model and settings, you get the same result. Repeating a batch with the same base seed is bit-for-bit reproducible under those conditions.

In v2, stochastic components such as Downtime and TaktSource have separate random streams derived from the seed, their model address and purpose. Script self.random() is also seeded separately for each run. Adding, removing or reordering components leaves other components’ streams unchanged as long as their addresses stay the same.

For variant comparisons, enable Use matching random seeds in the Matrix window to use common random numbers: changing a parameter on component B does not change component A’s random sequence. This requires the same component address and type. A type change, or an export rename that changes the address, gives the component a new stream. Exact alignment lasts only while each purpose consumes the same number of random draws.

Older archives without a version label and with existing replications are treated as v1 and remain v1. The matrix never averages different versions (mixed RNG versions) and shows no delta when a variant and baseline differ (other RNG version than baseline). A run with an incompatible version is rejected with rng-version-conflict before it is written. To compare v1 and v2, create a separate experiment. Live Play uses the active column version; runs without an experiment scope default to v1.

New columns start with v2. Run again with v2 starts a new generation and keeps the earlier results under Historical results. A conflicting run or snapshot is refused with rng-version-conflict; use a separate experiment or the v2 action instead of mixing versions.

RNG v1 derives component seeds from registration order, so structural changes can change streams. RNG v2 gives Downtime, TaktSource and script self.random() separate streams. For scripts, v2 derives the seed from the master seed, component ID and script; v1 defaults to a path-derived seed.

See Experiments and runs and Scripting in DES.