Best practices for LWBS ?

Best practices for LWBS ?

petitjean_cm
Not applicable
11 Views
2 Replies
Message 1 of 3

Best practices for LWBS ?

petitjean_cm
Not applicable

[ FlexSim 19.1.1 ]

Hi,

I'm trying to create a little model on LWBS (Leave Without Being Seen) patients with 19.1.1 FlexSim version. I try some methods but I can't replicate the process of the old versions of FlexSim. For example, when I open the trigger windows of a waiting room, I can't send a delayed message to the waiting room, even if there is a "on message" trigger.

So I try to test an other process, wich is :21174-wehkd.png

- Patients arrive and walk to the waiting room

- I use a "split" step to have two tokens. The first modelize the patient flow, the second (on the left) modelize if the patient will stay or not.

- So, the "left part" process is :

1°) after 30 minutes, the patient ask himself "should I stay or not ?"

2°) He has 80% chance to stay, 20% chance to leave

3°) If he stay, he repeat the same question in 30 minutes

4°) If he want to leave, there is an other test and here is the problem :

The "custom code step" are used to write on the token label the patient location ("Waiting Room";"Exam Room"...) and the second "Decide step" on the left is used to check if the patient is still on the waiting room.

If he is, the patient leave, but if he is not, it means he is in the exam room so he doesn't have to leave, so I delete the token.

The problem is : when we split a token in two parts, the two new tokens are linked (same splitID), but I thought that when I write something on the label of one of them, the second is updated. But it is not the case, so I can't chek my patient's location on the "left process". Actually, in my model, during his exam, my patient leave because the "left token" is not updated.

So my question is :

is there a code instruction that allows me to change the label of the token that has the same splitID than the token wich is triggering the custom code to update my patient location ?

Thanks for your help !

lwbs-1.fsm

0 Likes
Accepted solutions (1)
12 Views
2 Replies
Replies (2)
Message 2 of 3

sebastian_hemmannE3JAU
Collaborator
Collaborator
Accepted solution

Hi, as far as I see you will further face the problem that you destroy your patient on the left side but on your right side the patient token is still in the process but without any existing patient any more.

Why don´t you just use the "Max Wait Timer" in the "Acquire Location" and set this to 30 minutes and another connector to leave. On this other connector you could add your Decision 😉

I think this is more what you are looking for.

21176-newprocess.png

To your question: because you did a split with the tokens FlexSim assumes that you will do a Join anywhere and in this case it would be a quite big deal to decide what token has the right information and you want to go with.

21173-lwbs-1-sh.fsm

Message 3 of 3

petitjean_cm
Not applicable

Thank you Sebastian, your solution works indeed, and is quite simple and elegant. Have a nice day !