question

Jason V2 avatar image
0 Likes"
Jason V2 asked Jason Lightfoot edited

Packed Pallets in Racking

When packing boxes on a pallet with a combiner and then sending them to a rack, the pallets stack on top of each other in the slots rather than moving to a new slot. It's like the function to check if there is room in the slot is only checking for the pallet dimensions rather than the dimensions of the contents as well.

Interestingly, I've had it randomly work the way I would expect, but have not been able to find a logical explanation for why.

Is it possible to have the slot assignment strategy be First Empty Slot rather than First Slot with Space?

I've attached a simple sample that mimics the issue.

Thanks in advance for any help!

racking-small-pallets.fsm

FlexSim 20.0.0
palletsrackingslot assignment strategy
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 V2 avatar image
0 Likes"
Jason V2 answered Jason Lightfoot edited

Apparently being stuck at home in a blizzard leads to me solving my own problems :D

I updated the Slot Assignment Strategy code as follows:

Storage.Object current = ownerobject(c);
Object item = param(1);
Storage.Item storageItem = Storage.Item(item);
/***popup:SlotByCondition*/
/**First Slot with Space*/
for (int i = 1; i <= current.bays.length; i++) {
	Storage.Bay bay = current.bays[i];
	for (int j = 1; j <= bay.levels.length; j++) {
		Storage.Level level = bay.levels[j];
		for (int k = 1; k <= level.slots.length; k++) {
			Storage.Slot slot = level.slots[k];
			if (slot.slotItems.length == 0) {
				storageItem.assignedSlot = slot;
				return 0;
			}
		}
	}
}


Attached is an updated model that works correctly.

racking-small-pallets-fixed.fsm


· 10
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 ·

@Jason V2, there exists several other approaches to this dilemma. The source code of this function is just an example to introduce the structure of bay, level and slot to users. We discussed this function at least at three different questions in the past months since the releasing of warehousing module. The method findSlot does the same as the changed default code in just a single short line of code

The SQL clause condition is a parameter string therein:

WHERE slot.slotItems.length < 1

Anthony Johnson has presented this method with similar conditions and combinations.

Seung Yong Seo discussed your question first at

A difference when storing a container item and a basic item

The method hasSpace checks indeed only the size of the most upper item of a container structure. This leads to a dynamic size adjustment of container item, that stores packed items into a sub node pallet and adjust the height OnPalletEntry to the maximum dimension value in z direction of all stored items in the container sub structure. OnExit event the dimension is adjusted again.
If you use this new structured pallet, you must change the standard references to the packed items on your own.

0 Likes 0 ·
Jason V2 avatar image Jason V2 Joerg Vogel commented ·

Jorg,

Thanks for the reply. I did a lot of searching, but wasn't able to find those previous answers.

Thanks a ton!

Jason

0 Likes 0 ·
Jason V2 avatar image Jason V2 Joerg Vogel commented ·

I was able to condense my code down to the following thanks to the references you provided:

/**Custom Code*/
Storage.Object current = ownerobject(c);
Object item = param(1);
Storage.Item(item).assignedSlot = Storage.system.findSlot("WHERE slot.slotItems.length < 1 ORDER BY slot.bayID ASC, slot.levelID ASC");

Moderator comment:

It looks like others are copying this code. It will not filter on the storage object 'current' where the assignment strategy sits, therefore can return slots for other objects. To rectify this you need to add to the WHERE clause:

AND slot.storageObject=$1

and pass in 'current' as parameter 2.

0 Likes 0 ·
Patrick Cloutier avatar image Patrick Cloutier Jason V2 commented ·

Jason, I copied your condensed code version and it doesn't work for me. After the 1st pallet enters the rack I get the error "No slot was assigned to item".

I can't find the problem. Did it work for you exactly as is?

Thanks,

0 Likes 0 ·
Show more comments