question

yoni A avatar image
0 Likes"
yoni A asked yoni A commented

throughput per hour table statistics

how to use the throughput per hour table statistics on a station placed on a conveyor? the statistics works fine on a processor

FlexSim 18.1.0
throughput
5 |100000

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

asb.p avatar image
1 Like"
asb.p answered yoni A commented

Hello Yoni,

It is same as you have done for Processer. Drag Output/hour chart in the dashboard and add station in the objects tab.

· 5
5 |100000

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

Jordan Johnson avatar image
1 Like"
Jordan Johnson answered

The Throughput Per Hour template currently does not support conveyor stations as objects. The easiest way to get that template to display the data you want is as follows.

I made this demo model that shows how to get the chart you want:

throughputperhour.fsm

To get this chart, you need to make a Statistics Collector. The collector does not listen to any events. On the Data Recording tab, set the row mode to Enumerate. Sample the stations you want to show on the chart.

Then you need to add three columns. For the first column, set the Update Mode to When Row is Added. For the value, use the picklist to choose IDs, then choose ID of Row Value.

For the second column, set the Update Mode to Always. For the value, use the picklist to choose Statistics, then choose Statistics By Object. In the popup, set the object to data.rowValue, and choose the current Output.

For the third column, set the Update Mode to Always. For the value, use the following code:

  1. /**Custom Code*/
  2. StatisticsCollector collector = ownerobject(c);
  3. var data = collector.collectedData;
  4. treenode current = data.eventNode;
  5. Object instance = data.processFlowInstance;
  6.  
  7. // determine the number of hours
  8. double duration = Model.statisticalTime / 3600;
  9.  
  10. // If no time has elapsed, return zero to avoid divide by zero
  11. if (duration == 0)
  12. return 0;
  13.  
  14. // Look up the throughput value in the current table
  15. double throughput = Table(collector)[data.rowNum][2];
  16. return throughput / duration;

This code just gets the value from the second column, and divides it by the total number of hours.


5 |100000

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