question

Jing Luis C avatar image
0 Likes"
Jing Luis C asked Jing Luis C commented

Problem with statistic collector with failed token.

Dear community,

I want to show in the dashboard the number of tokens which have failed during the simulation. The problem is I have looked in different places and could not find the answer. The failed tokens are generated in the TablesAndChair location resource in Acquire Table process flow. We have put a label 'failed' in Maxtimewait property on Exit. If anyone could help would appreciated. Here find attach the fsm file that I am using.

cafeteriaNew2.fsm

Thanks in advance!

FlexSim 21.0.2
labelsstatistics collectorstatistics
cafeterianew2.fsm (3.0 MiB)
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

Only the label failed is asserted to items, which aren’t fulfilled. This means you check for existence of a label node and not for a label value. If you want get those items counted, you direct them through a queue and put a content statistic over it.
Please try the command objectexists.

objectexists(item.attrs.labels.subnodes[“failed”])
0 Likes 0 ·
Jing Luis C avatar image Jing Luis C commented ·

someone know it?

-1 Like -1 ·

1 Answer

Jeanette F avatar image
0 Likes"
Jeanette F answered Jing Luis C commented

Hello @Jing Luis C,

I added a decide activity so I could sort out the tokens that have failed. To make this easier I also changed the name of the "failed" label to "location". This makes it so the decide activity checks a label that is found on all tokens.

You can attach the connector to the sink and then pin the input statistics to the dashboard to track how many tokens have failed.

cafeterianew2 (1)_1.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.

Jing Luis C avatar image Jing Luis C commented ·
Thanks a lot! It solves my problem!
0 Likes 0 ·