-
Notifications
You must be signed in to change notification settings - Fork 661
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ferry shortest path recovery (#4378)
* Add test that demonstrates the wrong path can be recovered from the ShortestPath method in ferry_connections.cc * Fix the last_label_idx - make sure it is only set when an edge with the target classification (or better) is present at the node being expanded. Identify cases where no reclassification occurs (e.g,. islands with no edges that meet the target classification) and log the locations. * Add to change log * If no path is found, always add to set of ferry locations with no path. * Add test to make sure no edges are reclassified if the target classification is not found. * Looks like ReclassifyFerryConnections automatically sets the first edge connecting to the ferry to primary. I added a test to make sure no edges are reclassified if no edges with the target classification are encountered. However, the initial ferry connection edge is set to primary even if no edges with the target classification are encountered in ShortestPath. * Formatting * remove some method declarations - not needed since only used in ferry_connections.cc. * More properly identify cases where no paths to/from ferries to target classification roadways exist. * formatting * don't need to include unordered_set anymore. * Remove the check if node_labels.size == 0. This is redundant now that we check for a valid last_label_idx being set. * Reclassify the first edge IF a connection to higher class roads is found. * Modify the nothing reclassified test to remove the first edge connected to the ferry. No longer upclassed if no path to higher class edges is found.
- Loading branch information
1 parent
83f1c95
commit 274a3e7
Showing
4 changed files
with
201 additions
and
65 deletions.
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