Skip to content

Commit

Permalink
add info on detailed itineraries in the time_window vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
rafapereirabr committed Nov 25, 2023
1 parent 625d638 commit ba1f15d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion r-package/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
- Updated documentation of parameter `max_bike_time` to make it clear that in bicycle-only trips, whenever `max_bike_time` differs from `max_trip_duration`, the lowest value is considered. Closes [#353](https://github.com/ipeaGIT/r5r/issues/353)

**Bug Fixes**
- Fixed bug that prevented the using the `output_dir`parameter in the `detailed_itineraries(all_to_all = TRUE)` function. Closes [#327](https://github.com/ipeaGIT/r5r/issues/327) with a contribution ([PR #354](https://github.com/ipeaGIT/r5r/pull/354)) from Luyu Liu.
- Fixed bug that prevented the using the `output_dir` parameter in the `detailed_itineraries(all_to_all = TRUE)` function. Closes [#327](https://github.com/ipeaGIT/r5r/issues/327) with a contribution ([PR #354](https://github.com/ipeaGIT/r5r/pull/354)) from Luyu Liu.
- Fixed bug that prevented `detailed_itineraries` from working with frequency-based GTFS feeds. It should ONLY work with frequency-based GTFS feeds.

**New contributors to r5r**
- [Luyu Liu](https://github.com/luyuliu)
Expand Down
9 changes: 7 additions & 2 deletions r-package/vignettes/time_window.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ departure_datetime = as.POSIXct("13-05-2019 14:00:00",
format = "%d-%m-%Y %H:%M:%S")
```

ps. Please keep in mind that the `time_window` only affects the results when the GTFS feeds contain a `frequencies.txt` table.
ps. Please keep in mind that the Monte Carlo draws in `time_window` only affects the results when the GTFS feeds contain a `frequencies.txt` table.



Expand Down Expand Up @@ -186,10 +186,15 @@ head(ettm, n = 10)

In the `detailed_itineraries()` function, the number of Monte Carlo draws per minute is hardcoded to 1. This means that the function simulates only one departure per minute within the `time_window`. So if you set a `time_window` of 10 minutes, it would simulate 10 departures, one in each minute. This is largely because the `time_window` behaves slightly differently here.

See, functions like `travel_time_matrix()` or `accessibility()`, for example, return estimates of travel times or accessibility. In these cases, when we use the `time_window` parameter, these functions output selected percentiles of those estimates generated based on the distribution of all estimates that result from the multiple trip simulations.
See, functions like `travel_time_matrix()` or `accessibility()`, for example, return estimates of travel times or accessibility. In these cases, when we use the `time_window` parameter, these functions output selected percentiles of those values generated based on the distribution of all estimates that result from the multiple trip simulations.

The `detailed_itineraries()`, on the other hand, does not return travel times or accessibility estimates. It returns alternatives of trip journeys. In this case, when we use the `time_window` parameter, the function will return the optimal trip itinerary found within the time window. It can also return the optimal route along with multiple sub-optimal journey alternatives found within the time window if the the user sets `shortest_path = FALSE`.

*obs.* Mind you that `detailed_itineraries()` cannot be computed for public transport trips if the the network uses a frequencies-based GTFS feed. In these cases, we suggest using `gtfstools::frequencies_to_stop_times()` to create a suitable feed.





### Cleaning up after usage

Expand Down

0 comments on commit ba1f15d

Please sign in to comment.