BUG: `scipy.optimize.milp` sometimes crashes with `HiGHS` assertion failure in `1.9.2`
See original GitHub issueDescribe your issue.
Background: just upgraded from 1.9.1
to 1.9.2
to test out the fix for #16545.
Some MILP models that solved perfectly fine with scipy.optimize.milp
in 1.9.1
crash hard in 1.9.2
from deep within the HiGHS
code:
Running HiGHS 1.2.0 [date: 2021-07-09, git hash: n/a]
Copyright (c) 2022 ERGO-Code under MIT licence terms
Presolve is switched off
Solving MIP model with:
358 rows
332 cols (101 binary, 0 integer, 0 implied int., 231 continuous)
961 nonzeros
Nodes | B&B Tree | Objective Bounds | Dynamic Constraints | Work
Proc. InQueue | Leaves Expl. | BestBound BestSol Gap | Cuts InLp Confl. | LpIters Time
0 0 0 0.00% 0 inf inf 0 0 0 0 0.0s
0 0 0 0.00% 111.5580767 inf inf 0 0 7 46 0.0s
Assertion failed: (fracval < localdom.col_upper_[col] - mipsolver.mipdata_->feastol), function selectBranchingCandidate, file HighsSearch.cpp, line 279
I tried to investigate this myself by looking into the HiGHS
logs and the funny thing is that this assertion does not fail when I pass highs_debug_level
with a value of 1, 2 or 3 (default=0) as a verbatim option to scipy.optimize.milp()
.
Also, I noticed that somehow the HiGHS
version was downgraded from 1.2.2
to 1.2.0
between 1.9.1
and 1.9.2
. Is this intentional? If not, I guess that might be the underlying culprit?
Reproducing Code Example
N/A
Error message
Assertion failed: (fracval < localdom.col_upper_[col] - mipsolver.mipdata_->feastol), function selectBranchingCandidate, file HighsSearch.cpp, line 279
SciPy/NumPy/Python version information
1.9.2 1.23.4 sys.version_info(major=3, minor=9, micro=13, releaselevel=‘final’, serial=0)
Issue Analytics
- State:
- Created a year ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
optimize.milp fails to execute when given exactly 3 constraints ...
milp and I realized my program crashes if I give a list of 3 elements in the constraints field of optimize.milp (see error...
Read more >SciPy 1.9.0 Release Notes — SciPy v1.9.3 Manual
The default method of scipy. optimize. linprog is now 'highs' , not 'interior-point' (which is now deprecated), so callback functions and some options...
Read more >python - Generate scipy.optimize.milp Mixed-Integer Linear ...
This is a rather specific question. How do I get my TSP implementation to run with subtours using numpy arrays and scipy HiGHs...
Read more >Bug listing with status RESOLVED with resolution CANTFIX as ...
Bug :1184 - "Ideas from Sorcerer Linux" status:RESOLVED resolution:CANTFIX ... Bug:85178 - "Squid sometimes dies with ``assertion failed: store.c:523: ...
Read more >NEWS · master · GNOME / tracker · GitLab
Improved error reporting when parsing ontologies. 147. * Improvements to database rollback on ontology errors. 148. * Ontology parsing crash fixes.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Great! I’ll close this and it should be available in the next upcoming release
@mckib2 I can confirm that I was able to successfully run all my unit tests with
https://anaconda.org/scipy-wheels-nightly/scipy/1.10.0.dev0/download/scipy-1.10.0.dev0-cp39-cp39-macosx_12_0_arm64.whl
, including the one for which I opened this issue.