How to track time between two points?


Could you please help me?

I have a batch of items (cylinders, eight pieces), that i want to track. I want to know the total time that it takes for this process to complete.

How can i track the time from the moment i start the simulation (spawn the cylinders) to the point that i ditch them to sink?

Something like ”It takes 45 minutes for this cycle (all four machines) to go trough all cylinders”.

I have been thinking the best way and i just KNOW that there needs to be a way to measure Spawning of an items to sinking items- time, i just dont know how?

This is my school assignment, i need to track using time, which method is faster, single operation or batch operation on 8 cylinders through all these machines.


Count the arrived products in the sink process and use the Halt statement to stop simulation once certain number is reached?

Or if you want to measure how long it took for each product to go through your layout, you’ll need to use timestamps in the product instances.
See here: Painting line simulation - #4 by TSy

I have a working calculator now, but it wont stop the timer. I need to sleep now, super tired with this… Frustrated. Could you please tell me what am i doing wrong? It counts to 16, process stops due to an error and simulation goes on.

At least I think you need to have a loop within the Sink process that contains the TransportIn and If statements. This is because your “Laskuri” variable will get reset to 0 every time the Sink process starts. This reset to default value is done for all routine variables.

Alternatively you could add your “Laskuri” variable as a component property instead, which can be used similarly in the process but doesn’t reset automatically. Your would need to implement logic to reset that at simulation start, though.

Also even simpler way to do this for a fixed count of products would be to use TransportPatternIn statement in the Sink process, and then just Halt after that completes.