question

David Chan avatar image
0 Likes"
David Chan asked David Chan commented

Place in rack first by matching label then by first available level

Hi I am trying model a drive in rack logic where the item is placed in rack first by matching label such as SKU then followed by first available level. Once level is filled, then the item will go back to the lowest bay and go up by level again.

I managed to control the assigned level, but it is not dynamic enough for the first available level. Any idea to do this?

enclosed is the model that I have done.

Drive in.fsm

FlexSim 21.0.3
rackflexsim 21.0.3place be itemtype then first available
drive-in.fsm (57.7 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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered David Chan commented

I thought that In your query you are referencing SKU without the slot and for this to work you should add SKU as an indexed label in the Storage System GUI or use slot.SKU.

Now - you have a rack that doesn't have the SKU label on its slots, so if you search for a slot in the storage system those slots will now complain that they don't have that label - so if you want to use slot.SKU it must be allow nulls by adding the '?' - so slot.SKU?

Also based on your description you should be able to just order by level and bay in order to fill as you described, so then the query is just:

WHERE slot.SKU? = $1.SKU AND slot.hasSpace($1)  ORDER BY slot.levelID ASC, slot.bayID ASC

However, it turns out that you can just use SKU without adding it to the Storage System labels and that still works but gives a different result. I think I need to report this.

· 6
5 |100000

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

David Chan avatar image David Chan commented ·

@jason.lightfoot

1. The SKU on rack was assigned using "Paint Slot Labels".

2. I have implemented what you have suggested to Query in the Find Slot activity. It did not work out. I would like the item to fill the next level instead of filling that slot at the same level first.

David

0 Likes 0 ·
1616677159097.png (358.3 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ David Chan commented ·

Okay then try changing the order by to this:

ORDER BY slot.slotItems.length ASC, slot.bayID ASC, slot.levelID ASC

which should give you this:

0 Likes 0 ·
1616678233024.png (241.4 KiB)
David Chan avatar image David Chan Jason Lightfoot ♦♦ commented ·

@jason.lightfoot

Thanks.

It still looks strange as the item is not filling up one rack till full before going to the next rack. I think query statement get it to find a slot with the shortest in length in all storage system.

David

It works only with ORDER BY slot.slotItems.length ASC


0 Likes 0 ·
1616678776228.png (521.8 KiB)
Show more comments