question

Sofia G21 avatar image
0 Likes"
Sofia G21 asked Sofia G21 commented

Stats collector for processor first downtime event time stamp

Hello Flexsim community,

I have built a statistics collector that generates a table with time stamps in seconds for each state change of a Wrapper Processor. It's working just fine. However, what I am trying to do is have it record the time stamp ONLY when the Wrapper Processor enters a Breakdown state. I am struggling to create that condition in the Stats collector. Anyone have any recommendations on how to approach this?state-time-stamp-table.pngscreenshot-2024-01-05-111144.png


Thanks in advance for any help!

FlexSim 23.1.0
statisticcollector
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
2 Likes"
Felix Möhlmann answered Sofia G21 commented

In the Condition field, enter "data.breakdown == STATE_BREAKDOWN".

(I'd change the label names back to "toState" and "fromState", since its more descriptive of what is happening logic wise, so the expression would become "data.toState == STATE_BREAKDOWN")

· 9
5 |100000

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

Sofia G21 avatar image Sofia G21 commented ·

Thanks Felix! This was super helpful!

If I was trying to have it so that the condition would be: record the time stamp ONLY when the Wrapper Processor enters a Breakdown state for more than 10 min... how would I approach it?

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Sofia G21 commented ·

I assume you are using an MTTR/MTBF for the breakdowns?

In that case you can add a line to the down function that writes the down time to a label on the processor.

1704725700384.png

In the Condition field of the Statistics Collector event, you can then add
" && current.DownTime > 600", so the row is only created if the breakdown will last longer than 600s. (If you are using a different time unit in your model/for the breakdowns the number would be in that unit.)

1 Like 1 ·
1704725700384.png (54.3 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Felix Möhlmann commented ·
Or record all the down times and use a calculated table to filter out those shorter than 10 minutes.
1 Like 1 ·
Show more comments
Show more comments