question

Joerg Vogel avatar image
0 Likes"
Joerg Vogel asked Joerg Vogel commented

Keyword in queryItems method like puller

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.

FlexSim 20.1.3
FlexSim 21.0.0
flexsim 20.1.3finditempullerqueryitems
· 3
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

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

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Jason Lightfoot ♦♦ commented ·

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 0 ·
floorstorage-jv.fsm (56.2 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Joerg Vogel commented ·

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

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Joerg Vogel commented

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


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

Joerg Vogel avatar image Joerg Vogel commented ·

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