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

Answer changes if I manually interchange the wdh parameters of the item #14

Open
GaganmeetSingh1234 opened this issue Sep 30, 2020 · 0 comments

Comments

@GaganmeetSingh1234
Copy link

Hi,

I get different answers if I change the wdh for one of the boxes. For example, if I go with this:
#adding a bin
packer.add_bin(Bin('small-envelope', 3,3,3, 100))
#adding boxes
packer.add_item(Item('50g [powder 1]', 3,3,1, 1))
packer.add_item(Item('50g [powder 2]', 3,3,1, 2))
packer.add_item(Item('50g [powder 3]', 3,2,1, 3))
#answer I get
FITTED ITEMS:
====> 50g [powder 3](3.000x2.000x1.000, weight: 3.000) pos([0, 0, 0]) rt(0) vol(6.000)
====> 50g [powder 1](3.000x3.000x1.000, weight: 1.000) pos([0, Decimal('2.000'), 0]) rt(2) vol(9.000)
UNFITTED ITEMS:
====> 50g [powder 2](3.000x3.000x1.000, weight: 2.000) pos([0, 0, 0]) rt(5) vol(9.000)



It should be able to add all the three boxes in this particular bin.
But if I change the wdh positions for the third item,
#adding a bin
packer.add_bin(Bin('small-envelope', 3,3,3, 100))
#adding boxes
packer.add_item(Item('50g [powder 1]', 3,3,1, 1))
packer.add_item(Item('50g [powder 2]', 3,3,1, 2))
packer.add_item(Item('50g [powder 3]', 1,2,3, 3))
#answer I get
FITTED ITEMS:
====> 50g [powder 3](1.000x2.000x3.000, weight: 3.000) pos([0, 0, 0]) rt(0) vol(6.000)
====> 50g [powder 1](3.000x3.000x1.000, weight: 1.000) pos([Decimal('1.000'), 0, 0]) rt(3) vol(9.000)
====> 50g [powder 2](3.000x3.000x1.000, weight: 2.000) pos([Decimal('2.000'), 0, 0]) rt(3) vol(9.000)
UNFITTED ITEMS:



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

0 participants