Closed MSchroembges closed 1 year ago
The documentation on this might be a bit misleading,stop_ids
doesn't really work as a "batch" parameter if you use keep="shortest"
. When you provide multiple stop_ids, raptor() does calculate journeys starting from all stop_ids. However, the intended use case is providing multiple stop_ids that belong to the same stop name or that are close to a location (like the example in the raptor doc).
Now, if you use raptor() with keep="shortest"
, only one journey is kept for every to_stop_id
, not every journey starting from stop_ids
. So some to_stop_ids
are reached faster from another stop_id in your batch than from "de:01001:27380". So I'd suggest you use keep="all"
and then filter the result with something like that:
ttm |>
arrange(travel_time) |>
group_by(from_stop_id, to_stop_id) |>
slice_head(n = 1)
I am using raptor to calculate a traveltime matrix for a large gtfs dataset. When trying it out I noticed a difference in the output between calulating a single start id
and calulating a batch of 100 stops and then filtering the id of the stop
ttm1 contains 3439 rows vs ttm2 only 2972 rows.
I am not sure, whether I am missing out something when passing the batch of stop ids. Is there a limit for calculation?