Skip to content

faq 92700756

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

Analysis of queues at traffic signals

by Theresa Thunig on 2016-11-04 10:25:00


I would like to make a medium-size analysis of queues at intersections with traffic lights. 
How can I access the size of queues for each traffic signal plan for the day?


Cheers,

Camila Feliciano



Comments: 1


Re: Analysis of queues at traffic signals

by Theresa Thunig on 2016-11-04 10:28:21

Dear Camila,

in MATSim you can analyze everything that is given by events. In the output events file you can see every event that was thrown during the simulation. There are e.g. events for every vehicle that enters or leaves a link (LinkEnter/LeaveEvent) and also events for every vehicle that starts or ends a trip (VehicleEnters/LeavesTraffic). You also have events for signals that changed their state (SignalGroupStateChangedEvent).
Based on this information you can for example calculate delays at intersections/ links, the number of vehicles waiting at a signal, average travel times on links … Note, that vehicles can also be delayed because of capacity restrictions and not only because of signals.

To analyze events, you have to implement event handler for all events you need and either postprocess the output events file (see RunEventsHandlingExample in the tutorial linked below) or attach the handler to the controller (see RunEventsHandlingWithControlerExample in the tutorial linked below).

For some general examples on event handlers, you can have a look in the tutorials. You might also look for an appropriate event handler in somebody else’s code, but I recommend writing your one.

Theresa

Clone this wiki locally