Latest Cbc build doesn't work with python-mip from pip
See original GitHub issueIssue Description
Describe the bug
python-mip
doesn’t come with aarch64 libs (eg for an M1 mac) (also see #199), so the only way to run it is by building cbc manually. Unfortunately, the documented way of doing that just grabs master
, which currently fails the build, but Cbc@a1f4dd2dd02e5739b400de62a0c460b264311809
build successfully and can be used as a dylib. The main issue is it doesn’t work with the latest pip version of python-mip
(and, as far as I can tell, won’t work with master
either):
Welcome to the CBC MILP Solver
Version: devel
Build Date: Jan 12 2022
Starting solution of the Linear programming relaxation problem using Primal Simplex
Coin0506I Presolve 58925 (-8413) rows, 52054 (-98143) columns and 207325 (-34239) elements
Clp0030I 11 infeas 23.346334, obj 9337.4902 - mu 0.020680678, its 105, 39503 interior
Clp0030I 22 infeas 2.0744055, obj 9410.1855 - mu 0.00025521491, its 105, 41072 interior
Clp0030I 33 infeas 0.045116952, obj 9410.9402 - mu 9.4495685e-06, its 105, 42120 interior
Clp0030I 45 infeas 0.00054603362, obj 9410.9704 - mu 1.1661468e-07, its 105, 42140 interior
Clp1000I sum of infeasibilities 3.75798e-05 - average 6.37757e-10, 9915 fixed columns
Coin0506I Presolve 18479 (-40446) rows, 20478 (-31576) columns and 59541 (-147784) elements
Clp0006I 0 Obj 9410.9708 Dual inf 2141846.9 (20478)
Clp0029I End of values pass after 20478 iterations
Clp0014I Perturbing problem by 0.001% of 1.3997147 - largest nonzero change 2.9996244e-05 ( 0.0026276029%) - largest zero change 2.9984169e-05
Clp0000I Optimal - objective value 9794.4
Clp0000I Optimal - objective value 9794.4
Coin0511I After Postsolve, objective 9794.4, infeasibilities - dual 0 (0), primal 0 (0)
Clp0006I 0 Obj 9794.4
Clp0000I Optimal - objective value 9794.4
Clp0000I Optimal - objective value 9794.4
Clp0000I Optimal - objective value 9794.4
Coin0511I After Postsolve, objective 9794.4, infeasibilities - dual 0 (0), primal 0 (0)
Clp0032I Optimal objective 9794.4 - 0 iterations time 3.662, Presolve 0.11, Idiot 3.53
Starting MIP optimization
Unrecognized parameter - maxSavedSolutions=10, exiting...
Total time (CPU seconds): 3e-05 (Wallclock seconds): 0.000328064
no feasible solution found, lower bound is: -1.7976931348623157e+308
This line https://github.com/coin-or/python-mip/blob/a95310fd9f86bdfd4386a7cb500a38a25c5096ae/mip/cbc.py#L1186 tries to set maxSavedSolutions
, which seems to not be recognised by the latest version of cbc.
The problem is solved to completion if I comment that line out manually.
To Reproduce
I believe the description above should qualify.
Expected behavior
I’d expect it to not fail with an error. It would be perfect to have macos aarch64 builds in the wheel, but I understand that’s a bit complex. A possible alternative solution would be explicitly pinning the version of cbc that python-mip
definitely works with.
Desktop (please complete the following information):
- Operating System, version: macOS Monterey 12.1
- Python version: 3.9.9
- Python-MIP version (we recommend you to test with the latest version): 1.13.0
Additional context
None
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
This should be easy to fix. Rather than workarounds, why don’t we just fix the problem so we can move further towards getting Cbc master out into release? If someone on the python-mip side could be precise about what is going wrong and perhaps identify a fix, I will do whatever is required on the Cbc side.
Hi, we’re having some problems in using recent master after the refactor branch was incorporated into Cbc. While this problems aren’t solved the latest Cbc commit which would probably be compatible would be this: https://github.com/coin-or/Cbc/commit/96cd94b0400e0012885c64ef1f9a3e7c3459014f