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

[QUESTION] Edge- or vertex-based model? #19

Open
kkdd opened this issue Nov 7, 2022 · 4 comments
Open

[QUESTION] Edge- or vertex-based model? #19

kkdd opened this issue Nov 7, 2022 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers question Further information is requested

Comments

@kkdd
Copy link

kkdd commented Nov 7, 2022

Hello,
Which does horizon use, edge-based or vertex-based algorithm/model?

I think that the edge-based one can be represented by the trellis transition diagram whose nodes correspond to road-network links (=edges), which can handle multiple edges in a multigraph of road network, whereas the vertex-based one's nodes correspond to road-network nodes.

@kkdd kkdd added documentation Improvements or additions to documentation question Further information is requested labels Nov 7, 2022
@kkdd kkdd assigned LdDl Nov 7, 2022
@LdDl
Copy link
Owner

LdDl commented Nov 7, 2022

@kkdd Hello and welcome!

  1. Routing problem (Dijkstra + Contraction hierarchies): edge relaxation for sure with PQ for eliminating redundant vertices.
    But I have to mention: it depends on source data really. For my purposes I use mesoscopic graph prepared from OSM data, where vertices are actually expanded edges.

Visual representation of different graph models:
Mesoscopic level (used in my approach to pass OSM data to this library):
image
Microscopic level (used in my private traffic simulation engine):
image
Macroscopic level (OSM source data. Meso and Micro models inherit this data):
image

  1. Spatial search (neighbor search): edges geometries
  2. Hidden Markov Model (HMM) + Viterbi for hidden states: edges again. But some kind of the penalty is given for edges which have distant source/target vertices.

@LdDl LdDl added the good first issue Good for newcomers label Nov 7, 2022
@LdDl LdDl changed the title [question] [QUESTION] Edge- or vertex-based model? Nov 7, 2022
@kkdd
Copy link
Author

kkdd commented Nov 7, 2022

Thank you for your explanation.
I'm further going to think about this issue.

Can horizon get the result of the sequence of road-network links (=edges) instead of the one of road-network nodes?

The example of the road network with parallel edges is shown highlighted as follows:
download

@LdDl
Copy link
Owner

LdDl commented Nov 7, 2022

Oh, is that example for road network considering dual roads (e.g. dedicated bus school routes)?
Green - GPS markers, black - just arrowheads of movement direction
image

I guess this could lead to some troubles since routing engine will try to find OPTIMAL way and 5-th point will be considered as redudant by HMM or Viterbi.
You've made me think about it deeper (for public transport especially, e.g. snapping GTFS)

@kkdd
Copy link
Author

kkdd commented Nov 7, 2022

Thank you for your deep consideration.

The 5th point seems important for selecting the optimal one of parallel edges in your example plot, shown as a yellow dashed line in the following:
route

I think that the edge-based HMM is requited and it is represented by the states of edges (= road-network links) and their transition, whereas the node-based one is represented by the states of nodes and their transition, prohibiting parallel edges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants