Cancel
Showing results for
Did you mean:

# How to change the number of entities in a batch according to a known statistical distribution

Pioneer

Hello, I want simulate the arrive to the factory of good pieces and pieces with mistakes. However, the number of pieces with mistakes oscillates between for example 0-4 in a determined batch of 25 pieces. So, we have a batch of 25 pieces and the pieces with mistakes oscillates between 0-4 with a known percentage for every number of mistakes per batch for example:

0 pieces with mistakes: 40%

1 pieces with mistakes: 30%

2 pieces with mistakes: 15%

3 pieces with mistakes: 10%

4 pieces with mistakes: 5%

In order to solve this I have thought to create 2 types of entities (Good and Mistake) and to establish the creation of the entities with a source in Sequence MU selection and linked to the table like this:

MU                                   Number                         Name                            Attributes
.MUs.Good                            xx

.Mus.Mistake                         xx

The problem is: how to change with a method the number of good and mistake per batch according to the percentages previusly presented?

2 REPLIES 2

# Re: How to change the number of entities in a batch according to a known statistical distribution

Solution Partner Phenom

Hi,

It is possible to do it without a method. In the number column you can define formulas. For row 1 you could write "Good" in the column Name and the following the Number column:

`z_uniform(1,20,25)`

and in the second row "Mistake" for the Name and the following formula in the Number column:

`25-@[2,1]`

This generates batches of 25 units compose of some good and bad parts.

This is a simple example to get some understanding. You can replace z_uniform with z_dEmp (look it up in the Help-file) to get the more exact percentages.

Gert Nomden
Digital Factory Consultant
cardsplmsolutions.com

# Re: How to change the number of entities in a batch according to a known statistical distribution

Pioneer
Thank you very much Nomden it works with the z_dEmp function in formula mode