question

Stan Davis avatar image
0 Likes"
Stan Davis asked Matthew Gillespie commented

HasSpace Return Value Changes Based on Stacking Order??

I am using the HasSpace method in a Find Slot activity. With a X+ > Y+ > Z+ stacking order, the HasSpace is failing to find space for 4 items when there is still plenty of space in the rack (1 slot per bay).

1665409548225.png

It appears it is returning 0 because the items' dimension would exceed the boundary at the back of the rack...

1665411493036.png


However, if I change the stacking order to X+ > Z+ > Y+, HasSpace finds space for all items...

1665410862376.png


With the X+ > Y+ > Z+ stacking order, if HasSpace can't find space on the first row, why doesn't it simply find space by starting a second row??

1665411124696.png


It seems you'll eventually you'll run into the same problem described above regardless of the stacking method. Thanks - Stan

FlexSim 22.2.2
find slothasspace
1665409548225.png (12.6 KiB)
1665410862376.png (149.6 KiB)
1665411124696.png (300.8 KiB)
1665411493036.png (296.4 KiB)
· 6
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Matthew Gillespie commented

I can corroborate the observation. This looks like a bug/oversight. It appears that if there is already at least one item in the current "row" and the next item would fit beside it going by its x-size but not by its y-size, the hasSpace method returns a false instead of checking if the item could be placed in a new layer.

This makes sense when the "row" is the first one, because the item not fitting in the y-dimension would mean that it is longer than the rack is deep. But for further rows the rack depth will be different from the available depth.

1665476146863.png

Blue would fit beside green in the x-direction but not y. -> Blue stays in the queue.

1665476218684.png

If blue is the first item in the "row", it is placed in a new layer.


1665476146863.png (113.7 KiB)
1665476218684.png (123.2 KiB)
· 4
5 |100000

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