ropensci / opentripplanner

An R package to set up and use OpenTripPlanner (OTP) as a local or remote multimodal trip planner.
https://docs.ropensci.org/opentripplanner
GNU General Public License v3.0
80 stars 20 forks source link

[BUG] Regression: new error message on routing #113

Closed Robinlovelace closed 6 months ago

Robinlovelace commented 11 months ago

Describe the bug

Hitting a bug on a small routing job:

14:48:51.410 WARN (StreetVertexIndex.java:389) Couldn't link (53.7452, -1.5885)
Done in 0.1 mins                                                                                                                                                                                   
2023-12-09 14:48:51.64235 processing results
Error in UseMethod("st_as_sfc") : 
  no applicable method for 'st_as_sfc' applied to an object of class "NULL"

To Reproduce

u = "https://github.com/ITSLeeds/TDS/releases/download/22/NTEM_flow.geojson"
desire_lines = read_sf(u)
fromPlace <- lwgeom::st_startpoint(desire_lines)
toPlace <- lwgeom::st_endpoint(desire_lines)
fromPlace <- st_sf(data.frame(id = desire_lines$from, geometry = fromPlace))
toPlace <- st_sf(data.frame(id = desire_lines$to, geometry = toPlace))
  1. Create a new object called routes_drive_top, with driving routes between the OD pairs represented in the desire_lines object.

Calculate routes for the first three desire lines with the following command:

routes_drive_top = otp_plan(otpcon = otpcon,
                            fromPlace = fromPlace,
                            toPlace = toPlace,
                            fromID = fromPlace$id,
                            toID = toPlace$id,
                            mode = "CAR")

Expected behavior

I would expect something to be returned after all that routing, seems to fail too easy.

mem48 commented 6 months ago

Can't reproduce

I got

2024-05-05 08:54:42.426817 sending 502 routes requests using 44 threads
Done in 0.5 mins                                                                                                                                                         
2024-05-05 08:55:12.046603 processing results
2 routes returned errors. Unique error messages are:

2x messages: "We're sorry. The trip planner is temporarily unavailable. Please try again later."

2024-05-05 08:55:13.239178 done

And 500 out of 502 routes returned