Choosing an entrypoint#
Pick the smallest tool that fits your goal.
You want to… |
Use |
Example |
|---|---|---|
Run one scenario exported from the web editor |
||
Sweep one or more numeric parameters |
||
Sweep where geometry or journeys change per trial |
How do I sweep over scenario shapes that axes / apply can’t express? |
|
Save a sweep and re-open it in another session |
||
Build a scenario in pure Python (no web editor) |
|
|
Drive a single run from a shell or CI pipeline |
|
Rules of thumb#
One scenario, one outcome → ``run_scenario``. Returns metrics and a trajectory you can plot or feed to pedpy.
Same scenario, parameter grid → ``run_sweep``. Define
axes(the values to vary) andapply(the mutator per axis). The cartesian product is run with multi-process workers.Per-trial geometry / journey → ``run_sweep_from_factory``. Provide a callable that returns a freshly-built
Scenariofor each parameter combination. Use this whenaxes + applycannot express the variation.Notebook workflow → Python API. Scripted pipeline → CLI. The CLI prints a one-line JSON summary suitable for shell parsing.
See Concepts for the underlying object model.