Outputs#
A run returns a openmobisim.Run in Python and writes its results into its output_dir
(./openmobisim-runs/<run_id> under the current directory unless given) as files that pandas, polars or R read
directly. A folder that already holds a run is never replaced silently: run(..., overwrite=True) says so. This page explains what is recorded and how. Every column is listed in
Output files.
What becomes of each trip#
Every trip of the run ends in exactly one of these outcomes:
Outcome |
Meaning |
|---|---|
completed |
Arrived within the simulation window |
truncated |
Still travelling when the window ended |
no vehicle available |
Its stated mode needs a vehicle its traveller does not have at the origin |
no feasible path |
A car was available, but no road route reached the destination |
mode not available |
The run lacks what the mode needs (a layer, a timetable, parkings) |
no alternative |
It chose its mode, or was given transit, park-and-ride or bike-and-ride, and none reached the destination within the limits. A trip that chose is counted under the mode |
Trips departing outside the window are not in the run at all; see The simulation window.
The completion rate is the completed trips over the trips that entered the network (completed plus truncated). The
trips that never left are not in it. openmobisim.Run.completion and
openmobisim.Run.completion_by_mode give the counts.
Every trip, one by one. openmobisim.Run.trip_results() gives one row per trip, also written as
trip_results.parquet: its traveller, class and weight, where it starts and ends, when it departs, the mode it took,
its outcome, and, if it completed, when it arrived and how long it took. For a trip still travelling when the window
ended whose car was on the roads, link_at_end is the road link it was on, or waited at its origin to enter: where
the unfinished cars are. To see the unfinished trips:
t = run.trip_results().to_pandas()
t[t.outcome == "truncated"]
Counted by outcome, the trips agree with completion, with one difference: a trip with no alternative (those
openmobisim.Run.report_no_alternative() lists, but for any that then went by car) is no_alternative here,
and counted in completion under the outcome it had, most often no_feasible_path. The
outcomes are those of the last loading. Building and writing the table adds one pass over the trips at the end of the
run. On the starter cases it adds 0.02–0.04 s to a city’s run (under 0.4 %) and 0.07–0.10 s to Sioux Falls’s runs of
two to four seconds (2–3 %); the file is 1–2 MB for a city.
Two things to know when reading travel times. A car trip’s travel_time_s is its time on the roads, from its
departure to its arrival at the destination’s node: the two minutes to reach the car and the three to park it that
mode choice weighs (car_access_s, car_egress_s; see Modes and itineraries) are not in it, while a
transit trip’s time holds its walks and waits, so a mean trip by mode sets a drive beside a door-to-door journey. And a
trip that states car whose origin and destination snap to the same road node completes at its departure, with a
travel time of 0 (in Delft, 3 of 65 956 trips, each a few hundred metres long); a trip choosing its mode is not
offered the car in that case.
Weights: trips and people#
A simulated traveller may stand for several people (its weight; see demand_sample). Results that count people are
weighted. Among them: people, completed_people, the total travel time (total_travel_time_s sums weight × travel
time), boardings, and parking arrivals. trips and completed_trips count simulated trips. manifest.json’s
kpi_weighting records which form the travel time takes.
The files#
File |
One row per |
What it holds |
|---|---|---|
|
iteration, mode and metric |
The run’s metrics in long format ( |
|
time bin and road link with traffic |
|
|
time bin and bike or walk link |
The same, on the bike and walk layers; |
|
trip |
Every trip and what became of it: traveller, class, weight, origin, destination, departure, mode, outcome, arrival and travel time if it completed, and for a car still travelling at the window’s end the road link it was on; see above |
|
call (a run at a stop) |
Scheduled and realised times, boardings, alightings and passengers on board as the vehicle leaves. A bus that rode the roads keeps the loading’s times; empty where it had not reached the call by the window’s end |
|
parking and time bin |
Arrivals, departures, mean and peak occupancy, seconds full, and the most vehicles over capacity (a full parking refuses nobody). Bins are counted from midnight, like |
|
trip event |
A sample of the trips’ events, one in a hundred: second, type, what it concerns |
|
diagnostic |
Counters of what the run met (category, code, severity, element, count) |
|
— |
What was run: fingerprint, versions, platform, seed, every method with its options, the window, the totals; see Reproducibility |
|
stage |
Wall-clock seconds by stage and iteration; see Running faster |
The parquet files carry the run’s fingerprint and master seed in their metadata, so a file read on its own can be traced to its run.
Reading results in Python#
Question |
|
|---|---|
How did trips end? Which did not finish, and where were they? |
|
Which mode did each trip take? |
|
What happened on each link? |
|
How did transit and parkings do? |
|
Did the run settle? |
|
Where did queues outgrow the road, or traffic lock? |
|
How long between places, by mode? How good is the choice set? |
|
Which routes did cars take, and change on the way? |
|
For bikes#
Bike trips count in every metric under the mode bike, and bike-and-ride under bike_transit. Their flows are in
link_bins_bike.parquet, per bike link. Bike parkings’ occupancy is in
parking_bins.parquet.
Limits#
kpis.parquet’sdesign_idandreplicationare the labels the run was given,"default"and 0 unless set.events.parquethas no payload column. Boardings, parking and reroutes have files or methods of their own.diagnostics.parquethas no free-text detail.