Skip to content

Landmark routing issue if QueryGraph splits longer edge #1532

Closed

Description

@karussell

Likely a very seldom bug. Occurs only if there are more than 3 points and SPT is crossing a virtual node that is on a longer edge. The weight difference is minimal but still it results in a suboptimal route for "bidirectional A* with landmarks" only.

There is likely a problem due to our approximations for the weight of the landmark for virtual nodes here.

See this test case that shows the issue:

@Test
public void testLandmarkBug() {
    List<OneRun> list = new ArrayList<>();
    OneRun run = new OneRun();
    run.add(50.016923, 11.514187, 0, 0);
    run.add(50.019129, 11.500325, 0, 0);
    run.add(50.023623, 11.56929, 7069, 178);
    list.add(run);

    runAlgo(testCollector, DIR + "/north-bayreuth.osm.gz", "target/north-bayreuth-gh",
            list, "bike", true, "bike", "fastest", false);
    assertEquals(testCollector.toString(), 0, testCollector.errors.size());
}

Error (bidir A*|landmarks is the only algorithm that fails):

java.lang.AssertionError: FOUND 2 ERRORS.
algoEntry(astarbi|landmarks) returns path not matching the expected distance of 7069.0	 Returned was 7325.930538837292	 (expected points 178, was 175) [435-436  50.0164164977881,11.514396175880014,NaN, 425-1869  50.01912750378136,11.500335196386084,NaN, 28-233  50.0235468735199,11.568922110014084,NaN].
algoEntry(astarbi|landmarks) returns path not matching the expected points of 178	 Returned was 175	 (expected distance 7069.0, was 7325.930538837292) [435-436  50.0164164977881,11.514396175880014,NaN, 425-1869  50.01912750378136,11.500335196386084,NaN, 28-233  50.0235468735199,11.568922110014084,NaN].

Activity

  1. added a commit that references this issue on Oct 12, 2019
    1f93a9d
  2. michaz commented on Jan 20, 2020

    @michaz
    Member

    Fixed in #1749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions