question

Marc R5 avatar image
0 Likes"
Marc R5 asked Joerg Vogel edited

Query number of items in a queue where item label meets a condition

Hello,

I have a queue with multiple items. Each item has its labels, and I would want to know the number of items that the label "oDepartureTruck" == X. How can I do that?

1664354318325.png

Thanks!

FlexSim 22.2.2
queuequerymap
1664354318325.png (42.9 KiB)
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

Steven Hamoen avatar image
1 Like"
Steven Hamoen answered Felix Möhlmann edited

@Marc R5 There are several solutions possible. Maybe the easiest is using the onentry and onexit triggers and everytime an item enters or exits increase a label on the queue. (or use process flow to do this)

The 2nd option is create a for loop that loop through all the items in the queue and adds up the ones with the correct label. You could for instance put this in a user command

The 3d option is more or less the same as the second but you can use the build in query language to create a query.

Option 1 is the fastest, 3 the slowest

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