eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.55k stars 1.43k forks source link

Measuring the arrival time of vehicles at the intersection #11068

Open MohamadReza-Haghani opened 2 years ago

MohamadReza-Haghani commented 2 years ago

Hi,

I was wondering if there is a way to measure the arrival time of vehicles at the intersection which is the time a vehicle reaches the end of the queue.

Thanks, Reza.

namdre commented 2 years ago

Possibilities:

MohamadReza-Haghani commented 2 years ago

Thank you for your response! I think these options give me the time at which a vehicle exited an edge. They do not consider the queue that may be created at the end of an edge close to a signalized intersection. A vehicle may join the queue but exit the edge several time steps later. I was wondering if there is a way to measure the time a vehicle reaches the end of the queue on an edge.

namdre commented 2 years ago

I misunderstood you at first. There is currently no such output. You could probably derive the information from fcd-output (if the speed of a vehicle drops to 0 it has likely reached the end of a queue of some sort). The existing outputs that deal with queues (--queue-output and <laneAreaDetector>) are only concerned with queue lengths but not with individual vehicle arrival. It would be fairly easy to extend queue-output to optionally provide vehicle ids.

MohamadReza-Haghani commented 2 years ago

Thank you for your options! I did not find any command in TraCI to get the ids of vehicles contributing to jam length. If I can get vehicle ids, I can measure their arrival time. Right now, I am writing a python code from scratch to identify the vehicle ids contributing to a jam. I was wondering if I can get the ids of these vehicles using a TraCI command.

namdre commented 2 years ago

There is currently no such TraCI function. You can retrieve all vehicles on a lane or on a laneAreaDetector but have to manually filter for speed.