Closed erelsgl closed 2 years ago
I think the way you construct the counts
dictionary does not work as expected, because there are multiple identical item
values, which replace the previous entries. Compare this snippet:
>>> items = [11, 11, 11, 12]
>>> d = {item: i for i, item in enumerate(items)}
>>> d
{11: 2, 12: 3}
You are right. Thanks!
Describe the bug I wrote a simple MIP for the following problem: given a set of numbers, partition them into two subsets such that the smallest sum is as large as possible. The returned solution is clearly wrong.
To Reproduce
Here is the code I used:
Expected behavior The optimal partition is clearly [11, 11, 11], [11, 22], since the smallest sum in that case is 33, which is optimal.
But the returned partition is [11, 11, 11, 11], [22].
Desktop (please complete the following information): Windows 10. Python 3.9. MIP 1.13.0.