question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Arun Kr answered

How to tackle -ve values from distribution without impacting mean value?

Hi Team,

I observed that whenever lognormal distribution is throwing negative values, it is picking the 0 value for repair time which is not possible in real system.

1735323970666.png

I would like to filter the 0 values from the table. But my concern is that it will impact the mean value of distribution. What are the other ways to handle this problem?

Breakdown_Count_Reps.fsm

Thank you!

FlexSim 25.0.0
distributionvaluesnegative
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

Arun Kr avatar image
0 Likes"
Arun Kr answered

Try avoiding -ve or zero values in the MTTR value by modifying the code using a while loop.

  1. double repairTime = -1
  2. while (repairTime <= 0) {
  3. repairTime = lognormalmeanstdev(84.13, 110.3, getstream(current));
  4. }
  5. return repairTime;

If this is not is acceptable try some minimum repair time when the repair time becomes less than or equal to zero.

  1. double repairTime =lognormalmeanstdev(84.13, 110.3, getstream(current));
  2. if(repairTime <=0)
  3. {
  4. repairTime = minRepairTime;
  5. }

Regards,

Arun KR

5 |100000

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