Skip to content

segment name mismatch in HighwayGraphCollapsedEdgeInfo error report #178

Closed

Description

@yakra

if edge1.segment_name != edge2.segment_name:
print("ERROR: segment name mismatch in HighwayGraphCollapsedEdgeInfo: edge1 named " + edge1.segment_name + " edge2 named " + edge2.segment_name + "\n")

Example output:
ERROR: segment name mismatch in HighwayGraphCollapsedEdgeInfo: edge1 named OR18,OR99W edge2 named OR99W

This could be added as a fatal error to the ErrorList.
To more easily find the highway data that needs to be fixed, we can print out a list of all waypoints colocated at that vertex.

Activity

  1. self-assigned this
    on Jan 29, 2019
  2. yakra commented on May 20, 2020

    @yakra
    ContributorAuthor

    Test with HighwayData @ a46d6d9b7ca2f2f452f7e3ebe7123e109e51ced2

  3. yakra commented on Nov 21, 2020

    @yakra
    ContributorAuthor

    ...or would #360 make this all moot?

  4. jteresco commented on Dec 31, 2022

    @jteresco
    Contributor

    Haven't seen/heard about this in a long time. Anyone else?

  5. yakra commented on Dec 31, 2022

    @yakra
    ContributorAuthor

    There's some overlap with #91 here. These are caused by HIDDEN_TERMINUS errors.
    b642e06 (unhide hidden termini in graphs) should prevent the name mismatch from actually occurring I believe, but I'd like to checkout the commit above atsome point and take a closer look at how things behave.
    Low priority though.

  6. yakra commented on Apr 28, 2023

    @yakra
    ContributorAuthor

    b642e06 (unhide hidden termini in graphs) should prevent the name mismatch from actually occurring I believe

    Nope LOL what was I thinking. That only unhides at vertices with <2 incident edges.
    This error happens during compression, i.e. at vertices with exactly 2 incident edges.

  7. yakra commented on Aug 4, 2023

    @yakra
    ContributorAuthor

    Playing around with some concurrency detection optimizations produced:
    ERROR: segment name mismatch in HGEdge collapse constructor: edge1 named AH70 edge2 named AH70,E40.
    This could be anywhere on their concurrency in RUS or KAZ except maybe from Astrakhan to the KAZ border, as the bug probably requres >2 concurrent routes at a location.
    Kind of surprised there was just the one error and not loads more of these.

    To more easily find the highway data ... we can print out a list of all waypoints colocated at that vertex.

    A couple years after the OP, 315f834 made that harder to do.
    A few options:

    1. Bring back first_waypoint.
      This would increase sizeof(HGVertex). This could be offset by nixing lat & lng and replacing them with functions. Slightly slower, unless the decreased size is a win now that vertices are stored sequentially.
      The easiest option to implement.
    2. Pass the quadtree to the collapse ctor and find colocated points via lat & lng.
      Possibly the most efficient option; all the happy path has to do is put the QT in a register. Heck, it may already be there?
    3. Throw an exception and handle this in the HighwayGraph ctor where we have access to the QT.
      Not a good option if I wanna make any of this permanent; it's guaranteed to break the edge collapse process.
  8. yakra commented on Sep 29, 2024

    @yakra
    ContributorAuthor

    ^ We DO have access to the first waypoint during compression without having to explicitly store it in the vertex.
    No increasing sizeof(HGVertex).
    No wasting registers & passing extra arguments around.
    No messing around with the quadtree or handling exceptions.

    We have exactly 2 incident simple edges, which have pointers to HighwaySegments, which have Waypoint1 & Waypoint2.
    We know these are v.incident_edges[0] and v.incident_edges[1], as simple edges are attached first & never detached.
    Pick either edge. If one of its waypoints' coords don't match the vertex's, it's the other point.

    Waypoint* w = v.incident_edges[0]->segment->waypoint2;
    if (w->lat != v.lat || w->lng != v.lng) w = v.incident_edges[0]->segment->waypoint1;
    for (Waypoint* p : *w->colocated) std::cout << ' ' << p->root_at_label();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions