Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
250 views
in Technique[技术] by (71.8m points)

Anylogic ResourcePoolName.idle() is not update real time?

I use the below command to check availability of ResourcePool:

ResourcePoolName.idle() ResourcePoolName.busy()

I found that the idle unit (or busy unit) is slowly updated.

When the agent leave the Service block, ResourcePoolName.busy() is still busy and ResourcePoolName.idle() is sill not idle. I need to wait for the agent to enter the next 3rd block so that ResourcePoolName.busy() unit and ResourcePoolName.idle() are updated correctly.

How can we have the idle unit (or busy unit) of the ResourcePool update real time????

question from:https://stackoverflow.com/questions/66057979/anylogic-resourcepoolname-idle-is-not-update-real-time

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Someone recommend me this solution and it work well.

Instead of using A Services Block alone, I uses Services Block + Delay (with delay time = 0). Now when the agent leave the Delay Block, ResourcePoolName.idle() status did updated correctly.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...