question

Sebastian Hemmann avatar image
0 Likes"
Sebastian Hemmann asked Jordan Johnson edited

Empirical Distribution returns "unknown values"

Hi,

in the model: "Empirical_Bug_2022-2-1.fsm" I´ve implemented a weighted discrete Empirical distribution. I used it in another model and it throwed some exceptions. As far as I already figured out it is returning "unknown value" from time to time. empirical-bug.png

What am I doing wrong?

Empirical_Bug_Flexsim22-2-1.fsm.png

just erase the .png

FlexSim 22.2.0
empirical distribution
· 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.

Ralf Gruber avatar image Ralf Gruber ♦ commented ·

Line 7 shows a weight of "0.00". Can this cause the problem?

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Ralf Gruber ♦ commented ·

The issue seems to be caused by weight values 0 < x < 1.

The distribution in the screenshot below returns 2 most of the time and very rarely "unknown type". It looks like the row from which the value is returned somehow increases by 1, so 2 is returned instead of 1. And if the second/last row should be returned the row number becomes out of bounds.

1661410434429.png

1661410483430.png

0 Likes 0 ·
1661410434429.png (29.6 KiB)
1661410481383.png (7.2 KiB)
1661410483430.png (7.2 KiB)
Sebastian Hemmann avatar image Sebastian Hemmann Ralf Gruber ♦ commented ·
No, I´ve changed the value and it still happened. Also a 0.00 should be a valid weigth.
0 Likes 0 ·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Jordan Johnson edited

This looks like a bug. It is caused by improperly handling non-integer weight values. I'll add it to the dev list.

5 |100000

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

Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered Sebastian Hemmann commented
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·
Or this one which suggests it uses integer values.
0 Likes 0 ·
Sebastian Hemmann avatar image Sebastian Hemmann Jason Lightfoot ♦♦ commented ·
Am sadly not allowed to see this.
0 Likes 0 ·
Sebastian Hemmann avatar image Sebastian Hemmann commented ·
Hi @Steven Hamoen it´s looking a bit different but anyhow if it is the same issue it was not solved in this release.
0 Likes 0 ·