Open msperr opened 2 years ago
If you're looking for a workaround, CBC will solve this model fine with the symmetry constraints instead specified in an ordered line rather than all-pairs.
if symmetry_constraints:
for j1, j2 in zip(bins, bins[1:]):
model += load[j1] >= load[j2], f'Symmetry({j1},{j2})'
To the question of why it doesn't work as defined, it's a bit peculiar but seems to relate to the floating point coefficients. You can save the model to an lp file, then immediately read it back, and that will also solve. The issue could be in the Python<->C++ interface, or in CBC itself. @h-g-s may be the best person to diagnose.
I created a Bin Packing Problem with a quite small number of items. Then I added symmetry constraints in order to solve the problem faster. Unfortunately, the problem gets infeasible although it should be feasible. I'm using MIP 1.13.0 with Python 3.10.1 on Windows.
I added my code for reproducing the problem. Thanks for your help!