question

Troy M3 avatar image
0 Likes"
Troy M3 asked Ben Wilson commented

Create Labels Chronologically by Percentage

I'd like to assign a label to a batch of patients based on a percentage in chronological order. For example, if I have 100 patients I want to assign the first 25% the label "A" while the remaining 75% default to the label "B". Eventually I'd also like to be able to assign patients between 25-50% label "A" while patients 0-25% and 50-100% default to label "B"


Currently I can do this by creating a label and setting the Value to 'By Percentage' but that assigns the label randomly to 25% of the patients. I'd like to do this chronologically so the first % get label "A" and the remaining get default label "B"

FlexSim 20.1.3
flexsim 20.1.3label
· 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @troy.m3, was joerg.vogel's answer helpful? If so, please click the red "Accept" button on their answer. Or if you still have questions, add a comment and we'll continue the conversation.

0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

You want to assign a label another value rather than the default to patients starting randomly in the range of first and 75th patient. After the value has changed the next 25 patients get the same value. If there are arriving more patients, they get the default value again.

I set a label at process flow to set after which patient the group has to start. In my current model it is fx number on reset, later it is chosen randomly.

When the patient arrives at the waiting line I compare his number of arrival with the starting number of the current group cycle. Then a next patient belongs to the group of changed label values. random_group_of_25.fsm


5 |100000

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

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.