jupedsim_scenarios.report#

Self-contained HTML report for a saved sweep.

build_report reads the sweep.json written by jps-scenarios sweep (plus the per-trial SQLite trajectories next to it) and writes one HTML file with matplotlib PNGs embedded as data URIs. It needs the viz extra:

pip install 'jupedsim-scenarios[viz]'

Sections, in order: header, time until all arrived, per-exit flow, arrival curve, density, failures.

Attributes#

Functions#

build_report(→ pathlib.Path)

Write the HTML report for the sweep saved under results_dir.

Module Contents#

build_report(results_dir: str | pathlib.Path, out_path: str | pathlib.Path | None = None, *, playback: bool = False) pathlib.Path[source]#

Write the HTML report for the sweep saved under results_dir.

Returns the path of the written file. Raises ImportError when matplotlib is not installed and FileNotFoundError when results_dir holds no sweep.json.

DENSITY_GAUSSIAN_WIDTH = 0.5[source]#
DENSITY_GRID_SIZE = 0.4[source]#
DENSITY_MAX_FRAMES = 200[source]#
SCENARIO_SNAPSHOT = 'scenario.json'[source]#
SECTION_ARRIVAL = 'Arrival curve'[source]#
SECTION_DENSITY = 'Density'[source]#
SECTION_EXITS = 'Per-exit flow'[source]#
SECTION_FAILURES = 'Failures'[source]#
SECTION_TIME = 'Time until all arrived'[source]#
SWEEP_FILE = 'sweep.json'[source]#