Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack vertically before horizontally #446

Open
UdoW opened this issue Feb 22, 2022 · 2 comments
Open

Stack vertically before horizontally #446

UdoW opened this issue Feb 22, 2022 · 2 comments

Comments

@UdoW
Copy link
Contributor

UdoW commented Feb 22, 2022

I have following example:

Container container = Container.newBuilder().withDescription("1").withSize(12, 3, 3).withEmptyWeight(1)
   .withMaxLoadWeight(100).build();
   
LargestAreaFitFirstPackager packager = LargestAreaFitFirstPackager.newBuilder()
   .withContainers(Arrays.asList(container)).build();

List<StackableItem> products = new ArrayList<StackableItem>();

products.add(new StackableItem(
     Box.newBuilder().withId("Foot").withSize(1, 4, 1).withRotate2D().withWeight(5).build(), 9));

Container match = packager.pack(products);

Here my question:

When I run above code then all 9 items are placed on the lowest level (0) so that 2/3 of the height is empty. I want them to be placed on top of each other so that 2/3 of the area is empty.
The items are forbidden to be rotated in 3D. Only 2D is allowed.

How could I force the packer to stack the items first and then place them next to each other?

@skjolber
Copy link
Owner

This is currently not supported. The problem resembles #150 .

@skjolber skjolber changed the title How to force to stack? Stack vertically before horizontally Jul 25, 2022
@skjolber
Copy link
Owner

For brute force packager: Can be implemented as "try all combinations" and take the one with the preferred profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants