question

Maryam H2 avatar image
0 Likes"
Maryam H2 asked Maryam H2 commented

acquire a bed in one group while waiting in another

I'm working on a model for how beds are assigned in a healthcare setting. Here's the process: a patient first checks if there's a bed open in Bed Group 1. If not, they try to get a bed in Group 2. Meanwhile, they keep an eye on Group 1 to see if a bed frees up. If a bed in Group 1 does open up, they'll drop their spot in the queue for Group 2 and go for the bed in Group 1.

Now, I don't want to use the Max Wait Timer for Group 2 Acquire activity because I need to track how long it takes to get a bed there. but I'm not sure how to set this up. I'm trying to figure out how to let go of the Group 2 bed spot without triggering the Max Wait Timer. is that possible using a split setup like the one in the model I've attached?

wait for event_sample_1.fsm

FlexSim 24.0.0
wait for eventtokenrelease
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Maryam H2 commented

In general, managing multiple options that depend on some pull/acquire can be done by using token preemption.

You create one token for each option. As soon as one token acquires their resource, all other tokens are 'aborted' by releasing them to some other activity.

In the attached example I create a child token for the "Group2" section. This has the benefit that I can set the child token to only access labels on the parent token.

wait-for-event-sample-fm.fsm

In this case, there isn't actually a need for multiple Resources and Acquire activities as far as I can tell from your description. The patient needs to acquire any bed, but prefers a bed from group 1. So you can just give priority to those beds when pulling from the entire group.

Assign an extra label to each bed that denotes the priority with which it should be pulled (lower numbers are pulled first).

1705650060438.png

1705650072888.png

wait-for-event-sample-fm_1.fsm


· 3
5 |100000

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

Maryam H2 avatar image Maryam H2 commented ·

@Felix Möhlmann Thanks for your answer!

This is great, looks like both ways pretty much do the same thing. The main thing is, the first one's easier to use, right? For the second one, I'd need to make labels for the beds in each group, is that correct??

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Maryam H2 commented ·

Yes, you'd need to assign a label to each bed. Though you can speed this up by selecting multiple beds at once (hold shift and draw a box around them or hold ctrl and select each one to add them to the selection or do it through the group interface).

Then use the little buttons on the bottom right of the labels tab to copy labels from the highlighted object to all selected objects.

1706128234096.png

0 Likes 0 ·
1706128234096.png (9.9 KiB)
Maryam H2 avatar image Maryam H2 Felix Möhlmann commented ·
got it, thanks!
0 Likes 0 ·