Generic Monitor count

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
Benjamin AAU
Posts: 2
Joined: Friday 11 May, 2012 - 09:18

Generic Monitor count

Post by Benjamin AAU »

Hi I have a little problem with my semester project.

The problem is that the queue may not get above 15, but I would like to know the lost products caused by the queue capacity.
Right now i can only count the lost time, but I would really like to know the numbers of products instead.
I have tried hooking the Generic Monitor up to the Queue atom, and increasing the capacity of the queue to 100. Then I could see that the Queue got above 15. It is an 10 hour simulation, so by counting every time it gets above is a long process.

I would like to know if is possible to get the Generic Monitor only to count if the Queue is above 15.

Thanks for making such a good program :)

Hope to hear from you
Benjamin Andersen
GBE Aalborg University
MarvinH
Posts: 93
Joined: Tuesday 25 January, 2011 - 11:07
Contact:

Re: Generic Monitor count

Post by MarvinH »

Hello Benjamin!

You can put a sink next to the queue where the products are waiting, call this sink LostProducts. I assume the queue is filled by a source. Now on this source, connect the second output channel with the input channel of the LostProducts sink, and select SendTo statement "2. An open channel (First channel first)" on the source. This way the source tries to send products to the queue as long as possible, but when the capacity (of 15) is reached, the products are sent to the LostProducts sink.

Obviously you can connect a monitor to the LostProducts sink to determine when the products are entering.

In case this does not work out for you, please feel free to return to this topic again.

Kind regards,

Marvin
Benjamin AAU
Posts: 2
Joined: Friday 11 May, 2012 - 09:18

Re: Generic Monitor count

Post by Benjamin AAU »

Thank you very much.

I forget about Sink.

Benjamin Andersen
Post Reply