ipeaGIT/r5r

Travel time at the same point have minutes ?

Closed this issue · 1 comments

Hi all, I recently used r5r to estimate travel time. However, in some cases the travel time estimation at the same point with the same coordinates have some minutes travel time different from 0.
Is this a bug or how should I understand this value?
c.c @rafapereirabr

data_path <- system.file("extdata/poa", package = "r5r")
r5r_core <- setup_r5(data_path)

# load origin/destination points
points <- read.csv(file.path(data_path, "poa_points_of_interest.csv"))

departure_datetime <- as.POSIXct(
  "13-05-2019 14:00:00",
  format = "%d-%m-%Y %H:%M:%S"
)

ttm <- travel_time_matrix(
  r5r_core,
  origins = points,
  destinations = points,
  mode = c("WALK", "TRANSIT"),
  departure_datetime = departure_datetime,
  max_trip_duration = 60
)
from_id to_id travel_time_p50
beira_rio_stadium beira_rio_stadium 2
farrapos_station farrapos_station 2

Hi @ambarja , this happens because of how R5 snaps the origin/destination points to the network. This is explained in more detail on issue #33.

If you're using these travel time estimates to calculate accessibility, this would probably make very little difference. Depending on your particular application, though, you might want to impute a value of 0 travel time when origin and destination points are the same.