question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Matthew Gillespie edited

Choosing Slots Based on Provider Schedule With Real Scenario

Hi Team,Test1.5.fsm

I am working on logic to pull 1 or 2 slots based on patient requirement (currently 80:20 ratio) from the available provider slots. Facing issues to incorporate 2 points:

1. Every slot is having 30 min duration. So, in can case 2 slots how to pull from available slot since 2nd 30 min slot will be generated when 1st 30 min slot will be completed?

2. In case of 2 slots, both slots should be consecutive slots otherwise it doesn't make sense. It should not be like 1 slots is 1:30PM to 2:00PM and another slot is 8:00AM to 8:30AM. How to avoid it?

Attaching model for reference.

Thank you!

Any help would be appreciated.

FlexSim 21.0.10
hcslot assignmentprovider schedule
test15.fsm (81.8 KiB)
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

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Matthew Gillespie edited

Here's one way I thought of to do this. It's basically what you had with a few changes:

1. A new "patient" token is only created if the slot isn't immediately pulled by another "patient" token. This handles the case where the slot is an EndSlot (doesn't have a consecutive slot after it) and all the pulling tokens need 2 slots.

2. The patient tokens pull from the list, but those with SlotCount equal to 2 use a query "WHERE EndSlot = 0". This way patients who need 2 slots can't pull an EndSlot as their first slot.

3. If the patient needs 2 slots the token then gets a new label "SecondSlot" and then pulls from the list a second time.

4. The Slots list now has a Back Order Queue Strategy that is "ORDER BY Puller.SecondSlot DESC". This tells the list to prioritize pullers who have the SecondSlot label. This way a patient who needs 2 slots and already got their first one gets the next slot.

test15_working.fsm


test15-working.fsm (75.6 KiB)
· 2
5 |100000

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

Ankur A3 avatar image Ankur A3 commented ·

Hi @Matthew Gillespie ,

I like the approach you took to model it. Also, I have few more questions:

1. Facing issues to make this logic scalable. Suppose there are 2 providers and 2 patient coming to clinic at same time. In this case, 1st and 2nd pull activity is pulling the token at same time. Also, 1 token is waiting (reference to 2nd patient) at 1st pull activity.

2. Can you help to understand both Breathe activities used in model?

3. Can we make staff sitting at chair in idle state?

Please find model attached for your reference.

Thank you!

test15-V2.fsm

0 Likes 0 ·
test15-v2.fsm (282.6 KiB)
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Ankur A3 commented ·

@Ankur A3

1. You could still use this logic, but you'll need a separate Provider Schedule activity for the second provider since the two providers have different end slots. I added a Provider label for each token that tells which provider the slot is for and the second Pull from List now uses the query "WHERE Provider = Puller.Provider" to make sure a second slot uses the same provider.

test15-v3.fsm

2. A "breathe" is just a delay activity with a delay of 0 time. This tells the token to stop momentarily and lets other events happen in the model before the token starts moving again. The breathe in the loop is just an activity for the token to move into when it doesn't immediately get a patient that pulls it. It then stops so the Source activity can create a new token and pull from the list. The other breathe is just to allow the pulled token to access labels on the slot token before it's removed. I moved this breathe to the end of SlotGeneration to make it more clear.

3. Please ask a new question for separate questions.

0 Likes 0 ·
test15-v3.fsm (85.0 KiB)