entur / r5

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

Return equivalent paths - relax the destination pareto function #29

Closed t2gran closed 5 years ago

t2gran commented 5 years ago

Context

The current implementation only returns the earliestArrivalTime path, even if there exist paths with the same cost and travelTime.

Example

Route 20 runs every 10th minute and is the best option between Stop B and G. When we search we want all trips in the departure time window we search (08:00 - 09:00). Currently only the trip starting at 08:03 is returned, not the trip starting at 08:13, 08:23, 08:33, ...

Solution

Since these paths are filtered away in the DestinationStopArrival , the only thing we need to do is to relax this the pareto function for the destination. This have very little effect on the performance.

Relax cost at DestinationArrival (even more)

As part of this is become very easy to add a tuning parameter for relaxing the cost even more; Hence returning som close to optimal paths witch give better variation in the result set - this feature is not 100% since we do not relax the stop arrivals for other stops, so a path A might make it to the destination, but path B don´t. This happens even if the 2 paths are equivalent, the only difference is that path B is dominated at by another trip at some stop before the destination.

This should be combined #28 relaxCostAtDestinationArrival filter.