question

Clinton N avatar image
0 Likes"
Clinton N asked Clinton N commented

How to find average value of an item label

Hi,

I have a model in which after completing processing at a processor there is a 24% chance that the object will come back into the system. I want to find the average value for the number of times an object would be processed.

I created an item label named TimesProcessed at the source and gave it a value 0. On exiting the processor, the value gets incremented by one.

what im struggling with is how to display TimesProcessed average value on a dashboard.

Clinton

dashboardsstatistics
· 3
5 |100000

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

jing.c avatar image
0 Likes"
jing.c answered Clinton N commented

hi, @Clinton N

If I was you, I will use legacy dashboard charts. Before that I will add the all value of item label to sink's label "total", and it divide by the input of sink is the average value of "TimesProcessed".

You can find the custom charts statistics in the attached model average-label-processtimev19.fsm

P.S. You need to check "show legacy charts" to find legacy charts in dashboard-libary

legacy-charts.png


· 3
5 |100000

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

Joerg Vogel avatar image
3 Likes"
Joerg Vogel answered Jordan Johnson commented

The statistic collector and a calculated table will accomplish your request:

Statistic Collector: OnEntry Event of the sink let you get the value of a label of the item each time a row is added to the result table.

Calculated Table can query the average of the table column of the Statistic Collector.

  1. SELECT AVG(StayTimeProcessor) AS AvgStayTime FROM [cumulated staytime at processor]

cumulated-processtime-of-multiprocessed-item.fsm

Since you let process the items randomly multiple times at the processor, I increment the label "ProcessedTimes" each time on exit by the staytime of the item on the processor. The color of items depends on the item Type label which I increment on exit by 1 at the processor, too.


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