Scenario JSON

A scenario is a config.json plus a geometry.wkt walkable area, in a directory or a ZIP. This page lists the JSON keys that change a result, with their defaults. The meaning of the model parameters is on the Models pages; this page links there rather than repeating the equations.

The keys are read by load_scenario and the JuPedSim set-up in simulation_init.py. A key that is not listed here is either layout data for the web app (ui_state) or not read by the run.

Top-level structure

{
  "config": { "simulation_settings": { "simulationParams": {…}, "baseSeed": … } },
  "exits":         { "<id>": {…} },
  "distributions": { "<id>": { "coordinates": […], "parameters": {…} } },
  "checkpoints":   { "<id>": {…} },
  "waypoints":     { "<id>": {…} },
  "zones":         { "<id>": {…} },
  "journeys":      […],
  "routing":       {…}
}

Simulation settings

Under config.simulation_settings.

KeyDefaultEffect
simulationParams.max_simulation_time300 sThe run stops here. An incapacitated agent keeps a run going until this time (#141). With --fds-dir it must not exceed the last FDS slice time by more than one output interval, unless --allow-fds-horizon-hold is given (#340).
simulationParams.model_type"CollisionFreeSpeedModel"The JuPedSim movement model.
baseSeed42Random seed; run.py --seed overrides it.

simulationParams.dt is not read: the JuPedSim step is 0.01 s, and the trajectory is written every tenth step (10 frames/s).

Spawn areas: distributions.<id>.parameters

KeyDefaultRangeEffect
numberthe first distribution’s number, else 100≥ 0Agents placed at the start.
distribution_mode"by_number"by_number, by_percentageby_percentage fills the polygon to percentage (1–100, default 50).
v01.25 m/s—Clear-air walking speed, for every movement model (FDS+Evac VEL_MEAN; 1.2 before). Every smoke, irritant and zone factor multiplies this value.
v0_distribution"constant"constant, gaussiangaussian draws per agent with v0_std; draws are clipped to [0.1, 5.0] m/s.
v0_stdnone—Spread of the Gaussian draw.
radius0.2 m—Body radius: packing, spawn spacing, and the radius + 0.5 m arrival distance at a stage.
radius_distribution"constant"constant, gaussiangaussian draws per agent with radius_std, clipped to [0.1, 1.0] m.
radius_stdnone—Spread of the Gaussian draw.
use_premovementconstant 10 s when no pre-movement key is set, with a warningtrue, falseDelay before the agent starts moving. Setting any pre-movement key, including use_premovement: false, turns the default off.
premovement_distribution"gamma"gamma, lognormal, weibull, uniform, constantDistribution of the delay.
premovement_param_a, premovement_param_bthe preset of the distribution—Override the preset; the presets and their sources are in Coming from FDS+Evac.
premovement_seednone—Separate seed for the pre-movement draw.
use_flow_spawningfalse—Add agents over time instead of at the start (no pre-movement then).
flow_start_time, flow_end_time0 s, 10 s—Window of flow spawning.
familiarity"full"full, discovery, or a probability in [0, 1]What the agents know of the exits at the start; see Models › Wayfinding.
entrancenonean exit idOne exit, reachable from the spawn area, that the agents know from the start.

The run reads only the v0* keys. desired_speed, desired_speed_distribution and desired_speed_std are accepted by Scenario.set_agent_params() in Python, but in a scenario JSON they are ignored without a warning (#143).

While an agent waits out its pre-movement time, the smoke update skips it, so it starts at its full clear-air speed. An agent that reaches its FED threshold while still waiting walks off when its pre-movement ends (#145).

Exits: exits.<id>

KeyDefaultEffect
coordinatesrequiredExit polygon.
enable_throughput_throttling, max_throughputfalse, 0Cap the removal rate at the exit: an agent within its radius + 0.5 m of the exit’s target point is removed only if at least 1/max_throughput s have passed since the last removal there; otherwise it waits. A throttled exit is steered directly. This caps the rate; it does not model door flow. A max_throughput of 0 disables the cap.
capacity_agents_per_srouting.default_exit_capacity (1.3 agents/s)Exit capacity used to estimate queue time when routes are priced.
signan omni-directional sign at the exit’s centre, c = 3The sign agents read; keys below.

Signs: sign

Exits, checkpoints and waypoints can carry a sign. A node without one gets an omni-directional sign at its position with c = 3, so every exit is subject to smoke-dependent legibility.

KeyDefaultEffect
x, yrequired in an authored signSign position [m].
alphanone (omni-directional)Bearing the sign faces [°], clockwise from north (+y); the sign is readable only from the side it faces.
c3The constant C of the legibility law V = C/K.
max_distance--max-sign-distance (30 m)Farthest reading distance for this sign, even in clear air.

The legibility rule is on Models › Wayfinding.

Checkpoints and zones

KeyObjectDefaultEffect
coordinatesbothrequiredPolygon.
speed_factorboth1.0Multiplies the speed of agents inside; clipped to [0, 3]. A negative or non-numeric value becomes 1.0.
waiting_timecheckpoint0 sTime agents wait at the checkpoint.
waiting_time_distribution, waiting_time_stdcheckpointconstant, 1.0 s"gaussian" draws the wait per agent.
enable_throughput_throttling, max_throughputcheckpointfalse, 1.0Cap the flow through the checkpoint.

Route choice: routing

The routing block sets the route-cost model. Its keys, defaults and the constants that no key can set are listed in one place, Models › Routing › Parameters. An unknown cost_model value currently falls back to the additive model without a warning (#305).

The routing keys alpha, beta, min_speed_factor and base_speed_m_per_s only estimate travel time when a route is priced. They do not change how fast agents walk.

Not in the JSON

Some parameters exist only in Python, as fields of a config object:

  • the smoke-speed law and its parameters (SmokeSpeedConfig: speed_law, alpha, beta, min_speed_factor, visibility_factor_c); a configured run always uses the Lund law with the defaults on Models › Smoke speed;
  • the routing constants impassable_extinction_threshold and fed_return_margin (RouteCostConfig), and exit_switch_anchor (RerouteConfig).

Tracking issue for this reference: #119.

Last updated on