You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
segment name mismatch in HighwayGraphCollapsedEdgeInfo error report #178
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.
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.
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.
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:
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.
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?
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.
^ 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();
Activity
yakra commentedon May 20, 2020
Test with HighwayData @ a46d6d9b7ca2f2f452f7e3ebe7123e109e51ced2
yakra commentedon Nov 21, 2020
...or would #360 make this all moot?
jteresco commentedon Dec 31, 2022
Haven't seen/heard about this in a long time. Anyone else?
yakra commentedon Dec 31, 2022
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.
yakra commentedon Apr 28, 2023
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.
yakra commentedon Aug 4, 2023
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.
A couple years after the OP, 315f834 made that harder to do.
A few options:
first_waypoint.This would increase
sizeof(HGVertex). This could be offset by nixinglat&lngand replacing them with functions. Slightly slower, unless the decreased size is a win now that vertices are stored sequentially.The easiest option to implement.
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?
HighwayGraphctor 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.
yakra commentedon Sep 29, 2024
^ 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 haveWaypoint1&Waypoint2.We know these are
v.incident_edges[0]andv.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.