Experiments and Runs
The experiment manager is fully usable in the public demo; for your own installation it is part of realvirtual Commercial. Single runs and their statistics stay free in the open-source core. See Licence.
Compare several simulation runs to answer questions that a single run cannot resolve reliably. For example, compare runs to decide whether a buffer between two stations needs ten places or twenty.
The table compares the Base configuration with named variants. Each column holds the repeated runs of one configuration. Results count in the comparison only while the settings they were recorded with still match the column; older results stay visible as history. A changed model structure starts a new experiment, so results from two different models are never mixed. Experiments recorded against a different model version stay visible with an other model version chip. This indicates that you should not compare them.
Opening it
Section titled “Opening it”Two entry points, both toggling the same window: the Experiments button in the DES toolbar, and the DES side-tool button.

- + New variant adds a column.
- Stop at and Measure after set the run length and the warm-up for all columns.
- The column header: tick it to include the column in Run all; ⋮ opens the column menu.
- A value the variant changes has a blue frame; an empty field shows the Base value.
- A KPI cell: mean ± 95 % confidence interval with the number of runs, and below it the difference to Base.
- Run 5× runs one column, Run all every ticked column.
Columns are variants
Section titled “Columns are variants”The window is the overview of your variants and the place where you compare them. It is one table:
- Columns are configurations. The first column is always the Base configuration — the model as saved — and is marked Reference. Every further column is a variant: a named set of changed values on top of the base.
- Property rows (section Properties) list the values that differ. A cell holds the variant’s own value; an empty cell shows the inherited base value in grey (
= 1200). - KPI rows (section Results (KPI)) show what each configuration achieved: mean ± 95 % confidence interval over its repeated runs, and below it the difference to the Base configuration.
The number of runs, the random generator version, matching random seeds and the results belong to the column. A variant you create here is the same variant you switch with the Variant selector in the simulation toolbar and edit in the Inspector — there is only one list of variants.
Creating a variant
Section titled “Creating a variant”Click + New variant at the top left of the window header, type a name and confirm. The new column starts empty, so it behaves exactly like the base until you change a value. Creating a variant does not change the scene and does not reset the simulation.
The column menu (⋮ next to the name) offers Show in scene (resets the simulation), Rename, Edit description…, Duplicate, Delete and Use matching random seeds for this column. The checkbox of the column decides whether it is part of Run all. Deleting a variant also deletes its results; the confirmation tells you how many. The Base configuration cannot be deleted.

Choosing properties
Section titled “Choosing properties”Click + Add property and pick a field from the searchable list — for example a source’s interval or a forklift’s target speed. Each node is its own row. Only fields that a variant can change are offered; others are shown greyed out with the reason. A new row shows the base value in every column until a variant changes it.
Changing values
Section titled “Changing values”Type into a variant’s cell. If that variant is not in the scene, the value is only stored — nothing in the scene changes. If it is the variant in the scene, the value is applied the same way as an Inspector edit; while the simulation is running you confirm first, because applying resets the simulation to t = 0. ⟲ removes the variant’s value so the cell inherits the base again.
Base values are edited in the Inspector while the Base configuration is in the scene; the Base column itself is read-only.
Running the comparison
Section titled “Running the comparison”Set Stop at and Measure after (warm-up) in the window header; they apply to all columns, because a difference is only meaningful for runs of the same length. Runs (the number of repeated runs) is set per column; lowering it keeps the runs that are already finished. Then use the footer of a column: Run N× (N = the Runs count, Rerun when results are stale) for one column, or Run all for every ticked column.
The run executes each included column in turn: it switches the scene to that column’s configuration, runs its repeated runs in Fast-Forward, and switches back to what you had in the scene before. While it runs, the model is locked — edits, variant switching and simulation controls are refused with Locked — experiment running; only Cancel is available. Cancelling keeps the runs that are already complete.
Models with logic steps, PLC programs or IK paths
Section titled “Models with logic steps, PLC programs or IK paths”Logic steps and ST programs run on simulation events, so models with them can run experiments, for example the standard demo model. Only logic that cannot run on events is refused:
- a logic sequence with an auto-loop or a jump back without any waiting step, a JavaScriptStep, or a WaitForSensor with Wait for stopped
- an ST program that is not DES-ready (
des-plc-not-event-suitable) - IK paths and replay
Run N× and Run all are then disabled with this explanation, and the Problems panel names the affected systems, nodes and, for ST, the line. Fix the marked logic, or run the model live instead. See Logic and PLC in DES and Writing ST for DES.
Seeds and repeatability
Section titled “Seeds and repeatability”Each repeated run uses its own seed. With Use matching random seeds (on by default) every column uses the same sequence of seeds: run 1 of every column gets the same seed, run 2 the next one, and so on. The checkbox in the window footer switches it for all columns, the column menu for one column. Matching seeds let the comparison pair runs that used the same seed, which usually removes much of the random noise from the difference; the confidence interval shows what uncertainty remains. Re-running the same seed with the same configuration replaces the earlier result instead of adding a duplicate.
New columns use random generator version 2. Older experiments can still use version 1; their column says so and offers Run again with v2, which keeps the old results under Historical results instead of mixing them in.
Outside the experiment window, a seed lives on the document’s DES manager and travels with the model. Fixed seed repeats the same seed on every reset; Auto seed generates a new seed per reset. This choice is a personal browser preference. Without any seed, the default is 42.
An incompatible run or snapshot is refused with rng-version-conflict. See Randomness and seeds for generator versions and the limits of matching seeds.
Reading the results
Section titled “Reading the results”Each KPI cell shows mean ± 95 % confidence interval and how many runs it is based on, for example 51.3 ± 3.3 (5/5). With fewer than two runs there is no interval (CI n/a).
Under each variant’s value is its difference to the Base configuration, for example Δ -6.3 ± 4.3 · paired · n=5. With matching random seeds the difference is computed run by run on the same seeds (paired); without runs on matching seeds the two columns are compared as independent samples (unpaired (Welch)). The window says when no difference can be computed, for example Difference unavailable: random generator versions differ. Run both again with the same version. The colour of the difference follows Better is of the KPI; see Better is.
Results only count while they still describe the column. If you change a value of a variant, change the base model, or change the run length or warm-up, the earlier results of the affected columns become stale: the column header names the reason (for example stale: warmup changed), the KPI cells show the old mean in italics as historical, and the footer button turns into Rerun. Stale results are no longer averaged or compared. Renaming a variant, editing its description or switching matching seeds does not make results stale.

