Skip to content

Possible optimization's for Bin Packing #26

Description

@vorasmit

Items are packed as it is, without trying to rotate items for a better fit. Where rotation is allowed and bulk item quantities are there, permutations could be reduced just by rotating all items at once.

There is huge cost of shipping associated with inefficient packing

eg: Efficiency of 70.9% and 12.5% is received for the following case with two boxes.

items = create_items(
        {
            "item1": {
                "name": "euro_pallet",
                "quantity": 40,
                "width": 5,
                "hight": 3.94,
                "depth": 2.625,
                "weight": 40,
            }
        }
    )
    bins = create_bins(
        {
            "container1": {
                "name": "40_ft_container",
                "width": 40,
                "hight": 7.75,
                "depth": 8,
                "max_weight": 20000,
            }
        }
    )
    best_bins = get_best_bins(items, bins)
    print([bin.efficacy for bin in best_bins])

eg: Efficiency of 83.5% is received for the following case with one box just by switching width and height.

items = create_items(
        {
            "item1": {
                "name": "euro_pallet",
                "quantity": 40,
                "width": 3.94,
                "hight": 5,
                "depth": 2.625,
                "weight": 40,
            }
        }
    )
    bins = create_bins(
        {
            "container1": {
                "name": "40_ft_container",
                "width": 40,
                "hight": 7.75,
                "depth": 8,
                "max_weight": 20000,
            }
        }
    )
    best_bins = get_best_bins(items, bins)
    print([bin.efficacy for bin in best_bins])
    ```
    
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions