question

Jay J avatar image
0 Likes"
Jay J asked Sam Stubbs answered

adjust floor storage

How to adjust floor storage to be like the picture

floor storage capacity 132
1st floor holds 48

2nd floor holds 48

3rd floor holds 36

floor-storage.fsm

FlexSim 17.1.2
floor storage
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

·
Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered

It looks like what you're trying to do isn't necessarily a rack, so much as a certain stacking order in a space like a queue. The image you're showing isn't a rack, in that you can pull the bottom, or middle, or top objects out any time, but more of a stack of items in a queue.

Regardless of whether you use a queue or a rack, in order to create the visual stack you're looking for, you'll want to write some custom "Set Location" or setloc() command logic in the OnEntry trigger of the queue or rack. This will let you visually determine where to put the items.

In your case, where you have full pallets being stacked. The way you're going to want to visually represent this as on top of each other. You'll have to set the z loc of the top items as the sum of the heights of all the objects below it.

To give you an idea of how to create a stack of items you can see the packing logic we have for pallets.

Object item = i;
Object current = c;
Object lastitem = item.prev;
/**Default Packing Method*/


// Check to see if the flowitem is the first one in
if (current.subnodes.length == 1) {
	item.setLocation(0, 0, current.size.z);
	return 0;
}


// Check if there is space to the right of the last item
if (current.size.x - (lastitem.location.x + lastitem.size.x) >= item.size.x) {
	item.setLocation(lastitem.location.x + lastitem.size.x, lastitem.location.y, lastitem.location.z);
	return 0;
}


// Check below the last item -the math is weird because the position is less than 0
if (current.size.y - (lastitem.size.y - lastitem.location.y) >= item.size.y) {
	item.setLocation(0, -1 * (lastitem.size.y - lastitem.location.y), lastitem.location.z);
	return 0;
}


// Place the new item above the last one
item.setLocation(0, 0, lastitem.location.z + lastitem.size.z);


You'll be writing something similar for yours, but you'll want to have something different when you get to row 3 since only 2 pallets are stacked on row 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.

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.