question

Steven Hamoen avatar image
1 Like"
Steven Hamoen asked Jordan Johnson answered

New Empirical function: Bug or By design

Hi Guys,

If I have the following Empirical Distribution:

empiricaldistribution.png


If you sample this, the values 3,4,5 and 6 are still created, while the value 2 is never created. It might look a bit strange but if you are testing a few things it is easier to change the weights than to change the table all the time and it was working with the previous table version. I also attach a simple PF test model. Is this a bug or by design?

Empirical Distribution Example.fsm

FlexSim 22.0.1
empirical distributionweights
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

·
Jordan Johnson avatar image
1 Like"
Jordan Johnson answered

This is a bug, for sure. I'll add it to the dev list. It seems like a mismatch in weight and value.

Let me also elaborate on some analysis I did. I made a stats collector that created 10k rows (listen to an event on reset, set the row value to Array(10000)). Then I added a column that sampled the emperical distribution. So on reset, it samples it 10k times.

Then I made a calculated table with this query:

SELECT Sample, COUNT(*) FROM StatisticsCollector1
GROUP BY Sample
ORDER BY Sample

Which produced the following table:
1646174426073.png

So the error is that 2 is not being created when it should be, and 6 is being created when it should not be.

In any case, this is most certainly a bug, and we'll get it fixed.


1646174426073.png (6.6 KiB)
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.