2

I'm looking for a method to count the agents crossing a particular path during a specific time. I know when you use pedestrians you can use the ped flow statistics, but is there also something for specific agents?

Thanks, Aron

Aron T.
  • 448
  • 2
  • 7

1 Answers1

2

The "Rectangular Area" shapes have a code box "on enter" when you enable their "Access restriction" property. Just make sure to set the capacity to infinity (so access is never actually restricted).

Now, you can use those to count entering agents whenever you need: enter image description here

Benjamin
  • 10,603
  • 3
  • 16
  • 28
  • Thanks benjamin! So than in the code box you just use a function to set a counter ++1 everytime something enters. – Aron T. Dec 14 '21 at 15:23
  • 1
    Exactly. In your case, you may only want to count during specifc times, but that is a different issue – Benjamin Dec 14 '21 at 15:37