简体   繁体   中英

How to adress an ResourcePool Block in Anylogic

I'm currenty trying to dynamically select a resourcePool with my seize Block. My Agent Workplace (WP) has a short process including a seize-delay-release sequence. In the topagent, WP is used in different Areas defined by excel-input. Because of the dynamic generation of the amount and location of the WP agents it is necessary that the seize block find the resource from the resourcePool of the current Area.

However I don't know how to adress the Block. I can create the name as String so I tried with findFirst but don't know if the Blocks are in a population/Collection. In AnylogicHelp i couldn't find something about this. I know there is a Type ResourcePool...but that didn't helped me either.

I don't know if it is impossible, super simple or just not the right way, but I didn't found smth. helpful.

Thank you in advance :)

Store the resourcepool in a local variable myRP inside each Area . Then, your WP agent can always check "what is my area?" and then easily retrieve it's RP.

If Area is not an agent, turn it into one. But then, you would put the RP into that agent anyway and you could retrieve it easily without the variable.

So it seems your model architecture is not helping you as it should :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM