question

Sebastián Cañas avatar image
0 Likes"
Sebastián Cañas asked Sebastián Cañas commented

How to count number of item types per slot / level / bay of Storage System

Hey guys!

In the demo model I attach there are flowitems with a label Type being placed in a Floor Storage that has four levels. How could I count the number of Types that there are per levels? For example, in level 1 there are flowitems of Type 1, 3, 5, and 7, therefore returns 4 as "Item Types" for that level

Thanks!

FlexSim 24.0.2
storage systemslot
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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Sebastián Cañas commented

queryItems

clause is "WHERE item.slot.levelID = 1 AND item.item.Type = 1"

Result of a query is an array.

Length of an result array is number of slot items.

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

Sebastián Cañas avatar image Sebastián Cañas commented ·

Hey @Joerg,

Perhaps I didn't explain well what I tried to achieve. Instead of counting how many items of Type 1, Type 2, Type 3 and so on there are per level, I wanted to count how many Types or SKUs were placed per level.

I came out with a solution, but I guess there are better ways to do it. I create a Global Table where columns are the number of levels and rows the number of item Types. I wrote a code to count how many items of each type there are per level. Then, another code goes through each column and row to count how many cells values are different to zero.

0 Likes 0 ·