entur / r5

Rapid Realistic Routing on Real-world and Reimagined networks
MIT License
2 stars 2 forks source link

'relaxCostAtDestinationArrival' filter #28

Open t2gran opened 5 years ago

t2gran commented 5 years ago

Context

If the relaxCostAtDestinationArrival is set (value > 1.0), some wanted (variation) and some unwanted paths are returned. An example of an unwanted path is a path that consist of the same Routes, but does a transfer at a none optimal stop. We do want to remove these.

Solution

Implement a filter that removes duplicate paths (same routes, but transfer at different stop). Keep the path with the lowest cost, then lowest travelTime.