Skip to content

Commit 3ac945f

Browse files
committed
WIP
1 parent e550bb5 commit 3ac945f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

linopy/solvers.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import re
1414
import subprocess as sub
1515
import sys
16+
import warnings
1617
from abc import ABC, abstractmethod
1718
from collections import namedtuple
1819
from collections.abc import Callable, Generator
@@ -1654,15 +1655,18 @@ def solve_problem_from_model(
16541655
Path to the warmstart file.
16551656
basis_fn : Path, optional
16561657
Path to the basis file.
1657-
env : None, optional
1658-
Mosek environment for the solver
1658+
env : None, optional, deprecated
1659+
Ignored.
16591660
explicit_coordinate_names : bool, optional
16601661
Transfer variable and constraint names to the solver (default: False)
16611662
16621663
Returns
16631664
-------
16641665
Result
16651666
"""
1667+
1668+
if env is not None:
1669+
warnings.warn("Argument 'env' in solve_problem_from_model",DeprecationWarning)
16661670
with mosek.Task() as m:
16671671
m = model.to_mosek(m, explicit_coordinate_names=explicit_coordinate_names)
16681672

@@ -1701,13 +1705,15 @@ def solve_problem_from_file(
17011705
Path to the warmstart file.
17021706
basis_fn : Path, optional
17031707
Path to the basis file.
1704-
env : None, optional
1705-
Mosek environment for the solver
1708+
env : None, optional, deprecated.
1709+
Ignored.
17061710
17071711
Returns
17081712
-------
17091713
Result
17101714
"""
1715+
if env is not None:
1716+
warnings.warn("Argument 'env' in solve_problem_from_model",DeprecationWarning)
17111717
with mosek.Task() as m:
17121718
# read sense and io_api from problem file
17131719
sense = read_sense_from_problem_file(problem_fn)

0 commit comments

Comments
 (0)