question

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

Sampling delay times from empirical distributions by hour of the day/week

How can I read the delay time from an empirical distribution for each hour of the week? The data is organized with varying sample sizes for each hour, ranging from 0 (Sunday 12 AM) to 48 (Monday 12 AM). Each sample corresponds to a delay time, and we want to sample delay times from this empirical distribution for each hour of the week.

It's possible to separate days of the week but then is it possible/easier to read the data for each weekday by the hour from an empirical distribution, again at each hour we have an unequal number of samples and we want to sample from this distribution.

The data is in the GlobalTable1 in the model attached here.

Thanks

samplingbyhouroftheweek.fsm

FlexSim 23.2.0
flexsim healthcareby hourempricalsampling
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

Jeanette F avatar image
0 Likes"
Jeanette F answered Maryam H2 commented

Hello @Maryam H2,

An Empirical Distribution for an hour of a day will need to be its own table, so from your data we have created a Table for each as a Cell in a table.

1701717681496.png

The Table's first column needs to be the weight distribution and the second column is the value. We assumed an even distribution and calculated it so. Here is the Table for Hour of Week 0;

1701718029508.png

You can then reference that Cell of the Table for the Empirical Distribution for that hour.

  1. empirical(Table("GlobalTable2").cell(Model.dateTime.hour, 2))

samplingbyhouroftheweek_1.fsm


· 10
5 |100000

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