question

Steven Hamoen avatar image
0 Likes"
Steven Hamoen asked Jason Lightfoot commented

How to get 2 staff in people module?

I have a model where I need most of the time 2 staff members to perform an activity. Because the acquire staff doesn't contain the request/require fields but it is stated everywhere that there is a list in the background, meaning that the acquire is most likely a pull from list I looked in the processflow to the variables and indeed I found the the request/require fields and the all or nothing. This works pretty nicely until I had 2 tokens waiting on 2 operators and they became available. At that time both tokens fell through the acquire activity but only 1 had the correct array (see attached sample model)

I'm not sure this is a bug or a misuse of the system but what would be a good way to acquire 2 operators? Using the acquire 2 times is not sufficient because it can lead to deadlocks.

Acquire2staff.fsm

FlexSim 23.2.0
people moduleacquire multiple resources
acquire2staff.fsm (52.7 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Not an answer, I just added Person and Acuity labels for whoever looks at this next.

acquire2staff_jl.fsm


0 Likes 0 ·

1 Answer

·
Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Jason Lightfoot commented

While acquiring two staff at a time is technically possible, it also isn't officially supported and hasn't been fully tested. It looks like you found a situation where it doesn't work properly.

Most healthcare models don't have a situation like this though, where you're trying to acquire multiple of the same type of staff. Usually you need one nurse, one anesthesiologist, one doctor, etc. and you can't put all of that into a single query anyway.

Deadlock is pretty easy to avoid in these situations by acquiring the staff in the same order. So two patients try to acquire a nurse and then a doctor. That way you don't end up with one patient with the nurse and the other with the doctor.

acquire2staff2.fsm


acquire2staff2.fsm (52.9 KiB)
· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Steven Hamoen avatar image Steven Hamoen commented ·
@Matthew Gillespie Even in healthcare model you might have the need to acquire 2 nurses (for instance for lifting people from 1 bed to another) but I agree that that is not so common. In this case the people module is used to model a laboratory where there are always 2 persons present for most of the actions. (not for everything because then you could simply double the needed staff after you have run the simulation ) So your deadlock solution is not working here. I have now solved it by an extra decide that checks if I really have the staff. If not I go back to the acquire.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Steven Hamoen commented ·
For more complicated sets of resources where deadlock would be an issue it might be worth taking a look at Jordan's simultaneous pull across lists.
0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Steven Hamoen commented ·
You could also use a Zone to only let one token on to the acquire at a time.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Matthew Gillespie ♦♦ commented ·
Right, and you could use the Zone Queue Strategy as the equivalent of the backorder strategy. The problem with that is that once one token has entered the zone, the queue order isn't re-evaluated until the next item is considered for zone entry.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.