Originally posted by: __foo_
Hi IBM,
This issue's been bugging me for quite a while. I'm working on a variant of the bin packing problem, which can be described as below:
Problem description:
Given a number of identical items; item size is presented by a 4-dimensional vector. Given a number of bins of different sizes; bin size is presented by a 4-dimensional vector. Due to allocation constraints, an item can only be assigned to some specific pre-defined bins. An item must not exceed the remaining size of the bin and can be allocated to at most one bin. Try to put items into bins so that the number of allocated items is maximum.
Approach&Challenge:
I'm using CP Optimizer with Python to solve this problem. With 8 items and 35 bins, the program worked just fine and fast, optimal solution achieved. However, with 32 items and 85 bins, the program was running forever. I could find an optimal solution in this case if I use Mathematical Programming (MP) instead of Constraint Programming (CP) Modeling. The reason I'm using CP is that later on, I will add a non-linear objective, which MP doesn't support.
Question:
Does someone know why CP optimizer taking so long and still not able to find an optimal solution even for this seemingly small-scale scenario? I suspected that CP might not be the right tool for this problem.
Source code&data:
My Python program and sample data (sample data set 1: 32 items/85 bins; set 2: 8 items/35 bins) can be found here https://github.com/PhuLai/sample-cp-optimizer
Your help is very appreciated. Thanks very much,
Foo
#CPOptimizer#DecisionOptimization