question

Perrine D avatar image
0 Likes"
Perrine D asked Perrine D commented

How can I start instructions for random PCI ?

Hi everyone!

How can I start an instruction (in my case, an activity) for random PCI (in started activity trigger)?

I want a global process to make some patients doing an activity but I want the patients to be choosen from random PCI.

In my start instructions field, I think I have to use the patient selection scheme to have random PCI starting the activity but I don't know how to do that…

In the model below, without criteria, it just takes one PCI or 2 if we don't have enough patients in the first PCI.

20181114-19-ajoutetp-modifconditionsappeletp.fsm

Thanks for your help!

Perrine

FlexSim HC 5.3.4
random pcistart instructions for selected patients
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

·
Cliff King avatar image
0 Likes"
Cliff King answered Perrine D commented

Try the following for the "Patient selection scheme". ptList is an array that contains a list of candidate patients who have already passed the selection criteria, and numCandidates is the variable telling you how many candidate patients passed the test.

By the way, do you know there is a 5.3.6 version out now? The what's new will tell you what's changed. I think you will like some of the changes!

ptList[duniform(1,numCandidates)]
· 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.

Perrine D avatar image Perrine D commented ·

Hi Cliff!

Does this code reduce the number of candidates?

Or does it only mix the order of the candidates who passed the test? (I 'm looking for this option)

It seems like the first option occured when I ran my model.

0 Likes 0 ·
Perrine D avatar image Perrine D commented ·

In fact, some of figures between 1 and numCandidates are choosen a multiple times and others never.

So the ptList has a random number of empty fields.

I'll try to find another way to pick random patients and keep the total number of selected patients… If you have other ideas, I take.

0 Likes 0 ·
Cliff King avatar image Cliff King Perrine D commented ·

I thought it would just pick one randomly ranked candidate patient to call the startactivity on. There's nothing being done to "marki" the patients who are chosen once, so maybe that's the problem. You may need to use another label as a way to flag/mark the patients chosen last time, if that makes sense.

0 Likes 0 ·
Perrine D avatar image Perrine D Cliff King commented ·

I thought too but yesterday, I found my simulation results very Strange..

I just find another way to do what I want (not with the patient selection scheme) but I will take a look at your advice when I have some time to think about it.

Thanks again for your help!

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.