Mikael B avatar image
Mikael B asked Ben Wilson commented

Does storage.system.queryItems() include outbound items?

According to flexsim docs (1), queryItems() only searches for items in the stored state. However, there are some instances in my model where two orders contain the same flowitem, which of course is problematic.

This is the code I use to set slotItems as outbound:

Storage.Slot.Item slotItem = token.SlotItem;
slotItem.storageItem.assignedSlot = 0;

token.SlotItem contains one item from a queryItems() array.

If queryItems() is supposed to only search for items in the stored state, and the outbound code is working correctly, I will provide further information about the model to locate the problem.


FlexSim 20.0.10
storage systemflexsim 20.0.10queryitemsstorage.item.state
· 4
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 ·

try it with pointer null

NULL instead of numerical 0
0 Likes 0 ·
Mikael B avatar image Mikael B Joerg Vogel commented ·

So with some more testing I have found out that setting items to outbound is not the problem. It probably is the code I have created to query items that doesnt work properly. I also tried with pointer NULL instead of numerical 0, which gives the same excact results.

Token token = Token.byID(12752);
Storage.Item item = Storage.Item(token.Item);
return item.state;

This code in the script console checks the Storage.Item.State of a random item which has gone through the set outbound code, and returns a value of 4, which should be outbound according to this flexsim docs article:

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Mikael B commented ·

Can you post your model? Make this or another post private if it's a project that contains commercial information you can't release.

If it's a student assignment then post here publicly.

0 Likes 0 ·
Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Mikael B, was Lars Christian J2's answer helpful? If so, please click the red "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Lars Christian J2 avatar image
1 Like"
Lars Christian J2 answered

You are corrent in that queryitems() will only search for items in the stored stated. Please look here in the user manual for Storage.ITem.assignedSlot

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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