Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Sumolib : Find Alternate routes and route wise total length

Dear Bijal,

I guess that you will have to build routes by yourself, as far as I know Sumolib offers only "getShortestPath" method.

Building a random set of routes is not complicated if you allow cycles, see e.g. https://stackoverflow.com/questions/37953983/. As the route is a python list of edges, you may easily iterate over the list the get the total route length.

Jan

On Thu, 16 May 2019, at 12:39 PM, Bijal wrote:
Dear Listing,

I am using Sumolib. [Converted net file to graph]. 

My question : How to get the list of the alternate possible routes from Source node to destination node.

Moreover this i need to know the total length of the edges [edge.getLength()] for each routes,source to Destination. [So that i can identify that the route which i am getting through my algorithm, is shortest or not]

For example Output for Source node: 2 to  Destination node:9 should look like this :

2-3-8-9 : Total Length = 400mtr
2-4-5-3-9 :Total Length = 300mtr Etc..

Please help me to get this information out of the graph.

--
:)
Bijal Varia
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user



Back to the top