question

Christopher S2 avatar image
0 Likes"
Christopher S2 asked Christopher S2 commented

How to calculate inter-arrival time at a conveyor decision point?

I feel like this is a simple question, but I am having difficulty solving it.

I have a power and free conveyor that has a set number of containers on it. They make a loop around the conveyor. I have a decision point on the conveyor, and I just want to detect the inter-arrival time between containers, in seconds, and display as a histogram. What statistic collector options do I need to use to do this? I tried to use intervals, but I can't figure out how to use the time from the last container. It tries to take the interval from the same container, resulting in a zero.

Decision Point:

Container OnArrival, start timer:

Waiting for next container, timer counting:

Next container OnArrival, stop counting on first timer, start new timer, display first timer result on histogram:

FlexSim 18.2.2
statistics collectorconveyor decision pointpower and free conveyor
1.png (191.2 KiB)
2.png (206.2 KiB)
1.png (191.2 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sam Stubbs avatar image Sam Stubbs ♦ commented ·

I'm not sure if this will give you exactly what you're looking for, but you could try using a Tracked Variable. When an item arrives set the first time to a global variable, then when the second item arrives set the second time to a global variable. Subtract the first time from the second, and save the result to a tracked variable. Then assign the first time as the second time (so the process repeats when the next item is coming in)

Then the Tracked variable can be charted, because it will keep a record of the previous time intervals recorded.

Is this along the lines of what you're looking for?

0 Likes 0 ·
Christopher S2 avatar image Christopher S2 Sam Stubbs ♦ commented ·

Hi Sam. Yes, that will work. Can you provide a brief overview of how to set that up? Do I need to do it in the process flow? Or can I do it from the Decision Point properties?

0 Likes 0 ·

1 Answer

·
Jordan Johnson avatar image
1 Like"
Jordan Johnson answered Christopher S2 commented

Here is a model that displays the histogram you want:

inter-arrival-histogram.fsm

The model is not too important, except that items flow past a decision point:

I made this model just as a demonstration, but the approach should work in your model as well.

First, I made a Process Flow, to help with statistics:

This token in this Process Flow listens to the Decision Point, and "remembers" the time of the previous item by storing the value on a label. Every time an item arrives, the token updates its label that stores the previous time.

But the previous time is only half the story. We still need to get the different between when two items arrive. This is where I used the Statistics Collector. I created the Statistics Collector, and I have it listen to the OnExit of the Wait for Next Arrival activity. When that event occurs, the simulation time will be the time of the next arrival, and the token will remember the time of the previous arrival. So the Row Mode is Add Per Event, because we want a new row every time the token exits the activity. The column subtracts the previous time from the current time, which is the inter-arrival time:

This Statistics Collector produces a list of inter-arrival times, which is perfect for a histogram. Here are the settings for the histogram:

And that should produce a histogram:


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Christopher S2 avatar image Christopher S2 commented ·

This is perfect. Exactly what I was looking for. Thanks for the thorough walkthrough!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.