question

Adarsh T avatar image
0 Likes"
Adarsh T asked Jordan Johnson answered

Statistics collector for Combiner

Hello All,

I'm using a statistics collector to collect data from a combiner .

i'm able to collect the total number of Input / Output parts from the combiner.

But I also want to collect the input from only one particular input port of a combiner.

Note : I don't want to use the output from previous station (like sink in this model ).

Please find the attached sample model. (combiner-input-port-statistic-collector.fsm )

Thank you in advance..

FlexSim 19.1.1
statistics collector
· 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.

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered

To make the table you want, you need to do two steps. First, you need some way to record statistics per port per combiner. I used a Statistics Collector to do that. It has one row per combiner per port that items enter in, and it counts how many times items come in each port.

Next, you need to have a table that records those values once every hour. To do this, I also used a Statistics Collector. The second Statistics Collector records data every hour. It has a column for time. It also has a column set. A column set lets you specify a list of columns on reset. This way, if you change the number of objects in the group, the stats collector can add another column for that object automatically. So I made one column per combiner per port (just ports 1 and 2). Every hour, each of those columns looks up the the correct value in the first combiner.

combiner-input-port-statistic-collector-vs-time.fsm


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
0 Likes"
Jordan Johnson answered Adarsh T commented

Here is a model with a table that shows the input through port 2 of each combiner:

combiner-input-port-statistic-collector-modified.fsm

Here are the steps to making the Statistics Collector:

  1. Add a Timer event that fires at time 0, and does not repeat. Add a label to this event called Combiner, with the value of
    1. Group("Group1").toFlatArray()<br>
  2. Listen to Group1's OnEntry event. Add a Condition to this event with this code:
    1. data.port == 2
  3. Add a label to this event called Combiner with this value:
    1. current
  4. On the Data Recording tab, set the Row Creation Mode to Unique Row Values, and choose Combiner
  5. Add the Combiner column. It should update when the row is added, and have the id of the row value.
  6. Add the Input column. It should update with events. For the value, choose the pickoption for incrementing the current value. Make sure to connect this event to the Input column.

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