r5r icon indicating copy to clipboard operation
r5r copied to clipboard

Explain in time window vignette/documentation affects the result when using McRaptor even if the GTFS doesn't include frequencies

Open dhersz opened this issue 3 years ago • 2 comments

e.g.

https://github.com/ipeaGIT/r5r/blob/99a0e34962d845b5c3ec94cc44994da3634a45a1/r-package/tests/testthat/test-set_monte_carlo_draws.R#L81-L112

dhersz avatar Jun 21 '22 18:06 dhersz

Hi! I think my question is directly related to this issue (sorry if it isn't - I can open a separate issue!)

I was using travel_time_matrix() function with the time_window() parameter on a stop_times based gtfs feed (no frequency.txt). I then read the time_window() vignette and realized that the argument should only be used for feeds with a frequency.txt file. During this process my results gave me questions on the time_window parameter, and how r5/r5r handle it when using a stop_times based feed (I've written the questions in more detail below)

For context, I was exploring the effect of different combinations of: time_window, max_walk_time, and percentiles. When I was passing different time_window arguments, the results had a lot of NA values, as you can see in the first figure. However, when I removed the time window argument, the results had no NA values

Figure 1: time_window USED

time_window_yes

Figure 2: time_window NOT USED

Please ignore time_window in the legend. I had many scenarios but I didn't actually use the time_window parameters here

time_window_no

My questions

  1. What does r5 / r5r do in the case of a time_window() argument being passed on a gtfs feed with no frequency.txt? What if I have multiple feeds and some have a frequency.txt and some don't? Should r5r throw a warning / error if you are trying to use time_window and (one of) the feeds doesn't have a frequency.txt?
  2. Is the percentiles argument only used along with the time_window() argument? Or can it be used with a stop_times based feed as well?
  3. How are travel times calculated when you are using a feed with stop_times.txt but no frequency.txt? Does the routing engine return one (the fastest) result for the exact departure time specified? Or is there something similar to time_window where it is getting the median of a number of different options?

Thank you!

Hussein-Mahfouz avatar Aug 25 '23 10:08 Hussein-Mahfouz

Hi @mattwigway. Perhaps you could help with this issue?

rafapereirabr avatar Mar 05 '24 19:03 rafapereirabr