question

Joey A avatar image
0 Likes"
Joey A asked Joey A commented

How to create pallets in a rack with multiple criteria?

Hi, I am trying to populate a rack from a global table. I need to put the pallets into the rack on only the top 4 levels, slot it at random, and have only 1 pallet per location. Below are the steps I've done to do this but I can't figure out how to slot randomly AND on top 4 levels at the same time: My steps are below:

1. Used process flow to create pallets (with labels) from global table.

2. Added Queue 3 strictly for the purpose of resizing the pallet -- wasn't sure how to resize the pallet in the "Create Object" process flow

3. Created a rack and used the painter tool to identify the top 4 levels as "Overhead" storage (label Slot_Type)

4. I tried 2 ways of slotting. 1st - the find slot method but it didn't seem like it was assigning a slot...2nd I tried putting logic on the rack in the 3d model but it made me choose between "random with space" and "matching label" (note: i removed the connection between Queue 3 & the rack to try to get the process flow approach to work)Rack_Slot.fsm.


I am very new to FlexSim and I've scoured youtube and the flexsim docs but couldn't get this to work. Any help would be great!

Joey

FlexSim 23.0.5
rackcreate objectslotting
rack-slot.fsm (70.1 KiB)
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Joey A, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Joey A commented

The label "pallet" that is used twice in the Find Slot activity does not exist on the token.

Because you generate more than one item per token in the Create Objects activity, the resulting token label is an array that contains references to all created items. With some notable exceptions (Move Object, Destroy Object), Process Flow activity generally only work on single items. You need to find a slot for each item individually, which can done with a subflow.

1710158229417.png

If you haven't already, I would suggest you look up the documentation on the Find Slot activity and SQL queries in general.

Your approach of using the "Overhead" label is good. But you also filter the levelID directly (slot.levelID != 'A'). To only place one item per slot, you can query the currently assigned number of items through "slot.slotItems.length". And lastly, you can order the eligible slots by "RAND()" to choose a random one.

WHERE slot.levelID != 'A' AND slot.slotItems.length == 0 ORDER BY RAND()

rack-slot_1.fsm


1710158229417.png (12.2 KiB)
rack-slot-1.fsm (58.3 KiB)
· 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.

Joey A avatar image Joey A commented ·
Thank you! The detail as to why the find slot activity wasn't working in my approach really helped. I'll check out the Find Slot activity and SQL Queries docs as well.
0 Likes 0 ·