question

Ashwath M avatar image
0 Likes"
Ashwath M asked Kavika F commented

Matching Label name in Statistics Collector data

Hello,

I'm exploring the statistics collector more and had a question. I'm having a source that creates items having a "type" label which is a string. The floe items go through a processor and I'm trying to have a statistics collector record the Process time against the correct type. I'm looking for the best & easy way to do this : The Process time should be updated against the correct row of Type. Ex: If TR5 exits the processer first, the Process time for TR5 should be updated against that row. Attached is the example model. Thanks in advance!

StatisticCollector_Example.fsm


1678750017557.png

FlexSim 22.0.11
flexscriptlabelsstatistics collectortablesstatisticcollector
5 |100000

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

1 Answer

Kavika F avatar image
0 Likes"
Kavika F answered Kavika F commented

Hey @Ashwath M, I think this is what you're looking for: statisticcollector-example_1.fsm

You were close with the setup, just a few things to tweak. Here is some advice for using Statistics Collectors in the future.

If you want to keep data about the same object or flowitem on the same row, then you can add a "Row Value". It acts as an underlying unique ID to reference that row.

1678752452704.png

1678752459950.png

I changed the second event from being "Processor1 - On Exit" to "Queue2 - On Entry". I think something was happening to where the Processor's staytime Tracked Variable wasn't being updated until after the flowitem exited, so you were getting 0.00 processing time for your first flowitem. If we change it to look at the Queue (and keep the ptime equation the same), then it will grab the right numbers.

You can bind Events and Columns together (so you only update certain values when certain events happen).

1678752428994.png

1678752435557.png

Here's what it looks like after the changes (I sped up the model and decreased box inter-arrival time so you can see them come faster for the gif):

statscollector-process-time.gif


· 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.

Ashwath M avatar image Ashwath M commented ·

Hi Kavika, thanks for the insights! It works. Also. a quick follow up question, Do we necessarily have to input Event data for this case? I do not get the intended result if I don't fill up the Event data value (Keeping all other approach the same)

0 Likes 0 ·
Kavika F avatar image Kavika F ♦ Ashwath M commented ·

Are you referring to the Event Value section of the Statistics Collector?

1678814413507.png

The reason you need that is so then when a specific Event fires (which may be directly linked to a Column), that data will update. This value is written every time the row is accessed/updated with regards to that specific Event. Row Add Value is what gets written when the row is initially added to the table. The reason times don't get added again if you don't put it in the Event Value section is because there is no valid time for that specific type when the row is added (on creation); it hasn't been processed yet.

0 Likes 0 ·
1678814413507.png (2.7 KiB)