question

Lenny C avatar image
0 Likes"
Lenny C asked Matthew Gillespie commented

How do i generate 1000 patients from 8AM to 6PM following a distribution?

Hi,

Assuming i know the distribution of patient arrival, is it possible to create these patients (eg 1000 patients) with interarrival rate following the distribution throughout the day from 8 AM to 6 PM?

Understand that i can set the number of patients arriving at different time of the day using Date Time source that is evenly spaced / randomly spaced / scheduled time. Is it possible to set it to a distribution instead, without generating the table outside of Flexsim (i.e using excel)?

For example using Date Time Source and changing the "Randomly spaced" to follow a distribution instead.

1632273318480.png

Thank you!

FlexSim 20.1.3
source scheduledistributioninterarrival times
1632273318480.png (43.9 KiB)
· 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.

David Chan avatar image David Chan commented ·

@Lenny C This is the exact solution to your question

David

1 Like 1 ·
Lenny C avatar image Lenny C David Chan commented ·
Hi David,

was wondering if it is possible to not use Randomly Spaced and instead, change it to a distribution (eg poisson distribution)

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Lenny C commented ·
Sure, but what would you gain. Your conditions set boundaries, which works against a distribution. You have a time limit. You have an event limit. A method would be to draw 1000 events of a distribution without any boundaries. Then you normalize the occurred events against your time interval. The result is, you have a sequence of events following a draw from a distribution. But if you test this draw against the deviation to the distribution, you might be disappointed, because the deviation is larger than expected and the draw fits better to another statistical distribution. The accuracy depends mostly on number of events and 1000 events are small against infinity.
0 Likes 0 ·
Ryan Clark avatar image Ryan Clark commented ·

Hi @Lenny C, was David Chan's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

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

@Lenny C What is your distribution?

If it's the number of time units after 8 AM that the patient shows up you could enter that into the Offset / Variability field.

If it's an inter-arrival time you can create a token at 8 AM that then goes through a loop of 2 steps until 6 PM:

  1. Delay for the inter-arrival time
  2. Create patient
· 3
5 |100000

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

Lenny C avatar image Lenny C commented ·
Thank you!
0 Likes 0 ·
Lenny C avatar image Lenny C commented ·

If i have 1000 patients entering with interarrival rate following a distribution (1 after another), may i know how i can do so?

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Lenny C commented ·

The attached model creates 1000 patients with an inter-arrival time distribution spacing them out.

1000Patients.fsm

It just has a token looping around and waiting the inter-arrival time and then creating the patient. After doing this 1000 times it goes to a sink.

1632760517626.png

0 Likes 0 ·
1632760517626.png (13.0 KiB)
1000patients.fsm (43.2 KiB)

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.