Hi,
an edge (in the microsimulation) is just a container for lanes and has
no length, so you need to use the lane length as below. In the current
implementation all lanes of an edge have the same length though, so it
is safe and correct to always use the length of lane 0 (although this
might change in the future).

Best regards,
Michael

Am 16.03.2014 20:19, schrieb Julian Zammit:
> Hi Kara,
> 
> I'm not so sure the API lets you retrieve edge distance directly, however I
> think you might be able to achieve this by getting the length of the lane
> within an edge using *getLength*. Most TraCI commands are found here
> http://sumo-sim.org/pydoc/traci.html (I found that last one here to be
> precise: http://sumo-sim.org/pydoc/traci.lane.html#-getLength)
> 
> So perhaps you could get the length of the lanes involved rather than the
> edges themselves and add them up to give you the route length.
> 
> Hope that helps :)
> 
> Good luck!
> 
> Julian
> 
> 
> 
> 
> On 12 March 2014 12:34, Kara Micallef <[email protected]> wrote:
> 
>> Hi,
>>
>> I'm still fairly new to Sumo and TraCI so I'm getting stuck even on certain
>> basic things. Could someone indicate how I can get the route (or edge)
>> length via TraCI? I am currently using Python. I would also appreciate any
>> indication on where to look for information on these basic things in the
>> future - I have tried to go through the python files located in
>> sumo/tools/traci but haven't found a way to retrieve the edge length.
>>
>> Thanks for your help,
>> Kara
>>
>> ------------------------------------------------------------------------------
>> Learn Graph Databases - Download FREE O'Reilly Book
>> "Graph Databases" is the definitive new guide to graph databases and their
>> applications. Written by three acclaimed leaders in the field,
>> this first edition is now available. Download your free book today!
>> http://p.sf.net/sfu/13534_NeoTech
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/sumo-user
>>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
> 


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to