Skip to content

Commit

Permalink
Merge pull request #199 from jotaigna/mosek_checkin_license
Browse files Browse the repository at this point in the history
MOSEK ensure any license tokens are checked in after initialisation
  • Loading branch information
FabianHofmann authored Nov 10, 2023
2 parents b437f93 + 28fe096 commit 05a171b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions linopy/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@
import mosek

with contextlib.suppress(mosek.Error):
with mosek.Task() as m:
m.optimize()
with mosek.Env() as m:
t = m.Task()
t.optimize()
m.checkinall()

available_solvers.append("mosek")
with contextlib.suppress(ImportError):
Expand Down

0 comments on commit 05a171b

Please sign in to comment.