question

Lou Keller avatar image
1 Like"
Lou Keller asked Adrian Haws commented

Repeated logic not working.

Further question based off discussion in this question.

And, now for the whole package. The model that I took the question from is attached to this email. Here's the explanation (question) I've been working through.

The modeler is working on a patient flow model (as attached), where they'd like patients to be transferred between units based on their acuity level and bed availability. Ideally, they would like patients to come to Step 50, and select a unit to go to based on global tables. Then, Step 51 will assign a LOS based on a "T_LOS" table. Step 60 will determine if the patient will leave the system (Step 70) or to be transferred to a new unit based on a newly assigned acuity level (Loop back to Step 50).

Everything works fine until the patient is transferred to a new unit. It seems like the patient gets stuck after being looped back to Step 50, and won't be able to pick up the new assigned LOS in Step 51.

I suggested looping back to Activity 51 instead of 50 for the same reason you suggested. Their response was, "The reason I have to send it to Activity 50 is I need to determine where the patient will go based on their new acuity and location availability. One example could be the patient might downgrade from an ICU unit to a PCU unit, so an available PCU unit would have to be assigned based on room availability in Activity 50. In this case, I am afraid my logic won't work if I loop the patient back to Activity 51.

In the case where I found the patient got stuck, the patient was told to move from L_9MIC to L_9MPC, which is a different unit with enough capacity. The interesting thing is the patient was moved over to L_9MPC (Fulfilled by Activity 50), but a new LOS was never assigned which is supposed to happen in Activity 51. Any thoughts on the potential reasons? capacity-planning3.fsm

FlexSim HC 5.0.12
healthcareflexsim hcrepeat activity
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
1 Like"
Matthew Gillespie answered Adrian Haws commented

The issue here is that Activity 51 doesn't start the second time. The patient successfully starts Activity 50 for the second time because you are using the Next Activity field to start it. The Next Activity field doesn't check if the chosen activity has already been completed before starting it. Activity 51 doesn't start because it is kicked off by its predecessor field which has a value of 50. The Predecessor field only starts the activity if the predecessor condition is met and the activity has never been started.

So basically the predecessor field will only ever start an activity once and won't work for a situation like this where you want the patient to repeat the same activity multiple times. You'll need to make sure to start Activity 51 using either a Next Activity field or a Start Activity command.

· 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.

Lou Keller avatar image Lou Keller commented ·

An absolutely perfect answer! The missing piece for me was, "The Predecessor field only starts the activity if the predecessor condition is met and the activity has never been started!" Once again, you've proven your knowledge mettle!

0 Likes 0 ·