Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update node weights if traffic data is applied #3430

Merged
merged 1 commit into from
Dec 11, 2016

Conversation

danpat
Copy link
Member

@danpat danpat commented Dec 8, 2016

Issue

This is an attempt at fixing #3429. Our extractor saves the edge-based-node weights into the .enw file. However, if traffic data is applied, those node weights are invalidated, yet we still use them during graph contraction.

This PR moves the location that the .enw file is loaded and updates node weights with new values if traffic data is supplied.

With this change, can no longer reproduce the problem described in #3429

@MoKob @TheMarex can you sanity check this please?

TODO: an isolated test case - I have so far only reproduced this problem with large sets of internal data, I haven't narrowed it down to something I document as a cucumber test.

Tasklist

  • update relevant Wiki pages
  • add regression / cucumber cases (see docs/testing.md)
  • review
  • adjust for comments

@@ -914,6 +916,8 @@ EdgeID Contractor::LoadEdgeExpandedGraph(
previous_osm_node_id = segmentblocks[i].this_osm_node_id;
}

node_weights[inbuffer.source] = new_weight;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only bit that's actually new here.

@TheMarex TheMarex added this to the 5.5.0 milestone Dec 9, 2016
@MoKob
Copy link

MoKob commented Dec 9, 2016

@danpat I have serious doubts if the fix you did is actually the cause of the problem, but I cannot fully understand whats going on, yet. The code using the node weights is required to find self-loops. So starting on a segment, ending on a segment and driving a loop in between (e.g. bearings front/back in the wrong direction) or if you consider a longer slow road with a fast route going around.

The fix you did might, by chance, actually prevent the issue from surfacing, but the only difference we should see on traffic stacks is whether or not we find a traffic loop. As long as a direct path exists, the (which should be a given in map matching), the effect should not be visible at all.
The worst thing that should happen, if the node weights are incorrect, is that we add an additional edge (if the edges around get way faster) or not find a path (when the node weight does not capture the slowness of the way).

@MoKob
Copy link

MoKob commented Dec 9, 2016

Aside from potential other problems. This PR can be merged still to update the node weights to be more accurate.

@TheMarex
Copy link
Member

TheMarex commented Dec 9, 2016

@danpat I think it is okay to skip on the test-case here as in it's current form it is mostly a performance fix for the loop pruning heuristic in the CH code.

@MoKob
Copy link

MoKob commented Dec 9, 2016

Technically it's also a question of loop correctness (which is broken to begin with, some other issues here). So I'd be ok with skipping the test as well. (see #2016)

@TheMarex TheMarex force-pushed the fix/node_weight_traffic_update branch from 7989b92 to fef6ab3 Compare December 9, 2016 14:51
@TheMarex
Copy link
Member

TheMarex commented Dec 9, 2016

Rebased and squashed, waiting on travis then merging.

@TheMarex
Copy link
Member

Damn forgot to merge this before doing the next RC.

@TheMarex TheMarex merged commit 8c7f744 into master Dec 11, 2016
@TheMarex TheMarex deleted the fix/node_weight_traffic_update branch December 11, 2016 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants