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

Setting Maximum Dimensions for Bins #1

Open
EduardoArgenti opened this issue May 6, 2024 · 3 comments
Open

Setting Maximum Dimensions for Bins #1

EduardoArgenti opened this issue May 6, 2024 · 3 comments

Comments

@EduardoArgenti
Copy link

Is there a way to prevent the bin size from exceeding certain maximum dimensions?

@EduardoArgenti EduardoArgenti changed the title Setting Maximum Dimensions for Bins in Container Setting Maximum Dimensions for Bins May 6, 2024
@KoukatsuMahoutsukai
Copy link
Owner

KoukatsuMahoutsukai commented May 7, 2024

This is possible with playing around the "init_dimension" variable at line 531 of main.py. The way it works right now is that it assumes an initial dimension and decrement from that, one could add a check to make sure that the initial dimension isn't larger than the wanted dimension, but that would partially defeat the goal of this code since it is running on assumptions where the bin size is unknown, unless you want to restrict only one or two dimensions.

If you have an idea on the bin size and its ideal dimensions then I think this repo wont be the one you would be interested in, it would rather be this binpacker from jerry800416 which was the basis for this repo.

@EduardoArgenti
Copy link
Author

This is possible with playing around the "init_dimension" variable at line 531 of main.py. The way it works right now is that it assumes an initial dimension and decrement from that, one could add a check to make sure that the initial dimension isn't larger than the wanted dimension, but that would partially defeat the goal of this code since it is running on assumptions where the bin size is unknown, unless you want to restrict only one or two dimensions.

If you have an idea on the bin size and its ideal dimensions then I think this repo wont be the one you would be interested in, it would rather be this binpacker from jerry800416 which was the basis for this repo.

Actually, not knowing the bin size is still useful to me. The thing is that some carriers have limits (i.e: 100x80x60cm), so the packer should not create a bin bigger than the max dimensions. Is there a way to check the current bin size on each item added? This would enable the code to halt packing once the bin reaches its size limit, and than we can iterate over the remaining items to create another appropriately sized bin.

@KoukatsuMahoutsukai
Copy link
Owner

KoukatsuMahoutsukai commented May 8, 2024

Is there a way to check the current bin size on each item added? This would enable the code to halt packing once the bin reaches its size limit, and than we can iterate over the remaining items to create another appropriately sized bin.

currently with this code I don't think this is possible since it works with all the items inside the bin initially and decrease the bin size from thereon. one would need the reverse of this algorithm for that to be possible, also if I remember correctly this algorithm only solves for a single bin

with the example you've given however I think you can make do with a use of both this repo and jerry800416's repo. or do a modification so that you can achieve it, list all the items and known bin sizes and use jerry800416's 3dbinpacker. it would then output which items didn't fit and then input those items into the unknown bin packer maybe?

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