Working with MultiDiGraph obtained via OSMnx

147 views
Skip to first unread message

Enzo Gonçalves Yulita

unread,
Dec 22, 2021, 6:53:36 AM12/22/21
to networkx-discuss
Greetings everyone,

So, I have obtained a MultiDiGraph file of a urban traffic network through OSMnx library, and now I'm studying how to read and work with this file. My objective is to find a set of possible routes between two points (source and destiny) and for that I've been thinking on applying K-Shortest Path.

The point is I don't really know how to do this, I think my MultiDiGraph network is too dense for networkx library (am I wrong? It has 463760 edges and 160900 nodes). Is there a library or method you guys could recommend me?  Thank you for the attention.

Enzo

Nicolas Cadieux

unread,
Dec 22, 2021, 8:32:43 AM12/22/21
to networkx...@googlegroups.com
Hi,

Perhaps this could help. The below code was made for River network so it does not deal with traffic rules.


You have a very big graph.  You may be able to make it fit in memory but queries will not be fast. The above code does not make use of multi graphs because they are bigger and lower.  It does find the parallel segments and breaks them mal that you can use it with a regular digraph.    If you have many queries, perhaps look at what cuda graph does? Last time I checked, it could handle billions of edges… 


Not open source and requires one of multiple  Nvidia GPU or something rented in the cloud… 


Le 22 déc. 2021 à 06:53, 'Enzo Gonçalves Yulita' via networkx-discuss <networkx...@googlegroups.com> a écrit :

Greetings everyone,

So, I have obtained a MultiDiGraph file of a urban traffic network through OSMnx library, and now I'm studying how to read and work with this file. My objective is to find a set of possible routes between two points (source and destiny) and for that I've been thinking on applying K-Shortest Path.

The point is I don't really know how to do this, I think my MultiDiGraph network is too dense for networkx library (am I wrong? It has 463760 edges and 160900 nodes). Is there a library or method you guys could recommend me?  Thank you for the attention.

Enzo

--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to networkx-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/networkx-discuss/fc8c4b00-dbb8-47e3-b4db-4c8bcc5a92den%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages