question

Sean avatar image
0 Likes"
Sean asked Felix Möhlmann answered

How to know which slot is be stored in warehousing?

Hi all,

I'm learning about warehousing model. I want to know which slot is be stored in warehousing. I know there are lots of Flexscripts about warehousing, but it's too complicated for beginner.

For instance, I want to get bay1_level5 information when this slot was be stored. how can I write using FlexScript? Thank's.

warehousing.jpg

FlexSim 22.1.3
warehouseslot
warehousing.jpg (98.4 KiB)
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

To query which slots currently hold items, you would use the querySlots method. It uses the SQL keywords 'WHERE' and 'ORDER BY' to filter the slots by given criteria. Inside the query 'slot' is defined as a reference to the currently queried slot. So you can use it to check properties of the slot, such as its bayID or the number of assigned items.

Storage.system.querySlots("WHERE slot.slotItems.length > 0")

This code would return an array of all slots that currently have at least one item assigned to them. This data could then be transferred into a more readable format like a table. An example of this can be found in the script console of the attached model. Note that I mention that the items are 'assigned' to the slot. This includes inbound and outbound items.

1658391966001.png

To know 'when' and item was stored, a statistics collector can listen to the 'On Slot Entry' event of the storage objects and store the relevant data (timestamp, bay, level, item) in its internal table. And then displayed in a dashboard.

1658391979710.png

storage_query_example_fm.fsm


5 |100000

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