Search code examples
servicesimulationdistributionanylogictime-measurement

Measuring system time of specific agent in anylogic


I've got 3 different product types of agent, which each go it's individual path within the fabric. How can i measure the average time the product type spends in the system? My logic looks like this enter image description here, and i wanted to implement the measurement in the first service, like this:enter image description here, it will be completed in the last service like this :enter image description here Now I get some really high numbers, which are absolutely wrong. The process itself works fine, if you run the measurement with the code "//agent.enteredSystemP1 = time()", you will get a mean of 24 minutes, per product. But how can i get the mean per product type?


Solution

  • Just use the same if-elseif-else distinction in the 2nd service block as well.

    Currently, any agent leaving the system adds time to any systemTimeDistribution