question

Nicholas D avatar image
0 Likes"
Nicholas D asked Nicholas D commented

How to collect state statistics from processors using Statistics Collector?

Hi all,

I am reusing a model that was developed in an older version of Flexsim. I am looking to use the Statistics Collector to find the duration of time a given processor spends in each of the states defined in Flexsim. I am getting an error that states: "time: 0.000000 exception: FlexScript exception: Could not access state variable on object StatisticsCollector1 (profile: 1) at MODEL:/Tools/StatisticsCollectors/StatisticsCollector1>variables/columns/Processing/valueNode".

I am not sure if this issue is arising because the model is from an older version or not. I cannot, for example, pin a pie chart of the states for the processor to the dashboard. Does anyone know how this can be fixed without the need to write to a global table?

Thank you!fs-issue.png

FlexSim 18.1.1
statistics collectorstatesutilizationolder model
fs-issue.png (89.9 KiB)
· 2
5 |100000

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

Joshua S avatar image Joshua S commented ·

Would you be able to upload you model? Any of the State Templates in the Dashboard should be creating a stats collector associated to that processor so an uploaded model would allow us the examine the situation better.

0 Likes 0 ·
Nicholas D avatar image Nicholas D Joshua S commented ·

Hi Joshua,

Please see the attached model. qc-model.fsm

Thank you!

0 Likes 0 ·
qc-model.fsm (2.1 MiB)

1 Answer

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Nicholas D commented

In version 16.0.0, we changed the statistics structure of the FlexSim objects. Any chart you pin or drag out from the dashboard library will assume the new structure. The Statistics Collector should be adjusted to get stats assuming the old structure instead.

Here is your model. I changed the way time time in state is retrieved. For example, to get the total time processing:

getstat(data.rowValue, "State", STAT_TIME_AT_VALUE, 0, STATE_PROCESSING)

qc-model-modified.fsm


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

Nicholas D avatar image Nicholas D commented ·

Thank you so much!

0 Likes 0 ·