Skip to content

KeyError: 'o_0' in baselin.py #6

@jonas-morsch

Description

@jonas-morsch

got a Keyerror when using the baseline algorithm

File c:\Users\g7morsj22l\Documents\02_Code_Repos\3d-bpp\src\baseline.py:174, in baseline(superitems_pool, pallet_dims, tlim, num_workers)
    172 layer_pool = layers.LayerPool(superitems_pool, pallet_dims)
    173 for l in range(max_layers):
--> 174     if sol[f"o_{l}"] > 0:
    175         superitems_in_layer = [s for s in range(n_superitems) if sol[f"z_{s}_{l}"] == 1]
    176         layer = utils.build_layer_from_model_output(
    177             superitems_pool, superitems_in_layer, sol, pallet_dims

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