opentripplanner / OpenTripPlanner

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

Large number of constrained transfers with min_transfer_time lead to severe performance penalty #3950

Closed leonardehrenfried closed 1 year ago

leonardehrenfried commented 2 years ago

In one of my data sets in the southern German region of Baden-Würrtemberg, I have ~50k stops but ~70k transfers with a min_transfer_time.

Enabling constrained transfers there is catastrophic for performance. In some searches the constrained transfers cause a performance penalty of 300%!

Basically all routing time is taken up by the constrained boarding search.

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

b496c8cea29a0ad540d07f45b2d874b35a928c63

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

https://www.nvbw.de/fileadmin/user_upload/service/open_data/fahrplandaten_mit_liniennetz/bwgesamt.zip https://download.geofabrik.de/europe/germany/baden-wuerttemberg-latest.osm.pbf

Router config and graph build config JSON

{
  "otpFeatures" : {
    "SandboxAPILegacyGraphQLApi": true,
    "SandboxAPIMapboxVectorTilesApi": true,
    "FloatingBike": true,
    "ParallelRouting": true,
    "VehicleToStopHeuristics": true,
    "TransferConstraints": true,
    "OptimizeTransfers": false
  }
}

Steps to reproduce the problem

Enable transfer constraints and the performance drops catastrophically. As am example a route from Heidelberg -> Meckenbeuren takes 3 seconds with transfer constraints but 1 second without.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days