The code of dijkstra is part of its C++ core.
You can call it from your own python script using the traci function
indicated above.
I recommend reading http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights
to see how TraCI helps you with the combination of SUMO and custom code
without touching the C++ core.
ACO is not part of SUMO you will have to find/develop this yourself.

2018-09-25 11:04 GMT+02:00 Dhaval Varia <[email protected]>:

> Thanks Jakob for your quick response.
>
> I am a very new bee in SUMO. Would you please elaborate on your answer.
>
> Where can i find the code of Dijkstra? So i can make a new file and write
> my own code for ACO
>
> Is it possible to get the code of ACO from somewhere?
>
> *:)*
>
>
>
> *Thanks & Best
> Regards.----------------------------------------------------------------------------------------Dhaval
> varia*
> *(9924343883)*
>
> On Tue, Sep 25, 2018 at 5:00 PM, Jakob Erdmann <[email protected]>
> wrote:
>
>> This is best done using http://sumo.dlr.de/wiki/TraCI
>> - dijkstra is already part of sumo but it uses travelTime as its default
>> metric rather than distance:
>>   traci.vehicle.rerouteTraveltime
>> - you can set custom travelTimes (e.g. based on edge length and a fixed
>> speed) using traci.edge.adaptTraveltime
>> - you can use traci to set arbitrary routes for vehicles:
>> traci.vehicle.setRoute to make use of your own ant colony code.
>>
>> Sumo provide various outputs to compare simulation runs:
>> http://sumo.dlr.de/wiki/Simulation/Output
>>
>> regards,
>> Jakob
>>
>> 2018-09-25 8:56 GMT+02:00 Dhaval Varia via sumo-user <
>> [email protected]>:
>>
>>> Dear Sumo List,
>>>
>>> I am trying to implement and compare the following shortest path
>>> algorithm :
>>>
>>> 1. Dijkstra
>>> 2. Ant Colony Optimization
>>>
>>> I want to implement this using TraCi and SUMO [Please suggest if any
>>> other
>>> tool that I should use].
>>>
>>> *Question : *
>>>
>>>    1. How to implement this both the algorithm using Traci and find the
>>>    output on SUMO?
>>>    2. How to take various values to compare this both the algorithm like
>>>    TravelTime, Fuel consumption, CO2 produced?
>>>
>>> Thanks In Advance
>>> *:)*
>>>
>>>
>>>
>>> *Thanks & Best
>>> Regards.----------------------------------------------------
>>> ------------------------------------Dhaval
>>> varia*
>>> ([email protected])
>>>
>>> _______________________________________________
>>> sumo-user mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/sumo-user
>>> _______________________________________________
>>> sumo-user mailing list
>>> [email protected]
>>> To change your delivery options, retrieve your password, or unsubscribe
>>> from this list, visit
>>> https://dev.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://dev.eclipse.org/mailman/listinfo/sumo-user

Reply via email to