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
refactor path pruning for not_thru/destonly/closures #4638
Open
nilsnolde
wants to merge
18
commits into
master
Choose a base branch
from
nn-refactor-prunings
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a369698
all refactored (and fixed), but only not_thru is reviewed so far
nilsnolde e9a94a1
reviewed destonly as well; still no tests
nilsnolde 8b4d88e
small b ug
nilsnolde 5038dbe
some amends
nilsnolde 54f9db4
some exes not updated
nilsnolde b8b4b18
fix astar.cc
nilsnolde 607d3cd
changelog
nilsnolde c5749f6
don't change the default
nilsnolde 5865eb9
revert the changes to map matching algos; still doesn't fix the mapma…
nilsnolde 579482f
some fixes
nilsnolde 997a40f
braces
nilsnolde d990027
destonly needs to be a separate EdgeLabel property because transition…
nilsnolde 6cd0e92
see easier diff
nilsnolde 6eba010
now I see the disadvantage of putting not_thru_pruning on the cost ra…
nilsnolde 9a5be0a
add not_thru_pruning to all other costing models; this fails a condit…
nilsnolde 7abd7f3
disable not_thru pruning for algos which don't have a second pass
nilsnolde 689707a
disable failing test_route test
nilsnolde b71e92b
forgot to add back dest_only to default constructor
nilsnolde File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,9 +219,11 @@ void AStarBSSAlgorithm::ExpandForward(GraphReader& graphreader, | |
} | ||
|
||
// Add to the adjacency list and edge labels. | ||
// TODO(nils): no pruning is enabled for this algo for now, needs some investigation if a second | ||
// pass is possible for this algo (bike doesn't allow that) | ||
uint32_t idx = edgelabels_.size(); | ||
edgelabels_.emplace_back(pred_idx, edgeid, GraphId(), directededge, newcost, sortcost, dist, mode, | ||
transition_cost, false, true, false, InternalTurn::kNoTurn, | ||
transition_cost, false, false, false, false, InternalTurn::kNoTurn, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no pruning at all, see comment |
||
baldr::kInvalidRestriction); | ||
*current_es = {EdgeSet::kTemporary, idx}; | ||
adjacencylist_.add(idx); | ||
|
@@ -446,8 +448,8 @@ void AStarBSSAlgorithm::SetOrigin(GraphReader& graphreader, | |
// of the path. | ||
uint32_t d = static_cast<uint32_t>(directededge->length() * (1.0f - edge.percent_along())); | ||
BDEdgeLabel edge_label(kInvalidLabel, edgeid, directededge, cost, sortcost, dist, | ||
travel_mode_t::kPedestrian, baldr::kInvalidRestriction, true, false, | ||
sif::InternalTurn::kNoTurn); | ||
travel_mode_t::kPedestrian, baldr::kInvalidRestriction, false, false, | ||
false, sif::InternalTurn::kNoTurn); | ||
// Set the origin flag and path distance | ||
edge_label.set_origin(); | ||
edge_label.set_path_distance(d); | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the
not_thru
check intoAllowed(Reverse)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that means it will NOT be put in the adjacency list and that is what's breaking the test below in
gurka_route