question

luis-rodrigues avatar image
0 Likes"
luis-rodrigues asked luis-rodrigues commented

Count in Statistics Collector

Hi, I'm working on my dashboard of my model and right now I have a table that records when a token from a specific machine goes to "process time", is there a way I can add another column counting the tokens of each machine (for example the ML00 goes from 1 to 487)? This counter will help to analyze the data in excel.

mlall.fsm

FlexSim 24.1.0
dashboard count
mlall.fsm (378.1 KiB)
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered luis-rodrigues commented

Yes, you can do that, albeit a tiny bit 'hacky'.

Creating one row per combiner is easily done by using a Column Set (see documentation for details). As long as any new combiners are in the "Combiners" group, a column will be created for it.

The exit event will update all of those columns. However in the "Event Value" field, you can use code so the current model time is only written to the cell if the 'column value' is equal to the combiner name on the token. Otherwise it keeps the current value.

I also activated path caching in the A* navigator. It will speed up the run speed considerably.

mlall_fm.fsm


mlall-fm.fsm (1.0 MiB)
· 11
5 |100000

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

luis-rodrigues avatar image luis-rodrigues commented ·

That worked perfectly, right now I have just another problem.

I've assign a label with "batchweight" and I wanted to get a table in the dashboard that would tell me the total weight from each combiner.

How can I sum the weights?

mlall.fsm

0 Likes 0 ·
mlall.fsm (402.7 KiB)
Felix Möhlmann avatar image Felix Möhlmann luis-rodrigues commented ·

Option 1:

This would use a single Statistics Collector. Listen to some Entry or Exit event of the token. Use the combiner name as the row value and do not finish the row. Have one column show the combiner name and one for the total weight. The total weight column should have a "Row Add Value" of 0 and an "Event Value" of "data.currentValue + data.token.batchweight" and be updated by the event that creates the row.

Option 2:

Use a Statistics Collector to create a separate row for each token, storing the combiner name and weight of that token. Then use a Calculated Table to sum the weights together, partitioned by the combiner name.

0 Likes 0 ·
luis-rodrigues avatar image luis-rodrigues Felix Möhlmann commented ·
Thank you @Felix Möhlmann I used the first option and worked perfectly, right now I want to add in the same chart the number of "boxes" that came out of the combiners. In the statistics collector I added a column with the name "Batch Output", in the Row add Value I putted 0 but I don't know exacly what to put in the event value, I also make it updated by the event that creates the row.
0 Likes 0 ·
Show more comments