Releases: coin-or/python-mip
Python MIP 1.17
python-mip 1.17 Released 🎉
HiGHS is now a supported solver
python-mip 1.17 ships with full support for HiGHS — a high-performance,
open-source LP/MIP solver with an MIT licence. HiGHS joins CBC and Gurobi as a first-class
backend. It supports LP and MIP solve, warm-starting for LP re-solves, and the full
python-mip constraint/variable API.
HiGHS binaries are distributed via highsbox, installed automatically as an optional
dependency:
pip install mip[highs]
This work was led primarily by Robert Schwarz, with contributions from Túlio Toffolo,
Adeel Khan, Bernard Zweers, and Miguel Hisojo. The integration spanned many months
of careful incremental work — thank you all!
CBC binary distribution via cbcbox
Historically, pre-built CBC binaries lived directly in the python-mip repository, requiring
a full python-mip release for every CBC update and manual cross-platform builds.
With 1.17, CBC binary distribution is fully decoupled into
cbcbox, a dedicated companion package with pre-built
wheels for:
- Linux x86_64 and aarch64
- macOS x86_64 and arm64 (Apple Silicon, native — no Rosetta!)
- Windows x64
cbcbox is installed automatically. The same architecture applies to HiGHS via highsbox.
Automated releases via GitHub Actions
Publishing a new version of python-mip to PyPI is now as simple as:
git tag v1.17.1 && git push --tags
A GitHub Actions workflow using OIDC Trusted Publisher handles building and uploading to
PyPI with no API tokens to manage.
Python 3.10–3.13 + PyPy 3.11; minimum raised to 3.10
python-mip now officially supports Python 3.10, 3.11, 3.12, 3.13 and PyPy 3.11, tested
across Linux (x86_64 and arm64), macOS (Apple Silicon), and Windows. Python 3.8 and 3.9
have reached end-of-life and are no longer supported.
Bug Fixes (cumulative 1.17 + 1.17.1)
- GMI cut crash (
CutType.GMI):scaleCutIntegralassert in Osi/Cgl. Fixed upstream. - CBC re-solve correctness:
optimize()called multiple times could return stale results.
Fixed by callingCbc_reset()before each solve. - Empty
LinExprin constraints handled correctly (thanks Sebastian Heger, #237). - Windows DLL loading fixed for Python 3.8+ (
os.add_dll_directorynow used). - Stale HiGHS error message corrected to reference
highsboxinstead ofhighspy.
Upgrading
pip install --upgrade mip
For HiGHS support:
pip install --upgrade "mip[highs]"
Contributors
Thank you to everyone who contributed code, bug reports, and reviews since 1.15:
Robert Schwarz · Túlio Toffolo · Sebastian Heger · Dominik Peters ·
Adeel Khan · Bernard Zweers · Miguel Hisojo · Haroldo Santos
What's New in 1.17.1
CBC crash fix: Gomory Mixed-Integer cuts (CutType.GMI)
A crash was discovered when using CutType.GMI with recent CBC versions. The root cause was
a bug in scaleCutIntegral — a function shared by OsiCuts and CglGomory — that modified
coefficient arrays in place before asserting integrality, causing an abort() when
borderline floating-point rounding left a value just outside the 1e-9 tolerance. The fix
(pre-check all values before applying any modification) was committed directly to the upstream
COIN-OR repositories coin-or/Osi and
coin-or/Cgl and is included in cbcbox 2.910.
Updated CBC binaries via cbcbox 2.910
python-mip 1.17.1 requires cbcbox>=2.910, which ships binaries built from the latest
COIN-OR master (post-fix). The new wheels include:
- The
scaleCutIntegralcrash fix in both Osi and Cgl - Updated
CutTypeC enum (CT_LaGomoryremoved; entries renumbered) correctly reflected
in python-mip'sffi.cdef - Performance improvements from recent COIN-OR master commits
cbcbox: faster CBC, simpler releases
cbcbox is now the sole distribution channel for CBC binaries. This decoupling means future
CBC improvements — algorithm enhancements, bug fixes, new COIN-OR master commits — can reach
users with a cbcbox release alone, without touching python-mip at all. The release cycle
for CBC upgrades is now:
- Push fix to upstream COIN-OR (coin-or/Cbc, coin-or/Cgl, coin-or/Osi, …)
- Bump
cbcboxversion and push — CI builds all platforms automatically - Bump
cbcbox>=X.Yin python-mippyproject.tomland push a tag
On x86_64 (Linux, macOS, Windows), cbcbox ships two complete solver stacks per wheel:
| Variant | OpenBLAS kernel | Description |
|---|---|---|
generic |
DYNAMIC_ARCH runtime dispatch |
Compatible with any x86_64 CPU |
avx2 |
HASWELL 256-bit AVX2/FMA |
Optimised for Haswell (2013+) and newer |
The best variant is selected automatically at import time. The AVX2 build delivers measurable
speedups on modern hardware thanks to wider SIMD in the dense linear algebra kernels used by
Clp's simplex solver.
Full changelog: https://github.com/coin-or/python-mip/blob/master/CHANGELOG.md
1.16.0 pre
This release includes:
- Initial support for the HiGHS solver, a contribution from Robert Schwarz
- Initial support for Mac M1/M2/M3
1.15.0
1.14.2
What's Changed
- fix #303 thread parameter setting using setter by @Sceriffo in #304
- Update os and python versions as well as pyproject.toml (#319) by @sebheger in #320
- Update install.rst by @kasperdokter in #315
- Add support for gurobi v10 (#316) by @sebheger in #321
New Contributors
- @Sceriffo made their first contribution in #304
- @kasperdokter made their first contribution in #315
Full Changelog: 1.14.1...1.14.2
Release 1.14.1
What's Changed
- Introduce pyproject.toml by @sebheger in #283
- Fix for
TypeError: can only concatenate str (not "type") to strby @Markus28 in #288 - Pin pypy version for CI by @sebheger in #295
- Update macos version in CI by @sebheger in #298
- Added pre-commit by @Markus28 in #293
- Fix Gurobi
objectiveby @Markus28 in #290 - Fix removal of variables (#294) by @sebheger in #296
- Update version of numpy by @sebheger in #301
- Remove and untrack mip/_version.py to make setuptools_scm work correctly by @sebheger in #302
New Contributors
Full Changelog: 1.14.0...1.14.1
1.14.0
What's Changed
- Fix typo in quickstart by @dzhou343 in #177
- Fix line numbers on 0/1 Knapsack Problem example. by @Silventino in #212
- Remove repetition in docs by @fortierq in #232
- Fix broken link in docs by @fortierq in #231
- Make black happy again by @sebheger in #259
- fix: handle objective constant with gurobi by @peterlietz in #214
- Add some more tests and fix a rare case at failed optimization of unbounded model by @sebheger in #241
- Make black happy again by @sebheger in #261
- Update arithmetic of VAR entity and fixes attribute query by @sebheger in #244
- Fix missing starts by @aphi in #242
- Update CI for windows by @sebheger in #265
- LinExpr update and added tests by @sebheger in #264
- Add support for gurobi installed via gurobipy from pip (#185) by @sebheger in #271
- fixed closing bracket typo by @brmanuel in #243
- Reactivate all os / python version combinations in CI by @sebheger in #278
New Contributors
- @dzhou343 made their first contribution in #177
- @Silventino made their first contribution in #212
- @fortierq made their first contribution in #232
- @sebheger made their first contribution in #259
- @peterlietz made their first contribution in #214
- @aphi made their first contribution in #242
- @brmanuel made their first contribution in #243
Full Changelog: 1.13.0...1.14.0
1.13.0
1.12.0
- ability to read and write LP optimal basis files (.bas extension)
- speedup gurobi initialization, thanks @jurasofish
- fix for querying column contents in callbacks, thanks @rodoufu
- fix for mip gap, thanks @nick-gorman
- fix for cbc in dense conflict graphs
1.11.0
Python-MIP 1.11.0
-
Two additional parameters, three depth and pass number, are now informed to the generage_constrs method in ConstrsGenerator class (which is used for cut/lazy constraints callbacks). Thus, strategies that generate more/less cuts at a given depth can use this information. See here .
-
Cut generators: additional cut generators can now be called at the root node in customized cutting planes algorithms, see here .
-
Instance features: it is now possible to query a vector of instance features. These features can be used in machine learning algorithms, for example, to decide the best parameter settings. Basic features are just the problems dimensions, e.g.: columns, rows, non-zeros. The current implementation extracts 208 instance features. To see an implementation of algorithm selection that is used in the COIN-OR Linear Programming Solver (CLP) check: Vilas Boas, M.G., Santos, H.G., Merschmann, L.H.C. and Vanden Berghe, G. Optimal Decision Trees for the Algorithm Selection Problem: Integer Programming Based Approaches. International Transactions in Operational Research, DOI 10.1111/itor.12724. 2019.
1.10.0
This release release adds a new model method: clique_merge, which merges constraints of conflicting variables (usually set packing) to produce a more compact and stronger formulation.
Two new stopping criteria were added: max nodes/seconds without improving the incumbent solution.
We also added more tests and fixed some bugs in the Cbc C Interface.