opentripplanner / OpenTripPlanner

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

Cost mismatch stop-arrivals and paths #3623

Closed t2gran closed 1 year ago

t2gran commented 3 years ago

OTP construct paths from stop arrivals after the Raptor search reach the destination. The path contains more information and does it own time-shifting and cost calculation. The path total cost should be equals to the cost for the Raptor destination-stop-arrival. So, we have added a check in the code for this, witch log if it is not. This is not critical if the difference in the cost is small or the path is an none pareto optimal path, but it is an indication that there is a bug in the code somewhere.

Error log message

01:34:04.834 ERROR (DestinationArrivalPaths.java:185) Cost mismatch - Mapper: $16205.01, stop-arrivals: $17765.01 $5740.03 $3070.03, path: Walk 11m38s 0:39:22+2d 0:51+2d $3070.03 ~ Tøyen(1800) 0s ~ SUBWAY 5 0:51+2d 0:57+2d 6m $1110 ~ Økern(1487) 0s ~ Walk 42m33s 0:57+2d 1:39:33+2d $12024.98 [0:39:22+2d 1:39:33+2d 1h11s $16205.01]

Case

Search: Lille Tøyen - Tosenhagen, line 5, 23:06 28.09.2021

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

0fb6a61049289e5f36b4b95937134ec6563552e7 (Pending PR #3617 )

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

The Entur dataset for Oslo with Metro Line 4 and 5, bus lines 62 - 69

t2gran commented 3 years ago

I have only seen this error for trips that start more than 24 hours AFTER the departure time, and it is not happening every time. The same search may or may not fail. This is probably due the the order witch each pattern is processed.

t2gran commented 2 years ago

More log error messages:

Cost mismatch - Mapper: $12182, stop-arrivals: $13742 $5785.13 $2995.13, path: Walk 14m30s 18:47:30 19:02 $2995.13 ~ Jernbanetorget(13776) 0s ~ SUBWAY 5 19:02 19:10 8m $1230 ~ Hasle(7546) 0s ~ Walk 36m23s 19:10 19:46:23 $7957.05 [18:47:30 19:46:23 58m53s $12182]
Cost mismatch - Mapper: $19811, stop-arrivals: $20411 $17056 $12391 $12300 $6000 $0, path:  20:05 20:05Kristiansund trafikkterminal(51616) 0s ~ BUS 100 20:05 21:35 1h30m $6000 ~ Molde trafikkterminal(33490) 5m {guaranteed, maxWaitTime: 5m} ~ BUS 905 21:40 23:20 1h40m $6300 ~ Moa trafikkterminal(61175) 0s {guaranteed, maxWaitTime: 5m} ~ Walk 30s 23:20 23:20:30 $91.23 ~ Moa trafikkterminal(61180) 4m30s ~ BUS 101 23:25 0:27+1d 1h2m $4065 ~ Kyrkjegata(36317) 0s ~ Walk 14m34s 0:27+1d 0:41:34+1d $3355.28 [20:05 0:41:34+1d 4h36m34s $19811]
Cost mismatch - Mapper: $19811, stop-arrivals: $20411 $17056 $12391 $12300 $6000 $0, path:  20:05 20:05Kristiansund trafikkterminal(51616) 0s ~ BUS 100 20:05 21:35 1h30m $6000 ~ Molde trafikkterminal(33490) 5m {guaranteed, maxWaitTime: 5m} ~ BUS 905 21:40 23:20 1h40m $6300 ~ Moa trafikkterminal(61175) 0s {guaranteed, maxWaitTime: 5m} ~ Walk 30s 23:20 23:20:30 $91.23 ~ Moa trafikkterminal(61180) 4m30s ~ BUS 101 23:25 0:27+1d 1h2m $4065 ~ Kyrkjegata(36317) 0s ~ Walk 14m34s 0:27+1d 0:41:34+1d $3355.28 [20:05 0:41:34+1d 4h36m34s $19811]
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

t2gran commented 1 year ago

I think this is fixed in #4799 .