coin-or / prtpy

Number partitioning in Python
MIT License
47 stars 20 forks source link

Multiple binsizes for packing #18

Open mostpalonen opened 1 year ago

mostpalonen commented 1 year ago

Hello!

Could it be possible to use or implement packing so that it would accept multiple bin sizes for one packing case and minimizes the total number of bins by assigning items to most appropriate sized bin. I have not yet found an implementation that would allow multiple different binsizes.

Thanks!

erelsgl commented 1 year ago

Hi. What do you mean by "most appropriate sized bin"? Do you have a specific algorithm for this?

mostpalonen commented 1 year ago

Sorry about poor problem formulation. Let's try this again. I have this case where I have n number of items to pack on pallets. And the objective is to minimize the total number of pallets. But there can be m number of different pallet sizes available.

So lets say that I have 12 items that need to be packed and 3 different pallet sizes available (e.g. 80x80cm, 80x120cm and 100x100cm dimensions are not that important, but the number of options is). The final optimal answer could be like: Pallet1 (80x80): items 1,2,4,5 Pallet2 (100x100): items 3,9,12 Pallet3 (80x120): items 6,7,8,10,11

So could it be possible to model the problem with prtpy while also supporting the optimization with multiple possible bin sizes.

Right now I have tried to implement this with constraint programming optimizer, but have not been able to support multiple bins.

erelsgl commented 1 year ago

It may be possible, but we need a specific algorithm for this. Can you find in the literature, an algorithm that solves this problem?

mostpalonen commented 1 year ago

One such publication I have been loking into is: https://doi-org.libproxy.tuni.fi/10.1109/IEA.2017.7939187

mostpalonen commented 1 year ago

Sorry, here is a direct link: https://ieeexplore.ieee.org/document/7939187 And pdf if you dont have access. A_hybrid_algorithm_application_for_the_multi-size_pallet_loading_problem_case_study_Lamp_and_lighting_factory.pdf

erelsgl commented 1 year ago

OK. This can be a useful algorithm. If anyone would like to implement it, I will be happy to add it to prtpy.