Gaute
Gaute

Reputation: 49

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.

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 ". 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?

Picture of the flow chart and showing the error message

Upvotes: 0

Views: 68

Answers (1)

Benjamin
Benjamin

Reputation: 12795

You need a queue ahead of the hold block. "Hold" does not come with its own queue.

Upvotes: 1

Related Questions