question

Diego V12 avatar image
0 Likes"
Diego V12 asked Diego V12 commented

Statistic Collector: Create multiple rows with array type label

Good evening,

I was wondering if it would be possible to create multiple rows when listening to a single event in a statistics collector. The token we listen to has an array label with some values that I would like to set one by row. Is this possible?

Very precisely I am trying to create a stat collector where each row has a column with a value from a token label of integer type and a second column where the value is each of the items contained in the array label.

E.g.

token.Name = Value1

token.Data = Array[3]: {1, 3, 7}

And the table I would like to obtain should be kind of:

Value1 1

Value1 3

Value1 7

I have read carefully the manual and related post unable to find an answer.

Thanks you very much for your help if you may find a way to solve this

FlexSim 20.2.0
statistics collectorflexsim 20.2.0arrayevent listening
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

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Diego V12 commented

You can simply pass the array of values from the token as the row value for the event. This will create multiple rows, one for each value in the array:
https://docs.flexsim.com/en/20.2/Reference/Tools/StatisticsCollector/#row-values - see the section called Array of Values.

The code would probably looks like this:

data.token.Data
· 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.

Diego V12 avatar image Diego V12 commented ·

Thanks a lot! I missed the paragraph in the manual. Excuse me for the inconvenience!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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