Skip to content

Commit 733f266

Browse files
PeterKlein11coroa
andauthored
enh(solvers): do not allocate copt license during solver check
* COPT update * remove empty check * update release notes --------- Co-authored-by: Jonas Hoersch <jonas.hoersch@openenergytransition.org>
1 parent 792d158 commit 733f266

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

doc/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Upcoming Version
55
----------------
66

77
* Added support for arithmetic operations with custom classes.
8+
* Avoid allocating a floating license for COPT during the initial solver check
89

910
Version 0.5.0
1011
--------------

linopy/solvers.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,7 @@
111111
with contextlib.suppress(ModuleNotFoundError):
112112
import coptpy
113113

114-
with contextlib.suppress(coptpy.CoptError):
115-
coptpy.Envr()
116-
117-
available_solvers.append("copt")
114+
available_solvers.append("copt")
118115

119116
quadratic_solvers = [s for s in QUADRATIC_SOLVERS if s in available_solvers]
120117
logger = logging.getLogger(__name__)

0 commit comments

Comments
 (0)