Age of Product

All topics on the Atoms in any Enterprise Dynamics Library.
Post Reply
EikeB
Posts: 7
Joined: Wednesday 15 April, 2015 - 17:34

Age of Product

Post by EikeB »

Hey,

I would like to see the Age of an Product that runs through my system. I know i could use Age(i) but the Problem is that Products wait in a Queue before they enter the "real" System and i don't want that waiting time.

Is there a way to set the Age back to 0 when the Products exit the Queue or an alternative possibility ?
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Age of Product

Post by HarryBunnik »

Ha EikeB,

No, you can't set the Age of an atom to 0. I would suggest you use a label, which you set on the product itself, to keep track of the age of your product. So something like

Code: Select all

Label([AgeOfProduct], i) := time

on the OnExit of the queue and use that same label on the OnEntry of your Sink (or any other point where the product is passing, to calculate it's age.

Code: Select all

Time - Label([AgeOfProduct], i)
I hope this helps you further,

Cheers,

Harry
Post Reply