question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Jason Lightfoot edited

Random errors in model related to statistical distribution?

Hi Team,

I started facing these errors suddenly without making any changes in model.

1691133440926.png

Can you help me to understand the cause and how to avoid it?

Thank you!

FlexSim 23.1.2
breakdownstatistical distribution
1691133440926.png (21.2 KiB)
· 1
5 |100000

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

Julie Weller avatar image Julie Weller commented ·

Hi @Ankur A3, was Nil Ns's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Nil Ns avatar image
1 Like"
Nil Ns answered Jason Lightfoot edited

Hello,

It seems that the error is occurring due to the distribution being used. It appears that the distribution is generating a negative number, which results in a negative wait time being requested (which is clearly impossible). There are several ways to solve this issue, such as changing the distribution, but the easiest solution would be to use Math.max to ensure that the wait time is never negative.

Exemple:

Math.max(0, normal(10.0, 2.0, getstream(activity)))

Best regards

· 12
5 |100000

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

Ankur A3 avatar image Ankur A3 commented ·
Hi @Nil Ns,

Thank you for your response!

I would like to ask that I am using a same distribution in the model since 1 month but these errors are populated only today.

Any specific reason to it?

Thank you!

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Ankur A3 commented ·

Update: I recommend using an updated getstream function as described and attached here.

Previously:

I recommend using the stream of the downobject rather than the breakdown object itself - that way the breakdowns are independent, and adding more objects to the breakdown will not affect the timing of those that were already members. The same for sampling distributions inside object process flows - consider replacing getstream(activity) with getstream(current).

1 Like 1 ·
Ankur A3 avatar image Ankur A3 Jason Lightfoot ♦ commented ·

Hi @Jason Lightfoot,


Thank you for the response!

Trying to understand that what to use in place of getstream(current)

1691146548604.png

Do you mean the object name directly?

1691146702602.png


getstream(Model.find("Processor1"))

Please confirm on this.

Thank you!

0 Likes 0 ·
1691146548604.png (2.5 KiB)
Show more comments
Nil Ns avatar image Nil Ns Ankur A3 commented ·

Hi @Ankur A3 !

One possible explanation for the errors you are seeing could be related to the “repeat random streams” setting. If this setting was active during the past month, it would have caused the model to use the same seed each time it was run. By chance, this seed may not have resulted in any errors. However, if the setting has now been deactivated, the model may be using a different seed that does result in errors.

If this is not the case, it is possible that even a small change, such as moving an object by a few millimeters or running the model on a different computer, could cause the seed to be different.

If the issue is not related to the seed, I would suggest checking the values of the distribution to make sure they are correct. Incorrect values could result in a higher probability of negative numbers and therefore errors.

I hope this helps!

0 Likes 0 ·
Ankur A3 avatar image Ankur A3 Nil Ns commented ·
Thank you @Nil Ns for the explanation!

Got some idea on it.

0 Likes 0 ·

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.