jupedsim_scenarios.local#
Seed sweep of one scenario into an output directory.
run_local() is the library form of jps-scenarios sweep: it
loads the scenario, optionally scales it, runs every seed, and writes
scenario.json plus sweep.json next to the trial sqlites. It
prints nothing; callers render progress themselves. The exported
run.py of the web app and the CLI both go through it so the output
layout is defined once, and report.build_report() reads it back.
Functions#
|
Run |
Module Contents#
- run_local(scenario: jupedsim_scenarios.runner.Scenario | str | os.PathLike, *, out_dir: str | os.PathLike, seeds: collections.abc.Sequence[int] | int = 10, workers: int = 1, dt: float | None = None, every_nth_frame: int = 10, scale: float = 1.0, scale_mode: str = 'count', progress: collections.abc.Callable[[int, int, dict], None] | None = None) jupedsim_scenarios.sweep.SweepResult[source]#
Run
scenariooverseedsand save the sweep underout_dir.- Parameters:
scenario – A loaded
Scenarioor anythingload_scenario()accepts (JSON file, ZIP archive, directory). A loaded scenario is scaled in place whenscale != 1.0.out_dir – Output directory:
trial_<index>.sqliteper seed,scenario.json(the scenario as run) andsweep.json.seeds – Explicit seeds, or an int
Nmeaningrange(N).workers – Passed through to
run_sweep().dt – Passed through to
run_sweep().every_nth_frame – Passed through to
run_sweep().progress – Passed through to
run_sweep().scale – Passed to
Scenario.scale_agents()whenscale != 1.0;CapacityErrorpropagates.scale_mode – Passed to
Scenario.scale_agents()whenscale != 1.0;CapacityErrorpropagates.
- Returns:
With
metafilled in (scenario_source,scenario_json,scale,scale_mode,seeds,dt,every_nth_frame,wall_clock_s,library_version), already saved toout_dir / "sweep.json".- Return type: