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

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

christopher_s2
Not applicable
502 Views
4 Replies
Message 1 of 5

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

christopher_s2
Not applicable

[ FlexSim 18.2.2 ]

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:

14870-1.png

Container OnArrival, start timer:

14871-2.png

Waiting for next container, timer counting:

14872-1.png

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

14871-2.png

0 Likes
Accepted solutions (1)
503 Views
4 Replies
Replies (4)
Message 2 of 5

sam_stubbsYXX86
Community Manager
Community Manager

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
Message 3 of 5

christopher_s2
Not applicable

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
Message 4 of 5

JordanLJohnson
Autodesk
Autodesk
Accepted solution

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:

14883-inter-arrival-model.png

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:

14884-inter-arrival-flow.png

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:

14885-inter-arrival-collector.png

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

14886-inter-arrival-histogram-settings.png

And that should produce a histogram:

14887-inter-arrival-histogram.png

.


Jordan Johnson
Principal Software Engineer
>

Message 5 of 5

christopher_s2
Not applicable

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

0 Likes