-
Notifications
You must be signed in to change notification settings - Fork 180
faq 45121545
by Dapeng Li on 2016-02-09 17:41:19
Hello all,
I want to map out the congested links during traffic simulation. Does anyone know how I could do this? Thanks.
Cheers,
Dapeng
by Johan W. Joubert on 2016-02-10 07:47:09
Hi Dapeng, a more specific answer can only be given if we know what exactly you mean with 'congested'. Also, how frequently do you want to know this? Once per iteration? Or continuously?
But the short answer is that you can do it by implementing EventListeners
. More specifically, you can add to a link's count through a LinkEnterEvent
, and remove from the count through a LinkLeaveEvent
. Have a look at the example in the following class:
tutorial.programming.example06EventsHandling.CongestionDetectionEventHandler
by Dapeng Li on 2016-02-10 16:38:18
Hi Johan,
Thanks for your timely reply. I want to know which links are heavily congested during a simulation. CongestionDetectionEventHandler this example only shows how to calculate the travel time of each agent on its trajectory. How could I perform a statistical analysis to derive the congested links? Should I store the excessTravelTime for all the used links and do a statistical analysis to accomplish this? Are there any available tools for doing this? Thanks.
Cheers,
Dapeng
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq