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

fix a regresion introduced in #2743 #2815

Merged
merged 1 commit into from Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,7 @@
* FIXED: Fix compiler errors if HAVE_HTTP not enabled [#2807](https://github.com/valhalla/valhalla/pull/2807)
* FIXED: Fix alternate route serialization [#2811](https://github.com/valhalla/valhalla/pull/2811)
* FIXED: Store restrictions in the right tile [#2781](https://github.com/valhalla/valhalla/pull/2781)
* FIXED: Regression in stopping expansion on transitions down in time-dependent routes [#2815](https://github.com/valhalla/valhalla/pull/2815)

* **Enhancement**

Expand Down
3 changes: 2 additions & 1 deletion src/thor/timedep_forward.cc
Expand Up @@ -104,7 +104,8 @@ bool TimeDepForward::ExpandForward(GraphReader& graphreader,
// if this is a downward transition (ups are always allowed) AND we are no longer allowed OR
// we cant get the tile at that level (local extracts could have this problem) THEN bail
graph_tile_ptr trans_tile = nullptr;
if ((!trans->up() && hierarchy_limits_[trans->endnode().level()].StopExpanding()) ||
if ((!trans->up() &&
hierarchy_limits_[trans->endnode().level()].StopExpanding(pred.distance())) ||
Copy link
Member Author

Choose a reason for hiding this comment

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

in the previous PR i accidentally removed the distance argument 🤦

Copy link
Member Author

Choose a reason for hiding this comment

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

!(trans_tile = graphreader.GetGraphTile(trans->endnode()))) {
continue;
}
Expand Down
3 changes: 2 additions & 1 deletion src/thor/timedep_reverse.cc
Expand Up @@ -125,7 +125,8 @@ bool TimeDepReverse::ExpandReverse(GraphReader& graphreader,
// if this is a downward transition (ups are always allowed) AND we are no longer allowed OR
// we cant get the tile at that level (local extracts could have this problem) THEN bail
graph_tile_ptr trans_tile = nullptr;
if ((!trans->up() && hierarchy_limits_[trans->endnode().level()].StopExpanding()) ||
if ((!trans->up() &&
hierarchy_limits_[trans->endnode().level()].StopExpanding(pred.distance())) ||
!(trans_tile = graphreader.GetGraphTile(trans->endnode()))) {
continue;
}
Expand Down