Usig labels and normaldistribution

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
Natascha
Posts: 6
Joined: Thursday 19 January, 2012 - 10:37

Usig labels and normaldistribution

Post by Natascha »

I tried the following in a multiservieatom for the cycletime, but it dosn´t work :cry:

Normal ((Label[....],last(c)),120)

The first paramter should be a label and the second paramter a firm value. And the labels were defined in a source at the beginning of the programm.

For example the label has the value 1000. Then the normaldistribution should create values betwenn 880 and 1120.

However, my evaluation shows also values who aren´t within this range.

Can anybody help me, or explain the mistakes :)
MarvinH
Posts: 93
Joined: Tuesday 25 January, 2011 - 11:07
Contact:

Re: Usig labels and normaldistribution

Post by MarvinH »

Hello!

The normal distribution has no certain minumum or maximum value. Although the probability of very large or small values is small, it is possible that these values are drawn.

In case you want to provide a minimum or maximum value, there are two options. The first option is to choose another distribution, like Uniform, dUniform, Triangular or TriangularTop. Please refer to the Help file for more information about these functions and required parameters. The second option is to script your minimum and maximum yourself. For example, use the following code:

Code: Select all

Max(880, Min(1120, Normal( Label([...], Last(c) ), 120 ) ) )
Note that by using the script, the results are not exactly normally distributed anymore, because the distribution is truncated at both sides.

Good luck!
Post Reply