Choose which KPIs to show with KPIs. Expand a KPI row with ▸ to see it as a chart:
- Bars — one bar per column with its confidence interval.
- Over time — the KPI as a curve over simulation time, one line per column (the mean of its runs), optionally with a band (confidence interval or min/max) or a single run.
Blocked runs
Section titled “Blocked runs”A run that hangs until its end time — vehicles waiting for each other in a circle, a station that stopped moving — still produces KPI values, and they would silently pull a mean down. With Check runs for blockages in the window footer (on by default), every run that reaches its end time is checked once, at its end, for units that wait in a circle (deadlock) or make no progress (stall). The check only reads; the results are the same with and without it. Cancelled runs are not checked.
A run with a finding is marked, not removed: its KPI values stay in the means.
- The column header says how many of its current runs are affected, for example 2 of 5 runs blocked. The tooltip lists the runs and their classes.
- Open the runs (the run count in the header) to see the marked run: Blocked: deadlock or Possible blockage: stall. The tooltip shows the wait chain, the node and how long the units had been waiting.
Only a deadlock that still stands at the end of the run and is at least twice as old as the largest waiting budget of the units involved is shown as a warning (orange, Blocked). Everything else — a younger circle, which may still resolve, and every stall — is shown as information (grey, Possible blockage) with the note Preliminary diagnosis – refinement follows: stalls at the end of a healthy run, for example vehicles parked at the end of their last job, are not yet told apart from real ones. The waiting budgets are Max Wait and Max Idle of the model’s BlockageBudget; see Blockage checker.
If the check could not see every unit at the run end, the run shows Check incomplete with the unobserved units in the tooltip. This happens when the simulation was reset right before the experiment started; conveyors of the continuous transport are then not observed. Run the experiment again to get a complete check.
Rerunning a run replaces its finding; a rerun without one removes the mark. The switch applies to all columns; it is stored with the experiments and travels with the project and its export. MCP: experiment.settings.set {blockageCheck}; experiment.results returns blockedRuns per column and per KPI, experiment.run.status the findings of the last run, each with its severity (warn or info).
Your own KPI
Section titled “Your own KPI”Throughput and utilization are there from the start. Everything else you want to compare, you add with + Add KPI next to KPIs. A KPI measures the period after the warm-up: at the warm-up boundary the statistics reset and counters take their starting value, while parts and model state stay in place (see Warm-up and end time).
A property of a component
Section titled “A property of a component”Most KPIs are a value a component already has. + Add KPI opens one search field (Property, script value or metric) that lists the same properties as + Add property, plus the counters every simulated component keeps, such as a sink’s TotalProcessed (the parts it has taken). When several components share a name pattern, the list also offers them together, for example All Sink_V* › Sink.TotalProcessed (2, summed).

