Keyword in queryItems method like puller

Keyword in queryItems method like puller

joerg_vogel_HsH
Mentor Mentor
17 Views
5 Replies
Message 1 of 6

Keyword in queryItems method like puller

joerg_vogel_HsH
Mentor
Mentor

[ FlexSim 20.1.3 ]

Internally I can get every storage item of the storage system and push it onto a global list. Then I can test some of the attributes like color or storage.item.state. Is there a keyword to test or evaluate a FlexScript method or command with the currently queried storage item. If I try to query for or find a slot, then there is the keyword “slot”. I didn’t find a similar keyword for the methods findItem or queryItem.

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

jason_lightfootVL7B4
Autodesk
Autodesk

In findItem the keyword is just 'item'. Have you tried that in queryItems?

0 Likes
Message 3 of 6

joerg_vogel_HsH
Mentor
Mentor

Jason, I have done some tests. “item” as a keyword exists, but it has very strange behavior like it is an array. I’d like to test the state of every slot item, but the keyword references only the first item of the slot I am testing. It does not evaluate similar to “slot” as a keyword. The iteration over all storage items is missing.

I attach an example model for a question of Ryosuke, here I change the slot assignment after an item entered a slot. I get a different value for slot item state. Every second item get a different state

State Stored value is 3, Outbound is 4.

I have tested in FlexSim 20.1.floorstorage_JV.fsm

0 Likes
Message 4 of 6

jason_lightfootVL7B4
Autodesk
Autodesk

Interesting.. I can create a test model, but if you have one you can share that would same us some time. Thanks.

0 Likes
Message 5 of 6

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

The items keyword works fine - here's the example with the queryItems method of getting those in the slot added.

That seems to be enough to filter out the 3 that are not yet in the slot, however if you wanted to get the state you'd have to use item.storageItem.state since the keyword item refers to the storage.slot.item which doesn't have the state attribute.

WHERE item.slot=$1 AND item.storageItem.state=3

load-unload-gantry3_queryItemsExample.fsm

Message 6 of 6

joerg_vogel_HsH
Mentor
Mentor

Jason, I didn’t know, that the keyword “item” had to be checked against the system, because the keyword belongs to the methods of storage class already. Instead I assumed I had to evaluate item in a query to get a pointer as a treenode. I must confess I don’t still understand the warehouse module.
Many thanks! Jörg

0 Likes