anylogic

How to acess queue stats (size and waiting time) on service block?


I am a Simul8 user. And now I´m learning anylogic.

I need to collect metrics for Service Blocks in my model: average waiting time and average number waiting. How to acess this metrics ?

I only could acess the myService.queueSize().

I also try myService.sieze.queue.statsSize.mean() as someone suggest on Stack Overflow. But I got the following msg: sieze cannot be resolved or is not a field.

Error IMG


Solution

  • You can access the queue within a Service object by calling myService.queue. Same goes for the buildin in Delay: myService.delay

    Now you have all API calls that you get with normal Queue and Delay objects.

    Note that average waiting time and average number waiting is something you will need to collect manually, though. But that is a different question :)