Search code examples
anylogic

Agents crossing Path ( discrete event modelling)


I'm tring to count how many agents have crossed a particular path. I've seen this done with transporter and I've seen other question with nodes. But i want to count specifically how many agents passed through a path. Any suggestion is really appreciated! Thanks!


Solution

  • Not easily possible.

    Either you "agentify" your network (not trivial). Or you switch to transporters.

    Last option: You could use the getNearestAgent() function but that is also not an elegant solution, see For paths, the "getNumberOfTransporters" function throws an exception