jerry800416 / 3D-bin-packing

3D Bin Packing improvements based on https://github.com/enzoruiz/3dbinpacking
MIT License
158 stars 44 forks source link

There is a bug in example7 #18

Open Maroon1995 opened 1 year ago

Maroon1995 commented 1 year ago

In your example7, there is a bug where the parameter level of the added item is set to different levels, and there may be a situation where all remaining items cannot be loaded when loaded into the second vehicle. At this point, the second car is empty. In the pack method, when iterating through enumerate (self. bins) to the second bin, there is a situation where bin. items are empty, and an error of dividing by 0 is reported. You need to add a check (if bin. items:) before "self. bins [idx]. activity=self. activityCenter (bin)"

jerry800416 commented 1 year ago

@Maroon1995 Thank you very much, this problem will be fixed in the next version.