Skip to content

faq 45121545

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

How to map out the congested links

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


Comments: 2


Re: How to map out the congested links

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


Re: How to map out the congested links

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

Clone this wiki locally