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.

Joerg Vogel avatar image Joerg Vogel commented ·
You need to query slots over your rack objects, too. You cannot set your destination of rack group before you query your slots, because therem might be a situation when you still have space but you choose the wrong rack.
0 Likes 0 ·
Rania A avatar image Rania A Joerg Vogel commented ·
Yeah this is exactly what seems to be the problem. It selects the wrong rack at the moment, so queries are need it . Thank you very much :)
0 Likes 0 ·

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.

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.

// Assign item to slot
Storage.Item storageItem = Storage.Item(token.item);
storageItem.assignedSlot = slot;
   
// Get reference to rack
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.

Rania A avatar image Rania A commented ·
Thank you very much for your answer, this describes exactly what I am trying to do .

However because my process flow is more complex several subflows and two of them are storage request, I found it hard to implement it the decision. It basically has a problem identifying the token.rack station , although it has been defined in the script. I need to dig in it to find the problem.

Really appreciate your help !!!

0 Likes 0 ·