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

Test updating to R5 v7.3 #417

Open
rafapereirabr opened this issue Jan 29, 2025 · 3 comments
Open

Test updating to R5 v7.3 #417

rafapereirabr opened this issue Jan 29, 2025 · 3 comments
Assignees
Labels

Comments

@rafapereirabr
Copy link
Member

No description provided.

@rafapereirabr
Copy link
Member Author

rafapereirabr commented Feb 5, 2025

I've found one error currently pops up when I try to migrate r5r to use R5 latest version 7.3:

expanded travel_time matrix

The error occurs when using the expanded_travel_time_matrix() function:

   --- re-building 'r5r.Rmd' using rmarkdown
   
   Quitting from lines 303-314 [unnamed-chunk-12] (r5r.Rmd)
   Error: processing vignette 'r5r.Rmd' failed with diagnostics:
   java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError
   --- failed re-building 'r5r.Rmd'

Here's a reprex:

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

# load libraries
devtools::load_all('.') # load dev version of r5r local
library(sf)
library(data.table)
library(ggplot2)
library(dplyr)

# build a routable transport network with r5r
data_path <- system.file("extdata/spo", package = "r5r")
r5r_core <- setup_r5(data_path)

# routing inputs
mode <- c('walk', 'transit')
max_walk_time <- 30 # minutes
max_trip_duration <- 90 # minutes

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

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

ettm <- r5r::expanded_travel_time_matrix(
  r5r_core = r5r_core,   
  origins = points[1:30,],
  destinations = points[31:61,],    
  mode = mode,
  max_walk_time = max_walk_time,
  max_trip_duration = max_trip_duration,
  departure_datetime = departure_datetime,
  progress = T
  )

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

@rafapereirabr
Copy link
Member Author

I'm running these tests on a dedicated branch: r5_7.3

@rafapereirabr
Copy link
Member Author

on further inspection, the problem occurrs because in the the expanded_travel_time_matrix() we use set_expanded_travel_times(r5r_core, TRUE).

so we need to look further into the r5r_core$setExpandedTravelTimes() here and its communication with R5.

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

1 participant