Skip to content

Negative time in rare cases for encoders with two weights per edge #178

Closed

Description

@karussell

When using bike2 sometimes negative times occures in a path. There are two problems:

  1. If the speed is infinity ("blocking edge") then in Path.calcMillis a long value will be calculated converted which overflows (infinity double => largest long) and results in negative time!
  2. In AddShortcutHandler.foundShortcut (PrepareContractionHierarchies.java) the flags should be overwritten only if skipped edges are identical. This is really rare as the two nodes (from and to) and the weight (which is double!) have to be identical.

The bug occured here (cannot be seen as bike2 is not yet life):

Activity

  1. added this to the 0.3 milestone on Apr 10, 2014
  2. self-assigned this
    on Apr 10, 2014
  3. added a commit that references this issue on Jan 7, 2025
    877d26e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions