question

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

Define Storage Slot based on item type

Hello everyone ,

In my model, I have two racks and an ASRS vehicle. I have defined ASRSs tasks using process flow.

For the storage task (unload in racks , as a station I have used the command Group("STORAGE")[duniform(1, Group("STORAGE").length, getstream(activity))] because I wanted my items to be stored randomly either on rack 1 or rack 2.

Group ('STORAGE") is racks 1 and 2.

Now I want the ASRS to store the containers in a random way but only in slots that match the item type. That's why I am looking for a command to do so.

What I did was, paint the slots, and change the Slot assignment strategy on the racks to Matching Labels.

The model runs, but after a bit stops, that's why I think I should change my randomness command in the process flow also.

Unfortunately, I cannot post my model as its confidential.

Thank you in advance :)

FlexSim 20.0.10
slotslot labelspaint slot labelsslot assignmet
· 2
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
1 Like"
Felix Möhlmann answered Rania A commented

In later versions there exists a process flow activity 'Find Slot' to do this. In 20.0 you have to use code to query the available slots.

'Storage.system.findSlot(queryString, 0, param1, ...)' will return a slot that matches the conditions from the query, using SQL syntax.

  1. Storage.system.findSlot("WHERE slot.Type == $1.Type AND slot.hasSpace($1) ORDER BY RAND()", 0, token.item);

This searches for a slot where the 'Type' label matches that of the item (token.item is passed into the query with the $-syntax) and that has enough space to store the item. It orders the possible slots randomly (ORDER BY RAND()).

When a slot is found, you can also directly assign it to the item, which will later on overwrite the Slot Assignment Strategy of the racks when placing the item.

From the slot, you can also get a reference to the respective rack, to use later on in the process.

  1. // Assign item to slot
  2. Storage.Item storageItem = Storage.Item(token.item);
  3. storageItem.assignedSlot = slot;
  4.    
  5. // Get reference to rack
  6. token.Rack = slot.storageObject;

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