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

Would it be possible to make it optimize between boxes? #26

Open
podme opened this issue May 11, 2021 · 4 comments
Open

Would it be possible to make it optimize between boxes? #26

podme opened this issue May 11, 2021 · 4 comments

Comments

@podme
Copy link

podme commented May 11, 2021

I have several boxes of the same size. The contents to be packed are boxes of various dimensions, and I want to find the optimal way to pack as many of these content boxes as possible into as few containing boxes as possible. Is there a way or could the feature be added to make it optimize for several containing boxes please?

@olragon
Copy link
Owner

olragon commented May 11, 2021

No built-in method for that. You can try to reduce boxes by half, test if fit, add a quarter, then test again, ...

@podme
Copy link
Author

podme commented May 11, 2021

Sorry I don’t understand. Do you mean reduce the content boxes or container boxes by half?

@olragon
Copy link
Owner

olragon commented May 12, 2021

Sorry, I mean containers.

My ideas come from the divide and conquer technical.
https://catazine.wordpress.com/2011/02/09/divide-and-conquer/

  • find out all boxes can be fit in all containers, if not, abort
  • find out half of the containers can fit all box, if not, increase containers
  • ...

@podme
Copy link
Author

podme commented May 12, 2021

That’s interesting, thanks :)

I suspect my issue is a little more complicated and beyond the current capability. I have already a surplus of container boxes, so I'm not worried for example about how many to buy. I'm looking for the optimal way to pack the fixed number of content boxes in the unlimited container boxes. Of course if it optimizes, then as a consequence it will naturally use as few container boxes as possible. Ideally, I am thinking that such an app would be able to handle both varying sized container and content boxes, while optimizing globally (as opposed to on a per box basis in response to the arbitrary sequence we feed it). Rather it should ignore the sequence in which we feed the content boxes in, preferring to generate its own sequence. And if a quantum computer is requred for this, I would not be surprised, so no pressure! ;)

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