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

Add support for avoiding edges #567

Merged
merged 4 commits into from Feb 28, 2017

Conversation

Projects
None yet
3 participants
@dnesbitt61
Member

dnesbitt61 commented Feb 27, 2017

Add an optional avoid edge list to DynamicCosting. Check for user specified avoid edges within Allowed and AllowedReverse methods. Update AllowedReverse methods to use opp_edgeid since that is the actual edge being traversed.

When specifying an edge we also need to be able to find the shortcut edge that includes the edge. Added a method to GraphReader to support this. This method gets the shortcut edge that includes the specified directed edge Id. Returns an invalid GraphId if the edge is not part of a shortcut.

@@ -332,6 +333,15 @@ class DynamicCost {
virtual bool IsExcluded(const baldr::GraphTile*& tile,
const baldr::NodeInfo* node);
// Adds a list of edges (GraphIds) to the user specified avoid list.
void AddUserAvoidEdges(const std::vector<baldr::GraphId>& avoid_edges);

This comment has been minimized.

@kevinkreiser

kevinkreiser Feb 27, 2017

Member

why user avoid? why not just avoid?

@kevinkreiser

kevinkreiser Feb 27, 2017

Member

why user avoid? why not just avoid?

This comment has been minimized.

@dnesbitt61

dnesbitt61 Feb 27, 2017

Member

in case we ever have the notion of system wide avoids (e.g. daily construction closures). This method may go away when we pass info from loki to sif - but it allowed a way to test with valhalla_run_route.

@dnesbitt61

dnesbitt61 Feb 27, 2017

Member

in case we ever have the notion of system wide avoids (e.g. daily construction closures). This method may go away when we pass info from loki to sif - but it allowed a way to test with valhalla_run_route.

@dgearhart

This comment has been minimized.

Show comment
Hide comment
@dgearhart
Member

dgearhart commented Feb 27, 2017

:shipit:

@dnesbitt61 dnesbitt61 merged commit f96ae9b into master Feb 28, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@dnesbitt61 dnesbitt61 removed the in progress label Feb 28, 2017

@dnesbitt61 dnesbitt61 deleted the avoid_edges branch Feb 28, 2017

@kuanb kuanb referenced this pull request May 17, 2017

Closed

Add edges, as well as avoid? #725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment