Store total processing time in global table

Store total processing time in global table

an_lam2
Not applicable
176 Views
3 Replies
Message 1 of 4

Store total processing time in global table

an_lam2
Not applicable

[ FlexSim 19.2.4 ]

elapsed time.fsmHi, I would like to ask for some help. How do I record the total process time of each item type in the global table? I'm using a statistical distribution and I want to get, for example, the output of 20 boxes and increment the process time it use in the global table.


Example:


ItemType1: Box1 processing time 20 sec, Box2 processing time 22 sec... by incrementing i will get the total processing time of each itemtype.


1691200018224.png


How can I achieve this? thank you for answering.



0 Likes
Accepted solutions (1)
177 Views
3 Replies
Replies (3)
Message 2 of 4

carter-walch
Not applicable
Accepted solution

Hi @Aries Vash ,

elapsed-time.fsm

I followed the same logic you did in your On Exit Trigger of the Queue to increment the Output. To do the same for the item staytime, you can reference the staytime of the last item that passed through the processor with:

Model.find("Processor1").as(Object).stats.staytime.value

I put this in an On Entry Trigger of the Queue, because at the On Exit event of the processor, the staytime value had not yet updated.

1691250232409.png

I demonstrate in this gif the processing time being incremented for each type as I step through the model. The Model runtime on top shows it is accurate.

increment.gif

Hope this helps!


Message 3 of 4

an_lam2
Not applicable

Sweet!!! Thank you so much for the answer, this works the way I need it.


Also just to add I've done some searching from older question while my question here is not answered yet.


its seems that it can also reference from:

getitemvar(item, 2)

1691282940202.png

in the processor to increment the total processing time the way you did with the queue on entry

 Model.find("Processor1").as(Object).stats.staytime.value


Overall thank you!!



Message 4 of 4

carter-walch
Not applicable

You're welcome!

Yes that's another great way to access the processing time, glad it worked out!
0 Likes