In Anylogic, How can I get statistics such as utilization of individual resource pool units? As the resourcePool.utilization() function returns the mean utilization for all units in the resource pool. Is it possible to access the data of each resource pool unit? Any ideas? Thanks in advance!
There is an easier way to get the utilization for individual resource units:
Now you can access the individual resource pool units' utilization, with x as the index of the unit:
myResources(x).getUtilization()
In order to keep track of more complex statistics, you might still need to use the more complicated solution of the original answer.
You can build something yourself:
Use the On seize and On release code in the ressourcePool to notify your custom ressource Agent that it is active/not active. You can pass a message to the agent or call a function inside the agent.
The ressource agent can save its current state in a variable, statechart or similar.
You can then use the standard statistic module from the Analysis palette to aggregate the information, for example to get the individual agent's utilization.