opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.21k stars 1.03k forks source link

Inconsistent bicycle commute times for /plan (one-to-one) and /indicators (one-to-many) #2419

Closed danvk closed 4 years ago

danvk commented 7 years ago

I'm getting different times from the /otp/routers/default/plan endpoint and from /surfaces/{n}/indicators with the same origin/destinations.

Steps to reproduce the problem

one-to-one:

$ curl 'http://localhost:8080/otp/routers/default/plan?fromPlace=40.719423,-73.964001&toPlace=40.751157,-73.978936&mode=BICYCLE'
...
"duration":1791
...

$ curl 'http://localhost:8080/otp/routers/default/plan?fromPlace=40.719423,-73.964001&toPlace=40.7124491,-74.0082925&mode=BICYCLE'
...
"duration":1321
...

one-to-many:

$ curl -X POST 'http://localhost:8080/otp/surfaces?batch=true&fromPlace=40.719423,-73.964001&mode=BICYCLE'
{"id":0,"params":{"mode":"BICYCLE","fromPlace":"40.719423,-73.964001","batch":"true"}}

$ cat nyc-grid/pointsets/locations.csv
id,latitude,longitude
1,40.751157,-73.978936
2,40.7124491,-74.0082925

$ curl 'http://localhost:8080/otp/surfaces/0/indicator?targets=locations&detail=true'
{
   ...
  "times": [1795, 1377]
}

Expected behavior

I'd expect the times to line up (1795s vs. 1791s, 1321s vs. 1377s).

Observed behavior

Bicycle commute times with /plan are different than commute times with /surfaces/{n}/indicator.

Version of OTP used (exact commit hash or JAR name)

HEAD as of my PR to add times (#2417).

Data sets in use (links to GTFS and OSM PBF files)

MapZen metro extract for NYC. (new-york_new-york.osm.pbf) and the pointset file mentioned above:

tree nyc-grid
nyc-grid
├── new-york_new-york.osm\ (1).pbf
└── pointsets
    └── locations.csv

1 directory, 2 files

Command line used to start OTP

java -Xmx4G -jar target/otp-1.1.0-SNAPSHOT-shaded.jar --build nyc-grid --inMemory --analyst --pointSets nyc-grid/pointsets

Router config and graph build config JSON

(defaults)

abyrd commented 7 years ago

Thanks @danvk. I am almost certain I know what's causing this and have created another ticket for that problem, #2420. I will leave this one open until we can confirm it's fixed, just in case it's a separate issue, and for documentation purposes.