# Distribution Pattern Dialog

The Distribution Pattern Dialog enables values and times with random variation to be generated. For example the time a Multi-server takes to handle an item, or the inter-arrival time of items produced at an Entry.

Distributions are listed on the left. Fields appear depending on the distribution selected.

All distributions also include a truncation/rounding option button and a final scaling factor. Truncation/rounding is applied first, then scaling on the resulting number.

Truncation/rounding is useful where specific values are needed, for example when using a distribution to select between options.

Scaling is useful where the distribution might not change but needs to be adapted in continuous or batch processing situations.

Fixed Value | Value | No variation, returns a single value. |

Equally Likely | Mean Range */- |
Uniformly distributed values centred on the mean. |

Equally Likely (Min/Max) | Minimum Maximum |
Uniformly distributed values ranging from minimum to maximum. Note that the maximum value will always be < maximum by either 1/32768 or 1/4billion, depending on the random generator selected in the model Engine options. |

Triangular | Minimum Mode Maximum |
Distribution shaped like a triangle with its peak at mode and probabilities decreasing to zero at Minimum and Maximum, keeping the value constrained. |

Bell Curve | Mean StdDev |
Normally distributed values with a distribution that looks like a bell. The standard deviation value determines the amount of variability. 95% of all values drawn will be within 3 standard deviations from the mean. |

Log Normal | Mu Sigma |
This is a distribution where the logarithm of the random values is normally distributed. It is used in cases where many random factors multiply together, including finance and communications. |

Random Delays | Mean | This is the Negative Exponential or Poisson distribution and characterises the number of events that will occur over a period of time if the probability of each event is random and independent. It features a long tail of decreasing probability of occurance. |

Erlang | Mean K |
This characterises the time between independent events (eg: arrivals). It is actually the sum of 'K' random delays. |

Weibull | Minimum Scale Shape |
This distribution has a minimum and is often used to characterise equipment breakdowns. |

C.D.F. Table | Table | This uses a table enabling any distribution of values to be generated. The reference must point to a "accumulating probability" column in a table where the first row cell is 0 and subsequent rows increase until the final row which must have a 1.0. PL uses a uniform (0..1) draw and locates the row where that probability lies. The value in column 1 is then returned. If the value was between rows, interpolation is used. This results in a continuous distribution of values. |

Point Freq. Table | Table | This uses a table to define discrete values and their probabilities. The table reference points to a column of probabilities. The sum of all the probabilities in this column must be 1. A uniform (0..1) draw is made and the row (bin) within which that draw lies is found in the table. The corresponding value in column 1 is returned. There is no interpolation. This results in discrete values, corresponding to the values in column 1 of the table, occuring at probabilities as set in the probability column. |

The Truncation / Rounding button selects either round (to closest integer) or truncate (remove fraction) operation. For times, more options appear enabling truncating/rounding a time (always in seconds) to the nearest second (1, same as unit but included for clarity), minute (60), hour (3600) or day (86400).

For example:

Round Unit 3.7 = 4

Truncate Unit 3.7 = 3

Round Hour 3500 = 3600 (would display as 1:00 00 in a time formatted view)

Truncate Hour 7100 = 3600 (1:00 00)

Preview Button

Generates a graphical view of the values which would be generated using the current parameters. In cases where non numeric references are used, a preview cannot be generated. You can code your model to log the values in a table and process them to generate a graph.

Random Streams

Distributions draw upon a specific generator of basic random numbers and you are able to alter the stream number setting. Normally all random values (including ones Planimate uses internally eg: for probability switches) draw from stream 0.