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

Consider helper for node-based routing costs #34

Open
tomalrussell opened this issue Sep 17, 2021 · 0 comments
Open

Consider helper for node-based routing costs #34

tomalrussell opened this issue Sep 17, 2021 · 0 comments
Labels
feature New feature or functionality

Comments

@tomalrussell
Copy link
Member

Adapting note from #21

The cost of traversing a node from one edge to another may be useful for transport modelling (e.g. turn restrictions or turn penalties, waiting times at stations or ports, general costs of crossing borders).

A potential approach would be to introduce a complete graph (from each in-edge to each out-edge) at the location of nodes where waiting times are applicable, e.g. for a 2-degree node b with some waiting time 3:

    10    3    5
a - - - - b - - - - c

turns into

a - - - - b' - b'' - - - - c
     10      3        5

Where the "waiting cost" of 3 at node b gets represented by an edge of weight 3 between b' and b'' (even though b' and b'' are physically represented as in the same location as b).

For more complex intersections, use the same idea of replacing a node of degree n with a Kn complete graph..

a---b---c
    |
    d

a - b1
c - b2
d - b3
b1 - b2  # a-b - b-c
b1 - b3  # a-b - b-d
b2 - b3  # c-b - b-d
@thomas-fred thomas-fred added the feature New feature or functionality label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or functionality
Projects
None yet
Development

No branches or pull requests

2 participants