From b0a5636db059defbef9272adf09a61aaba5e5280 Mon Sep 17 00:00:00 2001 From: FBumann <117816358+FBumann@users.noreply.github.com> Date: Wed, 27 May 2026 18:08:18 +0200 Subject: [PATCH 1/2] fix: exclude highspy 1.14.0 to avoid suboptimal MIP solutions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit highspy 1.14.0 ships a presolve regression that returns wrong MIP optima on big-M / invest-style models. Fixed upstream on HiGHS `latest` but unreleased; PyPSA/linopy already excludes it in their `solvers` extra, which flixopt does not pull — so the constraint never propagated to us. Refs: ERGO-Code/HiGHS#2975, PyPSA/linopy#651. Co-Authored-By: Claude Opus 4.7 (1M context) --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 31d2f1ec3..2bbe84f93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,9 @@ dependencies = [ "colorlog >= 6.8.0, < 7", "tqdm >= 4.66.0, < 5", # Default solver - "highspy >= 1.5.3, < 2", + # 1.14.0 excluded: presolve regression returns wrong MIP optima on big-M / invest-style models. + # Fixed on HiGHS `latest` branch but not yet released. See ERGO-Code/HiGHS#2975 and PyPSA/linopy#651. + "highspy >= 1.5.3, < 2, != 1.14.0", # Visualization "matplotlib >= 3.5.2, < 4", "plotly >= 5.15.0, < 7", From fe8e90157af44937fd5826dff3e8fac42885376f Mon Sep 17 00:00:00 2001 From: FBumann <117816358+FBumann@users.noreply.github.com> Date: Wed, 27 May 2026 18:23:00 +0200 Subject: [PATCH 2/2] chore: pin highspy in [dev] for deterministic CI Add highspy==1.13.1 (latest known-good) to the [dev] extras alongside the existing scipy/tsam pins. Matches the pattern of pinning the runtime deps that have recently caused CI drama, so a future bad highspy release can't sneak in via fresh resolution. Drop once HiGHS#2975's fix ships in highspy 1.14.1+. Co-Authored-By: Claude Opus 4.7 (1M context) --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 2bbe84f93..3d6d72084 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,6 +88,7 @@ dev = [ "pre-commit==4.6.0", "pyvis==0.3.2", "scipy==1.16.3", # 1.16.1+ required for Python 3.14 wheels + "highspy==1.13.1", # Latest known-good. Bump once HiGHS#2975 fix ships in 1.14.1+ "gurobipy==12.0.3; python_version < '3.14'", # No Python 3.14 wheels yet "dash==3.3.0", "dash-cytoscape==1.0.2",