Hello,
the traci API strives to be minimal insofar functions which can be composed
out of existing traci calls are not included in the core API. If you want
to make a composite traci function available to the wider community, the
easiest way is to:
1) write those functions in the client language of your choice and host
them on github.
2) tells us about them so we can link them in the wiki
We would also consider adding your github project as a submodule in
sumo/tools/contributed so it is distributed with every sumo release.

regards,
Jakob


Am Di., 15. Jan. 2019 um 11:41 Uhr schrieb Arslane Hamza Cherif <
arslane.hamzache...@gmail.com>:

> Hello,
>
> I am back again regarding the same question, I understand better what you
> have said before, and I know that vehicles routes are organized around
> edges rather than junction (even if my main target is junction because it
> is the expected place where the key communication between vehicles will
> happen),
>
> Anyway, I may be able to achieve a similar task like you explain it
> before, now my question is how can I make it as a core function of TraCI?
>
> Indeed, for researchers like me and which work on the field of vehicular
> communication, there is a lot of routing protocols that need such
> information,
>
> Thanks for your time,
> Arslane
>
> Le ven. 11 janv. 2019 à 10:30, Jakob Erdmann <namdre.s...@gmail.com> a
> écrit :
>
>> In the very lates development version (windows version updated tomorrow)
>> you can also retrieve the route length from the stage result:
>> length = stage.length
>>
>> Am Do., 10. Jan. 2019 um 14:15 Uhr schrieb Jakob Erdmann <
>> namdre.s...@gmail.com>:
>>
>>> In sumo, vehicle routes are organized around roads (or rather edges)
>>> rather than junctions.
>>> If you can rephrase your problem in terms of edges the the solution
>>> becomes quite simple.
>>>
>>> edges = traci.vehicle.getRoute(vehID)
>>> remainingEdges = edges[traci.vehicle.getRouteIndex(vehID):]
>>>
>>> then for each of the remaining edges you can compute the traveltime to
>>> your destination (edge) Z
>>>
>>> stage = traci.simulation.findRoute(fromEdge, toEdge)
>>> travelTime = stage.travelTime
>>>
>>> If you need to do the same thing with junctions, then you can use
>>> sumolib (http://sumo.dlr.de/wiki/Tools/Sumolib) to read the network
>>> graph of edges and junctions. This allows you to identify the target
>>> junction for each of the remaining edges (edge.getToNode()). You then just
>>> need to pick a suitable target edge from all edges that are incoming to
>>> your target junction Z (node.getIncoming()).
>>>
>>> regards,
>>> Jakob
>>>
>>> Am Do., 10. Jan. 2019 um 10:39 Uhr schrieb Arslane Hamza Cherif <
>>> arslane.hamzache...@gmail.com>:
>>>
>>>> Hello Dear sumo-dev,
>>>>
>>>> First of all, excuse me if I am missing something or doing it wrong, it
>>>> is the first time that I contribute to an open-source project, but of
>>>> course not the first time that I use SUMO,
>>>>
>>>> In fact, I had worked during the six last years with SUMO and Veins,
>>>> and I really appreciate these tools, 2 years ago I was looking for a
>>>> solution to my problem, and I realised that It was impossible with an old
>>>> version of SUMO, so I switched to a solution based on Python, SumoLib and
>>>> Networkx API.
>>>>
>>>> Now lets me explain the problem, and how I think that is possible to
>>>> solve it (I will appreciate any help in this sense, to guide me for my
>>>> first contribution)
>>>>
>>>> *Problem:* Say for instance that you have a VehX that follows a
>>>> specific route that is passing by multiple junctions (e.g: Junctions: A, B,
>>>> C, D), what I want is to identify the closest one relative to another
>>>> junction Z that is not in the current route of the vehicle. I asked the
>>>> question two years ago here:
>>>> https://sourceforge.net/p/sumo/mailman/message/35079189/
>>>>
>>>> However, at that time I was using an old version of SUMO that does not
>>>> include the command *(0x83)* (
>>>> http://sumo.dlr.de/wiki/TraCI/Simulation_Value_Retrieval)
>>>>
>>>> Maybe it is possible to implement a new command that will achieve this
>>>> by:
>>>>
>>>>    1. Identifying the junctions in a current route of VehX
>>>>    2. Computing the driving distance (or air distance if needed)
>>>>    between junctions (A,Z), (B,Z), (C,Z) & (D,Z)
>>>>    3. Returning the junction with the shortest distance among the 4
>>>>    junctions
>>>>
>>>> So, any advice on how I can do it ? from where can I start?
>>>>
>>>> Thank you very much for your time,
>>>>
>>>> Best Regards,
>>>> Arslane HAMZA-CHERIF
>>>>
>>>> Le mer. 9 janv. 2019 à 10:55, Arslane Hamza Cherif <
>>>> hc.arsla...@gmail.com> a écrit :
>>>>
>>>>> Hello Dear sumo-dev,
>>>>>
>>>>> First of all, excuse me if I am missing something or doing it wrong,
>>>>> it is the first time that I contribute to an open-source project, but of
>>>>> course not the first time that I use SUMO,
>>>>>
>>>>> In fact, I had worked during the six last years with SUMO and Veins,
>>>>> and I really appreciate these tools, 2 years ago I was looking for a
>>>>> solution to my problem, and I realised that It was impossible with an old
>>>>> version of SUMO, so I switched to a solution based on Python, SumoLib and
>>>>> Networkx API.
>>>>>
>>>>> Now lets me explain the problem, and how I think that is possible to
>>>>> solve it (I will appreciate any help in this sense, to guide me for my
>>>>> first contribution)
>>>>>
>>>>> *Problem:* Say for instance that you have a VehX that follows a
>>>>> specific route that is passing by multiple junctions (e.g: Junctions: A, 
>>>>> B,
>>>>> C, D), what I want is to identify the closest one relative to another
>>>>> junction Z that is not in the current route of the vehicle. I asked the
>>>>> question two years ago here:
>>>>> https://sourceforge.net/p/sumo/mailman/message/35079189/
>>>>>
>>>>> However, at that time I was using an old version of SUMO that does not
>>>>> include the command *(0x83)* (
>>>>> http://sumo.dlr.de/wiki/TraCI/Simulation_Value_Retrieval)
>>>>>
>>>>> Maybe it is possible to implement a new command that will achieve this
>>>>> by:
>>>>>
>>>>>    1. Identifying the junctions in a current route of VehX
>>>>>    2. Computing the driving distance (or air distance if needed)
>>>>>    between junctions (A,Z), (B,Z), (C,Z) & (D,Z)
>>>>>    3. Returning the junction with the shortest distance among the 4
>>>>>    junctions
>>>>>
>>>>> So, any advice on how I can do it ? from where can I start?
>>>>>
>>>>> Thank you very much for your time,
>>>>>
>>>>> Best Regards,
>>>>> Arslane HAMZA-CHERIF
>>>>>
>>>> _______________________________________________
>>>> sumo-dev mailing list
>>>> sumo-dev@eclipse.org
>>>> To change your delivery options, retrieve your password, or unsubscribe
>>>> from this list, visit
>>>> https://www.eclipse.org/mailman/listinfo/sumo-dev
>>>>
>>> _______________________________________________
>> sumo-dev mailing list
>> sumo-dev@eclipse.org
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-dev
>>
> _______________________________________________
> sumo-dev mailing list
> sumo-dev@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-dev
>
_______________________________________________
sumo-dev mailing list
sumo-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-dev

Reply via email to