Felix Möhlmann avatar image
Felix Möhlmann posted Felix Möhlmann edited

Utilization vs Time Statistics Collector

Utilization-Vs-Time-Collector-Library.fslHi everyone,

recently @Arun Kr posted this idea to add a utilization vs. time chart to the available chart types in FlexSim. I had previously build a relatively easy to set up Statistics Collector for use in our models. I have since cleaned up the design a bit and thought to post it here, since this seems to be a commonly desired feature.


All necessary setup is done through labels of the collector. The first three are actually identical to labels found on the default Statistics Collector behind a state bar chart.


- Objects should point at a group that contains all objects the collector should track the utilization for.

- StateTable is a reference to the state table that will be used to determine which state counts as 'utilized'.

- StateProfile is the rank of the state profile that should be read on the linked objects (0 for default state profile).

- MeasureInterval is the time frame (in model units) over which the collector will take the average of the utilization.

- NumSubIntervals determines how often that measurement is actually taken. In the example image above (and the attached model) the collector measures the average utilization over the last 3600s 12 times within that interval of every 300s. Each meausurement still denotes the utilization over the complete "MeasureInterval".


The graph on the left takes a measurement every 5 minutes, the one on the right every 60 minutes. Each point on both graphs represents the average utilization over the previous hour from that time point in time.

- StoredTimeMap is used to allow the collector to correctly function past a warmup time, by storing the total utilized value of each object up to that point. This should no be manually changed. Since this last label has to be automatically reset, remember to save any changes made to the other labels by hitting "Apply".

The collector works by keeping an array of 'total utilized time' value for each object as row labels. Whenever a measurement is taken, the current value is added to the array and the oldest one is discarded. The difference between the newest and oldest value is used to calculate the average utilization over the measurement interval. The "NumSubIntervals" label essentially just controls how many entries are kept in that array.

To copy the collector into another model you can create a fresh collector in the target model. Then copy the node of this collector from the tree of the attached model and paste it over the node of the fresh collector.

I hope this can help to speed up the modeling process for some people (at least until a chart like this is hopefully implemented in FlexSim) or serve as inspiration for how one can use the Statistics Collector.

I might update the post with a user library version if I get to creating it (and if there is demand for it).

Best regards


Edit: Added user library with the collector as a dragable icon to the attached files.

statistic collectorutilizationutilization vs time
· 7
5 |100000

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

Maryam H2 avatar image Maryam H2 commented ·

Hi @Felix Möhlmann

This feature is super useful, and it'd be even better if it was just a built-in chart in the menu, instead of having to set it up ourselves. I always needed this chart for models I'm working on. I've got a couple of questions. First, how much would a stats collector like this slow down a medium to large model? Especially considering there are like 30-40 objects in the group and we're running the model for one month.

Also, does this stats collector work for floor storage objects or other types of storage objects? Basically, can it track how long items have been sitting on the floor storage over time?


0 Likes 0 ·
Arun Kr avatar image Arun Kr Maryam H2 commented ·

You can vote this idea.

2 Likes 2 ·
Felix Möhlmann avatar image Felix Möhlmann Maryam H2 commented ·

As long as the collector is used 'reasonably' (not measuring utilization every couple seconds) the performance impact while the model is running should not be noticeable. I just ran a test by adding 40 processors to the example model. The State Gantt chart uses quite a lot more resources for example (because the state changes much more often, the impact per measurement is about the same).
You will experience a slowdown though if you watch the chart being drawn during the simulation run. But that is the case with any somewhat frequently updated line chart generally.

The collector uses the object's states to calculate the utilization (time spend in 'active' state vs total simulation time. Storage objects do have a state profile but don't usually use it. If you manually set their state to reflect certain statistics you could use the collector. To measure fill levels and/or staytimes there is already a large variety of charts available though.


0 Likes 0 ·
capture1.png (9.8 KiB)
Maryam H2 avatar image Maryam H2 Felix Möhlmann commented ·

@Arun Kr I did upvote idea yesterday.

@Felix Möhlmann How I can change the state of floor storage to "active" when there is a content on them? I've used Content vs Time and Stay Time but charts like the one below does not give me good insight on utilization if not processing the excel file.

I looked at the documenrtation which says:


The Floor Storage does not implement any states. Use the content graph to get statistics.


0 Likes 0 ·
1708532541232.png (183.9 KiB)
Show more comments
Marcello Rosadini avatar image Marcello Rosadini commented ·

Thank you Felix. You just saved me a bunch of time on a project!

0 Likes 0 ·


Contributors contributed to this article

Related Articles