Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r5r::expanded_travel_time_matrix() not working with R5 v7.2 #401

Open
rafapereirabr opened this issue Oct 8, 2024 · 3 comments
Open

r5r::expanded_travel_time_matrix() not working with R5 v7.2 #401

rafapereirabr opened this issue Oct 8, 2024 · 3 comments
Assignees
Labels

Comments

@rafapereirabr
Copy link
Member

Trying a few tests to update {r5r} to use the latest version of R5 v7.2, I'm finding this error with r5r::expanded_travel_time_matrix()

# increase Java memory
options(java.parameters = "-Xmx2G")
library(r5r)

# build transport network
data_path <- system.file("extdata/poa", package = "r5r")
r5r::download_r5(version = '7.2.0', force_update = TRUE)
r5r_core <- setup_r5(data_path, overwrite = TRUE)

# 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"
)

ettm <- expanded_travel_time_matrix(
  r5r_core,
  origins = points,
  destinations = points,
  mode = c("WALK", "TRANSIT"),
  time_window = 20,
  departure_datetime = departure_datetime,
  max_trip_duration = 60
)

head(ettm)

Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError

@mvpsaraiva
Copy link
Collaborator

I've updated r5r to use R5 7.2 in the dev branch. All tests are passing in my machine and all seems to be working fine now. We can do a few more checks before mergin into master.

@rafapereirabr
Copy link
Member Author

Thanks so much, @mvpsaraiva ! We'll do a few more tests this week and get back to you on this asap.

@rafapereirabr
Copy link
Member Author

I've run several tests and it works fine. The package still does not throw an error for really large areas, though. I think we can close this issue and move to the next priority issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants