Uniform Distribution and Unpacker

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
Insider
Posts: 2
Joined: Thursday 05 May, 2011 - 23:02

Uniform Distribution and Unpacker

Post by Insider »

Hello,

I have two problems! First of all, I'd like to generate a random value that is uniformly distributed between 1 and 90. I'm using Uniform(1,90) and I have tried out quite a few simulation runs, but the source does never generate more than 20-30 products ever. What am I missing?

Secondly, I also have a label-problem. Every product gets a label with a value from 1-3 (depending on the destination - 1 for the first unpacker etc.)! Afterwards, 1 to 3 assemblers, depending on the amount of products, put a maximum of 30 products on a container. Those containers take off to three different unpackers that are placed in row. Now I'd like to unpack the exact amount of products by referring to the value of the label: (Unpack quantity)

Code: Select all

-
The problem is that it seems like the unpacker unpacks randomly. So therefore, when the container arrives at the second unpacker, there are still products with a label value of "1" even though those were supposed to leave the container at the first unpacker!
How can I possibly solve this situation?

Thanks :)
Last edited by Insider on Saturday 07 May, 2011 - 01:31, edited 1 time in total.
MarvinH
Posts: 93
Joined: Tuesday 25 January, 2011 - 11:07
Contact:

Re: Uniform Distribution and Unpacker

Post by MarvinH »

Hello Insider!

The problem with the number of products generated can be caused by two different reasons.

The first might be that the atom behind the source is full/busy, so the source cannot release its product. In this case, "!!!" appears at the source and possibly the number of products you expected to be created is not reached within the time frame of your simulation. To solve this, increase the capacity of the atom behind the source.

Another reason might be that you've placed your Uniform(1, 90) statement in the "Number of products" field of the source. This field is evaluated (and thus executed) every time after a product is created. So after a product is created, there is checked whether another product should be created. This results in comparing a drawing from your distribution with the number of products currently created. So probably after 20 or 30 products, the drawing is below the number of products created and no more products are created. To solve this, set the number of products to be created by use of a Initialize atom. Connect the first input channel of the Initialize atom to the central channel of the source and put the following code on the "Initialize code":

Code: Select all

Do(
   Att([MaxProducts], In(1, c)) := dUniform(1, 90)
)
Please check the "On reset" checkbox to make sure that each run another value is drawn.

Your second problem probably has to do with the way the products are placed on the container. The Unpacker gets the products from the container in a LIFO way, i.e. the last products are taken off first. If your products are placed on the container in a random order (e.g. the first product has label 2, second has label 1, third has label 3 etc), the products taken off the container do not have to match the labels. To solve this, make sure the products on your container are sorted the way you want them to be taken off the container. This can be done by putting them on the container in a sorted way (i.e. first place the products with label 3, then products with label 2 and finally products with label 1 because these should be taken off first), or sorting the products within the container when the enter the first Unpacker.

I hope this solves your problems.

Regards,

Marvin
Insider
Posts: 2
Joined: Thursday 05 May, 2011 - 23:02

Re: Uniform Distribution and Unpacker

Post by Insider »

Both problems are solved! Everything is working perfectly so far! Thank you so much for your help!!
Post Reply