question

David Seo avatar image
0 Likes"
David Seo asked Ryan Clark commented

How to pull a pair of slotitems in a bay-level place which two slots stored ?

@Felix Möhlmann and @Jordan Johnson

I am making the advaced model you helped last ike picture.

2022-01-06-230037.png

I want to pick up TWO slotItems from a pair of slots in a bay-level place like above TWO Green Box in slot#1 and slot#2 stored as a pair. After picking up them, two items should be transported to the tote in the combiner.

If It is possible to pick up a pair of slotitems in any place, the combiner tote can be packed with TWO items and can be conveyed.

How can I do it? Please help me.

FlexSim 21.2.4
pick up a pair of slotitems in a bay-levelwhen a pair of slots is filled
2022-01-06-230037.png (354.4 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.

Ryan Clark avatar image Ryan Clark commented ·

Hi @David Seo, was Jason Lightfoot'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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Felix Möhlmann commented

One way would be to write a script that labels the slots with a pointer to an adjacent slot, say 'leftSlot'. Then you can add a where clause to a findItem activity that would look for a stored item in the adjacent slot. It would look something like this:


WHERE slot.leftSlot.slotItems.length>0 AND slot.leftSlot.slotItems[1].storageItem.state=Storage.Item.State.Stored
· 3
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 Seo avatar image David Seo commented ·

@Jason Lightfoot

I have a trouble how to get the adjacent slot item pointer and the slotItems length.

I have a followed script in the expression Field in the ItemList1.


--- AdjacentSlot --

Storage.Object StorageObject = puller;

Storage.Slot AdjacentSlot;

Storage.Item StorageItem;


int bayID = value.Type;

int levelID = value.LevelID;

int slotID = value.SlotID;


if ( slotID == 1) {

AdjacentSlot = StorageObject.getSlot(bayID, levelID, 2);

}

else {

AdjacentSlot = StorageObject.getSlot(bayID, levelID, 1);

}

int AdjacentSlotItemsLength = ?;

------

PickingItems_SlotsPair_1.fsm

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann David Seo commented ·

The puller is not the rack but the connected queue. Other than that the code in your attached model looks correct.

Pulling two items, with the second depending on the first is still difficult by just using a default pull strategy though. In the attached model I instead use an instanced process flow to control the combiner pulling the items. First I add the pointer labels that Jason mentioned to each slot in the rack ("Initialize Labels" custom code activity). In the list, instead of counting of many items are in the adjacent slot I simply check if there is any item. If that is the case, the field value becomes a pointer to that adjacent item.

This allows to pull both the first item and get a reference to the second item in one pull activity by using the "SELECT" statement. Afterwards I pull the second item from the list and release both items.

pickingitems-slotspair-2.fsm

2 Likes 2 ·
Joerg Vogel avatar image Joerg Vogel David Seo commented ·

I would read the slots of a level of a bay of a rackobject to get an array of slots. I extract the slot of already known slot item and then test the length of each slot in the array. This approach is universal, because you may have more slots in a rack cell.

https://docs.flexsim.com/en/22.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Warehousing/Storage.Level.html

You get access to the nodes of slots from your tree, if you cast a slot from your slot item to treenode and go the nodes up until you get to slots. All warehouse properties are still available just by tree operations. You can cast a treenode than back to a class in storage system.


0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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