Skip to content

Issues with time calculation. #1585

Closed
Closed

Description

@easbar

I think the routing algorithms do not properly calculate the times when turn costs are involved. I identified three problems:

  • The turn cost time is not contributing enough to the traveling time, for example for a 100m edge setting the turncosts to 2 increases the weight from 18s to 20s while the time is only increased from 18s to 18.002s. Fixed in Fixes some issues with turn cost times. #1586.

  • edge-based CH does not include the turn cost times in the calculated time at all. Everything is fine for the weight calculation and when using the fastest weighting the fastest route will be found with respect to turn costs, but Path.getTime() will not include the turn cost times. This has to be adjusted in Path4CH. Fixed in Implements correct time calculation for edge-based CH. #1611.

  • The bidirectional algorithms (dijkstra&astar, probably also ALT) do not pay attention to turn costs at the meeting point of fwd&bwd search (the turn costs are properly included for the weight calculation, but the turn cost time is not added when unpacking the path. Fixed in Fixes some issues with turn cost times. #1586.

  • TurnWeighting does not include default u-turn cost in calcMillis. Fixed in Includes default u-turn cost in time calculation, fixes #1585. #1635.

For turn restrictions (infinite not finite turn costs) the first three issues are not important, because restricted turns will not be used anyway. The 4th issue only plays a role when TraversalMode.EDGE_BASED_2DIR_UTURN is used.

See this test: 44f5c06

Activity

  1. added this to the 0.13 milestone on May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions