question

Dirk Boumans avatar image
0 Likes"
Dirk Boumans asked Jeanette F commented

item StayTime in Storage System

Hi,

Is there a way to query items in a storage system by the the time they are stored in the storage objects? I want to create a shipping list of items based on item type and want to select items which are stored for more than x amount of time. All items are randomly stored across several floorstorages. I know how to use find item and query on item type but I can't figure out how to query the staytime.

Regards Dirk

FlexSim 23.0.6
querystorage systemstaytime
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
0 Likes"
Jason Lightfoot answered Jeanette F commented
Storage.system.queryItems("SELECT item, time()- get(stats_lastmovetime(item.item)) AS Age WHERE Age>hours(5)").as(Array).as(Table).cloneTo(Table("GlobalTable1"))
· 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.

Dirk Boumans avatar image Dirk Boumans commented ·
Great that's what I was looking for. Thanks Jason!
0 Likes 0 ·
Begoña Espiñeira avatar image Begoña Espiñeira commented ·
Hello @Jason Lightfoot it would be possible to do a query of multiple items to the storage system, like if it was a pull from list with require number = 30 for example?
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ Begoña Espiñeira commented ·

Hello @Begoña Espiñeira,

Storage.System.queryItems()

Searches for all items that match the query, so you could pull the first 30 that fit the query.

0 Likes 0 ·
Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered Dirk Boumans commented

Hello @Dirk Boumans If you would create a token when an item is entering the storage system and you put the token on a list with the age field and a pointer to the item you have your list immediately without any other actions required. And you can easily query everything older than a certain age.

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

Dirk Boumans avatar image Dirk Boumans commented ·
Hi Steven, that was my alternative option but I didn't want to do this becasue to me that's creating another list next to one already existing which has the data. Jasons answer helps me out. But thanks for your input.
0 Likes 0 ·

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.