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

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

mikael_bs
Not applicable
94 Views
5 Replies
Message 1 of 6

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

mikael_bs
Not applicable

[ FlexSim 20.0.10 ]

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.

(1) https://docs.flexsim.com/en/20.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Warehousing/Storag...

0 Likes
Accepted solutions (1)
95 Views
5 Replies
Replies (5)
Message 2 of 6

joerg_vogel_HsH
Mentor
Mentor

try it with pointer null

NULL instead of numerical 0
0 Likes
Message 3 of 6

lars_jacobsen_ScandiSim
Advocate
Advocate
Accepted solution

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 https://docs.flexsim.com/en/21.1/Reference/CodingInFlexSim/FlexScriptAPIReference/Warehousing/Storag...

Message 4 of 6

mikael_bs
Not applicable

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:

https://docs.flexsim.com/en/20.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Warehousing/Storag...

0 Likes
Message 5 of 6

jason_lightfootVL7B4
Autodesk
Autodesk

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
Message 6 of 6

Ben_WilsonADSK
Community Manager
Community Manager

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