Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Optimizing traci.edge.subscribeContext for Vehicle Data Retrieval


Dear SUMO Community,

I am using the following 'TraCI' command to obtain all vehicles moving on a specific edge while
retrieving their speed and lane ID. As the lane length, I use half of the edge length:

traci.edge.subscribeContext(edgeID,
                             traci.constants.CMD_GET_VEHICLE_VARIABLE,
                             length,
                             [traci.constants.VAR_SPEED, traci.constants.VAR_LANE_ID])

However, I have noticed that some vehicles in my results are actually on different edges. I suspect this is because the distance parameter works as a circular range rather than strictly along the edge.

I have two main questions:

A. Is there a more efficient 'TraCI' call to obtain vehicle data for a specific edge?
B. What would be an optimal value for the distance parameter to improve performance while ensuring only vehicles on the target edge are included?

I appreciate any insights or recommendations.

Με φιλικούς χαιρετισμούς / Kind Regards

Vasilios Karagounis
Software Engineer
Center for Research and Technology Hellas (CERTH)
Hellenic Institute of Transport (HIT)

CONFIDENTIALITY NOTICE: The information in this  email and any attachments thereto are confidential, except where the  e-mail specifically states that its contents can be disclosed, and is  intended solely for the use of its intended recipient(s). It may also be  subject to legal privilege or otherwise protected from disclosure. If  you are not the intended recipient of this communication, you are hereby  notified that any disclosure, copying, distribution, or use of the  information contained in or attached to this e-mail is strictly  prohibited. Please refrain from disclosing its contents to any third  party, but notify the sender immediately and make sure to delete and  permanently destroy the e-mail (including any attachments thereto) from  your filing systems. Internet communications are not secure and  therefore sender/CERTH does not accept any liability for the contents of  this message and for any damage whatsoever that may be caused by  viruses.


Back to the top