简体   繁体   English

有条件地停止在 Seize 区块发生的扣押

[英]Conditionally halting a seize taking place in Seize block

I want to halt patients (agents) from seizing treatment rooms (resource) from two resource pools until one of the pools has one room available.我想阻止患者(代理)从两个资源池中占用治疗室(资源),直到其中一个池有一个房间可用。 This because once the patient has seized from one pool, it will be blocked to evaluate seizure from the other.这是因为一旦患者从一个池中癫痫发作,它将被阻止以评估另一个池的癫痫发作。 I've tried to use "recalculateResourceChoiceConditions()" to fix this problem.我尝试使用“recalculateResourceChoiceConditions()”来解决这个问题。

Now, I tried using a Hold block which in my head should work perfectly as long as the blocking condition is "(TreatmentRooms.idle() + TreatmentRooms1.idle()) == 0 ".现在,我尝试使用 Hold 块,只要阻塞条件为“(TreatmentRooms.idle() + TreatmentRooms1.idle()) == 0”,它在我的脑海中应该可以完美工作。 This, however, yields a logical error saying that the agent cannot leave the previous block.然而,这会产生一个逻辑错误,即代理不能离开前一个块。 Is there another block I can use to emulate the wanted logic, or is there something I can do with the Hold block to circumvent this error?是否有另一个块我可以用来模拟想要的逻辑,或者我可以用 Hold 块做些什么来规避这个错误?

流程图图片并显示错误消息

You need a queue ahead of the hold block.您需要在hold块之前排队。 "Hold" does not come with its own queue. “保持”没有自己的队列。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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