question

Ismael R3 avatar image
0 Likes"
Ismael R3 asked Jason Lightfoot commented

error with empirical distribution

HELLO, I'M TRYING TO MAKE ORDERS OF DIFFERENT QUANTITIES BE ASSEMBLED IN FLEXSIM THROUGH A SEPARATOR. But when I run the empirical distribution inside the separator I get errors, I am not sure, if I am placing the empirical correctly or, if it is simply not an error, you could help me by checking it. I attach the model.

FlexSim 21.0.0
flexsim 21.0.0empirical distribution
· 2
5 |100000

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

Ismael R3 avatar image Ismael R3 commented ·

source-different-quantities.fsmHellow , I have see that the colum 1 it taking the numbers as integers , but I have changed that and it continous having the same error . Here I attach the model with the new distribution and also de distribution in excel, if you can help ejemplo.xlsxme please.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Ismael R3 commented ·

Have you thought about dempirical? Most often you run into problems, when you hope a indirect cast from floating values into integer rounds as you expecting it.

And if you like, here is an older thread discussing rounding in FlexSim

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot commented

The first part of the problem is that your pasted column didn't preserve the decimal point so it didn't add up to 100.

Second is that you tried to mix the new Emprical class use with the Global Table that the function d_empirical used to use.

Attached is a model showing both approaches with your data along with the new Emprical Tool's distribution.

You access it via the toolbox '+' adding tool and find it here:

source-different-quantities_jl.fsm



· 2
5 |100000

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

Ismael R3 avatar image Ismael R3 commented ·

Thanks for the model! I'ce only a question. Does it exist any difference if I use the new approach or the last one ?, because I was looking to it and I see that there is some kind of different behavior. Does it start with a differente seem in the randomness or something like that?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Ismael R3 commented ·

In the example the two processes use a different random number stream, so yes you'll see a different sequence..

0 Likes 0 ·