Packed Pallets in Racking

Packed Pallets in Racking

jason_vore
Participant Participant
50 Views
11 Replies
Message 1 of 12

Packed Pallets in Racking

jason_vore
Participant
Participant

[ FlexSim 20.0.0 ]

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

0 Likes
Accepted solutions (1)
51 Views
11 Replies
Replies (11)
Message 2 of 12

jason_vore
Participant
Participant
Accepted solution

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

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;
	for (int j = 1; j <= bay.levels.length; j++) {
		Storage.Level level = bay.levels;
		for (int k = 1; k <= level.slots.length; k++) {
			Storage.Slot slot = level.slots;
			if (slot.slotItems.length == 0) {
				storageItem.assignedSlot = slot;
				return 0;
			}
		}
	}
}


Attached is an updated model that works correctly.

racking-small-pallets-fixed.fsm

0 Likes
Message 3 of 12

joerg_vogel_HsH
Mentor
Mentor

@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
Message 4 of 12

jason_vore
Participant
Participant

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
Message 5 of 12

jason_vore
Participant
Participant

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
Message 6 of 12

patrickABAWF
Collaborator
Collaborator

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
Message 7 of 12

joerg_vogel_HsH
Mentor
Mentor
@Patrick Cloutier , can you provide us a version, you have tested this code, just in case it might be a bug. Thank you, Patrick.
0 Likes
Message 8 of 12

jason_lightfootVL7B4
Autodesk
Autodesk
If you have more than one rack you may have assigned the item a slot in a different rack - the condensed code searches the whole storage system as no reference is being made to the storage object 'current' in the query.
0 Likes
Message 9 of 12

patrickABAWF
Collaborator
Collaborator

That was my problem. I had another rack in the model and so the above code didn't work. I just removed the other rack and now it works. BUT if the other racks are added after this rack, then it works. So as long as the rack I'm putting this code in is the first rack in the system, it works for it.

I guess I could figure out how to make a reference to "current" and make it work with many racks. But then I'd be stuck with copying that in every rack. And what if I want to find a slot within a bunch of racks or all racks.

I'm using 22.2.2. I seem to remember it wasn't like that with the older rack object. We had a menu where we could specify how many items per slot. In Place in Bay/Level perhaps? I don't remember but I know I have a model built in 2019 that no longer works because of that.

0 Likes
Message 10 of 12

patrickABAWF
Collaborator
Collaborator

Just to clarify: My goal here is to have a model that automatically places one and only one pallet per slot. It used to be like that automatically in 2019 with no code.

The problem of having to find a slot through one or many racks is a different issue irrelevant to this post.

Thanks,

0 Likes
Message 11 of 12

jason_lightfootVL7B4
Autodesk
Autodesk

You may be able to do that with the standard slot assignment code and disallow stacking in Y and Z:

1665062863687.png

It will depend on the width of your slots.

You can also refer to the slot's storage object in the where clause of a findSlot query.

rackStackingConstraint.fsm

0 Likes
Message 12 of 12

patrickABAWF
Collaborator
Collaborator

Wow that works (slot stacking = none). I don't think I would have been able to figure that out.

I actually need it to be 2 or 3 pallets per shelf depending on the shelf width so it works great now.

Thanks,

0 Likes