Anylogic: Measuring time spent in service

1.9k views Asked by At

In the following model Image the graph visualizes the service block's utilization. However, this utilization represents the average number of agents being processed.

I would like to find out the amount of time the service block is delaying agents during the model's total run time. This would provide me with a more accurate representation of the capacity utilization. Is this possible?

1

There are 1 answers

2
Felipe On BEST ANSWER

you can use a dataset or a statistics element (found in the analysis palette) or even a collection and add values like this: Service delayed time

On enter delay:

agent.enterTime=time();

On exit (or on at exit)

data.add(time()-agent.enterTime);

Of course this requires you to add a variable called enterTime in your agent.