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

Non-blocking barriers with weight penalty #3661

Closed
danpat opened this issue Feb 6, 2017 · 2 comments
Closed

Non-blocking barriers with weight penalty #3661

danpat opened this issue Feb 6, 2017 · 2 comments

Comments

@danpat
Copy link
Member

danpat commented Feb 6, 2017

With the arrival of #77 (separate weight/duration), there are certain barrier nodes that we would like to un-block and penalize heavily instead of simply cutting. The primary example of this is the node tag barrier=toll_booth - we would like to heavily penalize the routing weight when passing this node type (to allow for "avoid tolls" routing), without needing to apply a duration penalty (i.e. many tolls are fast-moving without significant time cost).

The current node_function has the ability to set two flags on an ExtractionNode:

  • barrier - this means that the graph is cut at this point - crossing is not possible
  • traffic_lights - this means a time penalty is added here, and the graph is not compressed across this turn movement (this is to allow preserving of the traffic_light penalty when updating with traffic speed data later)

These properties are stored as a std::vector<bool>, which only needs 1 bit per node. The turn_function uses the has_traffic_light flag to determine whether to add a duration penalty to a turning movement.

We should add a new ExtractionNode property here called has_weight_penalty (or something similar). The turn_function can then use this to add a fixed weight penalty to any turn that traverses this type of node.

@daniel-j-h
Copy link
Member

See #3021 and especially #3021 (comment) for how to implement this properly.

Want to close this as dup.?

@danpat
Copy link
Member Author

danpat commented Feb 7, 2017

Yes, this is a dupe of #3021, you have a better memory than me :-)

@danpat danpat closed this as completed Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants