Dear sir
My case is different.

I am not just want to find shortest distance but my aim is to find optimal
path using ant colony.

This is one of the the milestone of my PhD.

So I guess to achieve this i need to follow you first suggestion.

Please correct me if I am wrong.

On 10-Jan-2019 6:23 PM, "Arslane Hamza Cherif" <
[email protected]> wrote:

You have to do it on your own, I managed to achieve it via SumoLib and
Networkxs by that time, but now you don't even need this I think since you
can use the distance request command (as explained in my previous reply)

Le jeu. 10 janv. 2019 à 11:50, Bijal Varia <[email protected]> a
écrit :

> Thanks for detail reply sir,
>
> But for the beginner like me its too difficult to understand your code.
> so i need to go step by step.
>
> 1. What code converts road network into a weighted graph ? Sir please
> quote Any tutorial to get help on this?
>
>
> On Thu, Jan 10, 2019 at 5:17 PM Arslane Hamza Cherif <
> [email protected]> wrote:
>
>> Hello Bijal VARIA,
>>
>> The solution that I had used was somewhat bounded to the considered
>> version of SUMO, this is why my solution involved several tools (I was
>> using at that time SUMO 0.13):
>>
>>    - First of all I had to convert the whole road network into a
>>    weighted graph, by relying on Networkxs API and LibSUMO
>>    - The second step was to use the Networkxs API to compute the
>>    shortest path between nodes of the network (what I mean by nodes of the
>>    network is junction of your road network)
>>    - The last step is to compare the distance between the different
>>    nodes and the targeted one.
>>
>> You can check this work by following this link
>> <https://github.com/Arslan90/PyServerGeneric>. However, as explained
>> above the code is very old
>>
>> Another quick around solution and which may be not bounded to older
>> versions of SUMO is to:
>>
>>    - Identify your edges and the targeted one then retrieve the
>>    coordinates of their centre
>>    - Compute the distance between your edge and the target one via their
>>    centre coordinate and the specific TraCI command
>>    <http://sumo.dlr.de/wiki/TraCI/Simulation_Value_Retrieval>  *distance
>>    request (0x83)*
>>
>> Voila voila, I hope that is the expected answer,
>>
>> Arslane HAMZA-CHERIF
>>
>> Le jeu. 10 janv. 2019 à 09:42, Jakob Erdmann <[email protected]> a
>> écrit :
>>
>>> You will have to do the actual programming yourself but here are some
>>> hints:
>>>
>>> edges = traci.vehicle.getRoute(vehID)
>>> remainingEdges = edges[traci.vehicle.getRouteIndex(vehID):]
>>> stage = traci.simulation.findRoute(fromEdge, toEdge)
>>> travelTime = stage.travelTime
>>>
>>>
>>>
>>>
>>> Am Mi., 9. Jan. 2019 um 17:07 Uhr schrieb Bijal Varia <
>>> [email protected]>:
>>>
>>>> Dear listing,
>>>>
>>>> I have found Question in the following link :
>>>>
>>>>              https://sourceforge.net/p/sumo/mailman/message/35079189/
>>>>
>>>> *I am concern to  first Question :*
>>>>
>>>> 1. Which node from B,C,D & E is the closest (Driving distance not Air 
>>>> distance) to a target node Z
>>>>
>>>> * Answer : *
>>>>
>>>> The best solution is to retrieve nodes that compose the current route of a 
>>>> vehicule than calculate the driving distance between each node and the 
>>>> target node.
>>>>
>>>> *Would you please share the code of Traci (Python) to achieve this. I am 
>>>> struggling since few weeks to do this.*
>>>>
>>>> *I will be very much grateful if you help me in this regard.*
>>>>
>>>> Bijal Varia
>>>>
>>>> _______________________________________________
>>>> sumo-user mailing list
>>>> [email protected]
>>>> To change your delivery options, retrieve your password, or unsubscribe
>>>> from this list, visit
>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>
>>> _______________________________________________
>>> sumo-user mailing list
>>> [email protected]
>>> To change your delivery options, retrieve your password, or unsubscribe
>>> from this list, visit
>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to