question

Cody F avatar image
0 Likes"
Cody F asked Ben Wilson answered

Can you set upper/lower limits within a distribution?

I am running an assembly line simulation and have approximate times for operator work at each station. I am instructed to use Lognormal distribution to run throughput and station/operator utilization. Is it possible to set upper and or lower limits to the distribution selections within a delay command? I am getting results at up to 3x the time per station that it should take on average and that skews my data to be inaccurate. Kind Regards,

FlexSim 22.1.2
distributiontiming
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

Ben Wilson avatar image
0 Likes"
Ben Wilson answered

You can use the Math.min() and Math.max() methods to bound the value returned from your distribution.

Here is a small example script you could test and tweak within a script window, then apply the same logic to where you're using your distribution:

double minValue = 8.5;
double maxValue = 10.8;
double distValue = lognormal2(0, 10, 0.2);
return Math.max(minValue, Math.min(maxValue, distValue));
5 |100000

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