Skip to content

Commit 733b368

Browse files
davide-fpre-commit-ci[bot]FabianHofmann
committed
enable quadratic for win with scip (PyPSA#588)
* enable quadratic for win with scip * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add release note * Drop reference to SCIP bug --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Fabian Hofmann <fab.hof@gmx.de>
1 parent 8ab2a48 commit 733b368

3 files changed

Lines changed: 2 additions & 11 deletions

File tree

doc/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Upcoming Version
99
* Add ``linopy.breakpoints()`` factory for convenient breakpoint construction from lists, dicts, or keyword arguments. Includes ``breakpoints.segments()`` for disjunctive formulations.
1010
* Add the `sphinx-copybutton` to the documentation
1111
* Add SOS1 and SOS2 reformulations for solvers not supporting them.
12+
* Enable quadratic problems with SCIP on windows.
1213

1314

1415
Version 0.6.5

linopy/solver_capabilities.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from __future__ import annotations
99

10-
import platform
1110
from dataclasses import dataclass
1211
from enum import Enum, auto
1312
from importlib.metadata import PackageNotFoundError
@@ -181,21 +180,12 @@ def supports(self, feature: SolverFeature) -> bool:
181180
display_name="SCIP",
182181
features=frozenset(
183182
{
184-
SolverFeature.INTEGER_VARIABLES,
185-
SolverFeature.LP_FILE_NAMES,
186-
SolverFeature.READ_MODEL_FROM_FILE,
187-
SolverFeature.SOLUTION_FILE_NOT_NEEDED,
188-
}
189-
if platform.system() == "Windows"
190-
else {
191183
SolverFeature.INTEGER_VARIABLES,
192184
SolverFeature.QUADRATIC_OBJECTIVE,
193185
SolverFeature.LP_FILE_NAMES,
194186
SolverFeature.READ_MODEL_FROM_FILE,
195187
SolverFeature.SOLUTION_FILE_NOT_NEEDED,
196188
}
197-
# SCIP has a bug with quadratic models on Windows, see:
198-
# https://github.com/PyPSA/linopy/actions/runs/7615240686/job/20739454099?pr=78
199189
),
200190
),
201191
"mosek": SolverInfo(

test/test_optimization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
params.append(("mosek", "lp", True))
5656

5757

58-
# Note: Platform-specific solver bugs (e.g., SCIP quadratic on Windows) are now
58+
# Note: Platform-specific solver bugs are now
5959
# handled in linopy/solver_capabilities.py by adjusting the registry at import time.
6060
feasible_quadratic_solvers: list[str] = list(quadratic_solvers)
6161

0 commit comments

Comments
 (0)