Then say what kind of value it is:
- Counter — it only counts up (parts out, failures). The KPI is the count at the end of the run minus the count at the end of the warm-up. Tick per hour to divide by the measured hours, for example Pallets out per hour.
- State — it goes up and down (a buffer fill level, a queue length). The KPI is its average over time, or its maximum, or its value at the end of the run.
The window proposes the kind from the name (Count, Total, Processed, Output … are counters); you can switch it.
A value from your script
Section titled “A value from your script”For something only your logic knows, publish it from the script:
self.statValue('Late orders', late, 'pcs');Run the model once so the value is recorded. Then search for it in + Add KPI: the field lists Late orders · <script name>. Pick it, choose counter or state, keep or change the name and set Better is: lower.
In an experiment, scripts run on the simulation clock and start fresh in every run, so their values compare fairly between columns and repeated runs. Publish a starting value in setup() so the KPI appears before the first event. To react to finished parts, subscribe to a sink in setup(), for example:
function setup(self) { const st = self.persist({ last: null, late: 0 }); self.statValue('Late shipments', 0); const sink = self.sink('Sink_V1'); if (sink) sink.on(() => { if (st.last !== null && self.now - st.last > 120) st.late++; st.last = self.now; self.statValue('Late shipments', st.late); }); return {};}The if (sink) check skips the subscription when Sink_V1 cannot be found, for example in a model without that sink.
Keep values that must survive a checkpoint in self.persist(...); a script that keeps its state elsewhere still runs, but checkpoints are refused for it.
Predefined component metrics
Section titled “Predefined component metrics”The same search field offers the component statistics for one component or a name pattern such as Stapler_*, combined as mean, sum, min or max. The metrics are utilization, outputPerHour, totalProcessed, failure, blocked, empty, working, transport, stopped, slowed and setup. AGV breakdown share in the PalletYard demo is the breakdown share of all Stapler_* vehicles, averaged.
Better is
Section titled “Better is”Better is: higher / lower / neither decides the colour of the difference to Base: green when the variant is better, red when it is worse, neutral for neither.
After adding
Section titled “After adding”A property or script KPI needs runs that recorded it: columns that were run before you added it show needs a rerun — run them again. Predefined metrics apply to existing runs right away. Hover a KPI name and click × to remove it. The KPIs are saved with the experiment, so they travel with the project.
With an AI assistant the same works through MCP, for example experiment.kpi.add {label:"Pallets out", component:"Sink", field:"TotalProcessed", match:"Sink_*", kind:"counter", perHour:true, better:"higher"}; experiment.kpi.list shows the definitions and experiment.kpi.remove deletes one.
Time series
Section titled “Time series”Every run records the curves behind the charts — the throughput and utilization KPIs, the numeric rows of the statistics window and the state shares of each station — over simulation time, also in Fast-Forward. Recording never changes the run itself. A run without a finite end time records no curves.
The curves are stored with the results. Very large models keep fewer station curves per run so that one run stays below 1 MB; the window then notes that curves were truncated.
Older experiments
Section titled “Older experiments”Experiments created before variants existed are converted when you open the window: each old column with changed values becomes a variant with those values. Old results are kept and shown as Historical results (configuration not recorded), because their exact configuration cannot be proven; they are not averaged with new runs. Values that cannot become a variant — planning parameters and parameter scripts — are listed in the Problems panel. A column that cannot be converted stays visible as Legacy: … (not migrated).
If variants were only kept for the session (for example in a read-only demo) and are gone after a reload, the window restores them from the experiment and says Restored from the experiment — not saved in the model. Save the model to keep them.
Checkpoints
Section titled “Checkpoints”Checkpoint autosave stores a full simulation state at regular simulated-time boundaries. For example, hourly checkpoints occur exactly at 04:00:00, 05:00:00 and so on, rather than at frame times. Autosave is off by default; set an interval to switch it on.
Simulated-time boundaries occur at the same points in Animated, Fast-Forward and Step mode. A seeded run produces bit-identical results whether autosave is on or off. Changing the interval during a run immediately reschedules the next boundary.
A run keeps its newest checkpoints in a ring buffer of configurable size; older ones are removed. Loading a checkpoint restores the state and random number streams, then switches the simulation to Step mode. You can continue event by event.
Fast-Forward can produce checkpoints faster than they can be written. If storage cannot keep up, an individual save at a boundary is skipped. The schedule continues unchanged, and skipped saves are not retried later.
Checkpoints can also be controlled by command, for scripts and AI assistants: des.checkpoints.set takes intervalSec (simulated seconds, 0 switches autosave off) and keep (newest checkpoints to retain, at least 1); des.checkpoint.list lists the checkpoints of the live run and of earlier runs; des.checkpoint.load takes a time t (and optionally a run) and restores that checkpoint into Step mode, like loading it from the matrix. All three belong to the experiment manager (realvirtual Commercial) and answer with a commercial-feature error without it.
A snapshot continues only the identical model; see Saving and restoring a run for what is saved and when it is refused.
Snapshots belong to their column. Resume first shows the variant of that column, then restores the checkpoint. If the variant has changed since the snapshot, resume is refused.
See also
Section titled “See also”- Discrete event simulation — the DES workspace and what it measures
- DES with AI — an AI assistant sets up variants, runs the experiment and analyses the results
- Layout Planner — where the layout and its transport routes are authored
- Documents — projects and documents in realvirtual