'AnyLogic - Identify seized ResourcePool

I am modeling a service process in AnyLogic thorugh hybrid simulation (DES + Agent based). In this process, I have different resourcePools, one for each employee available in the process. What I would like to knwo, is if I can get, through an AnyLogic function, the ResourcePool currently used by the seize block.The reason why I am needing this information is because then, by using a funcition, I will assign different delays based on the resourcePool seized (e.g., 10 minutes is is rpA, 15 minutes if it is rpB). I attach a shot example to show my problem. Let's suppose this is my process:

Process

I tried to follow the example shown in this post OtherQuestion

Thus, I created a variable myPool

myPool

To be used in the seize and module

seize

and in the resourcePool

rp

But I am constantly receiving errors when compiling the model (e.g., "The method myPool() is undefined for the type Main" in the rpA and rpB, and "The method myPool() is undefined for the type Main" in the seize.

My java skills are really basic so I am not really understading how to write the code I need in this question OtherQuestion to solve my problem.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source