Statistic Collector: Create multiple rows with array type label

Statistic Collector: Create multiple rows with array type label

diego_v12
Not applicable
13 Views
2 Replies
Message 1 of 3

Statistic Collector: Create multiple rows with array type label

diego_v12
Not applicable

[ FlexSim 20.2.0 ]

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

0 Likes
Accepted solutions (1)
14 Views
2 Replies
Replies (2)
Message 2 of 3

JordanLJohnson
Autodesk
Autodesk
Accepted solution

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
.


Jordan Johnson
Principal Software Engineer
>

0 Likes
Message 3 of 3

diego_v12
Not applicable

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

0 Likes