jupedsim-scenarios#

Useful links: Python Package | Source Repository | Issues | JuPedSim

What is jupedsim-scenarios#

jupedsim-scenarios is a Python toolkit for running, sweeping, and analyzing JuPedSim scenarios authored in the Web-Based JuPedSim editor.

Where the main jupedsim package exposes the simulation primitives (geometry, agents, models, journeys), jupedsim-scenarios operates one level up: it consumes a scenario as exported from the web editor — a JSON config plus a WKT geometry, packaged as a zip — and gives you three things:

Install#

pip install jupedsim-scenarios

Quick start#

from jupedsim_scenarios import load_scenario, run_scenario

scenario = load_scenario("bottleneck.zip")
result = run_scenario(scenario, seed=42)

print(result.evacuation_time)        # seconds
print(result.agents_evacuated, "/", result.total_agents)
df = result.trajectory_dataframe()   # pandas DataFrame
result.cleanup()

For a guided tour with sweeps, model comparison, and a 2-D model × bottleneck width study, see the bottleneck tutorial.

Status#

Alpha. Single-run, Monte Carlo sweeps (multi-process), and a jps-scenarios CLI are shipped. Restartable / resumable sweeps land in 0.4.0.