python-mip icon indicating copy to clipboard operation
python-mip copied to clipboard

Various improvements to the HiGHS interface

Open rschwarz opened this issue 3 months ago • 3 comments

High-level summary:

  • switched binary library from highspy to highsbox, because highspy was 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)

rschwarz avatar Sep 18 '25 08:09 rschwarz

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 18 '25 08:09 CLAassistant

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)

rschwarz avatar Sep 18 '25 08:09 rschwarz

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.

rschwarz avatar Sep 18 '25 09:09 rschwarz