python-mip
python-mip copied to clipboard
Various improvements to the HiGHS interface
High-level summary:
- switched binary library from
highspytohighsbox, becausehighspywas not meant to be used that way, which caused problems on some platforms - bugfixes in
var_get_index/constr_get_index, when a user asks for a variable/constraint with an invalid name - bugfix in
set_objective, where we now first reset the objective with all-zero coefficients - bugfix in
get_var_type, with work-around for purely continuous problems - added more tests
- allow for Python 3.13 (not specific to HiGHS)
When I ran tests locally, I got errors (actually crashes) with CBC, but if I just test
pytest -k "not CBC" test/test_model.py test/mip_test.py
It all works fine.
EDIT: See
$ pytest -k CBC test/test_model.py
===== test session starts =====
platform linux -- Python 3.12.3, pytest-8.4.2, pluggy-1.6.0
rootdir: /home/robert/src/python-mip
configfile: pyproject.toml
plugins: xdist-3.8.0
collected 278 items / 139 deselected / 139 selected
test/test_model.py .Aborted (core dumped)
I've also made a change to the pre-commit configuration (upgrade flake8) to avoid an error that happens during the first of the checks.