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)"
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)"