question

Amy avatar image
0 Likes"
Amy asked Amy commented

Right approach to use offset in the source?

I've set up patient appointments by putting their reservation times into Time so that patients are created at those times. But I also want to create patients who come early, so I'm thinking of putting an empirical distribution into the offset. Is this the right approach?


screenshot-2024-03-29-at-112218-am.png

FlexSim 21.2.4
offset
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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Amy commented

No that field is just the offset before all the times start. You should use the DateTimeSource activity and the Offset field for each arrival:

1712571907540.png


1712571907540.png (26.6 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.

Amy avatar image Amy commented ·

@Jason Lightfoot Thank you for your answer.
If you insert -1*Empirical() into 'Offset / Variability', does it mean each generated patient will be created earlier than the given time? And it will vary for each patient, right?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Amy commented ·

It will be earlier if you give it a negative value. However if that is before the simulation start time then I believe the arrival is discarded so if you want those to be included you should use for example:


Math.max(0, uniform(-10,4,getstream(activity)))
0 Likes 0 ·
Amy avatar image Amy Jason Lightfoot ♦♦ commented ·

@Jason Lightfoot Does that mean, if the value is negative number it will be set to 0?


0 Likes 0 ·
Show more comments