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

Optimization of Packing in Smaller and Cheaper Boxes #619

Open
grzegorzrzeznikiewicz opened this issue Nov 7, 2024 · 1 comment
Open

Comments

@grzegorzrzeznikiewicz
Copy link

Hello,
I have a question. Is it possible to set up a scenario to show packing in smaller boxes that are cheaper? For example:

Product dimensions:
10 x 10 x 10 cm

Dimensions of Box 1:
15 x 15 x 15 cm, price 5 USD

Dimensions of Box 2:
60 x 60 x 60 cm, price 60 USD

We need to pack 3 products, which fit into the second box, but I would like to pack the products into 3 of the first boxes. Is it possible to achieve this? The BoxPacker version is 3.12.

@dvdoug
Copy link
Owner

dvdoug commented Nov 16, 2024

Yes, there are 2 ways of doing this depending on how complex your needs are:

If it's a case of "only use box 2 if the item literally doesn't fit inside box 1", then the mechanism at https://boxpacker.io/en/stable/sortation.html#choosing-between-permutations is probably suitable, simply override the sorter and sort by price. As long as you've got < 12 boxes that should always give a good result.

You can also use the mechanism at https://boxpacker.io/en/stable/all-permutations.html to brute-force it and again sort by price but from what you describe I don't think you need to do that here.

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

No branches or pull requests

2 participants