question

Maryam H2 avatar image
0 Likes"
Maryam H2 asked Matthew Gillespie commented

Offset/Variability Distribution

Hi there,

I am working on a model and have XXX patients arrive based on their scheduling time. To apply a lag between their appointment time and their arrival time which shows if the patients are early/late/On time, I apply the distribution loglogistic(-80.23, 86.59, 8.9, getstream(activity)) As an Offset in the arrival table. Based on two runs, I see the arrival times somehow do not follow this offset distribution. The distribution is derived from the historical data but the results from the simulation runs (arrival times) do not match with the dataset. For Example, the proportion of early patients in the dataset is ~ 70% but in the simulation runs the proportion of early patients is~40%.

Does anybody know how it can be explained?

Thanks!

FlexSim 22.0.0
distributionsoffsetvariability
· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·

Out of a sample size of 1mio, your chosen distribution returns a negative value around 33.6% of the time for me. If the goal is to have ~70% early patients it seems the distribution does not fit the data well enough.

0 Likes 0 ·

1 Answer

·
Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Matthew Gillespie commented

I don't know how you got that distribution, but it's not going to give you a 70% early ratio. You can see in the attached model that if you generate 10,000 samples from that distribution you usually get about a 34% early ratio.

PercentEarly.fsm

Just open the model and hit the run button on the script.


percentearly.fsm (25.9 KiB)
· 5
5 |100000

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

Maryam H2 avatar image Maryam H2 commented ·

@Matthew Gillespie Thanks for the answer!

I got that distribution by finding the best fit for the early/late arrival data, In the dataset the early vs. late arriavls are 64% vs. 33%, respectively.

Please see pic below which suggests the best fit would be that distribution:

1638988910205.png

I set this up in the Offset and think those are pretty close:

1638989169517.png

Here, negative values mean late and positive values mean early arrivals. Did you mean the same by 70% early?


0 Likes 0 ·
1638988910205.png (29.9 KiB)
1638989169517.png (13.9 KiB)
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Maryam H2 commented ·

@Maryam H2 In the Offset/Variability field a negative value means before the arrival time (i.e. early). If your data had negative values as late values then you should put a negative in front of your distribution to flip it around to what the Offset/Variability field is expecting.

1 Like 1 ·
Maryam H2 avatar image Maryam H2 Matthew Gillespie ♦♦ commented ·
Oh, got it! Thanks.
0 Likes 0 ·
Show more comments

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.