|
13 | 13 | import re |
14 | 14 | import subprocess as sub |
15 | 15 | import sys |
| 16 | +import warnings |
16 | 17 | from abc import ABC, abstractmethod |
17 | 18 | from collections import namedtuple |
18 | 19 | from collections.abc import Callable, Generator |
@@ -1654,15 +1655,18 @@ def solve_problem_from_model( |
1654 | 1655 | Path to the warmstart file. |
1655 | 1656 | basis_fn : Path, optional |
1656 | 1657 | Path to the basis file. |
1657 | | - env : None, optional |
1658 | | - Mosek environment for the solver |
| 1658 | + env : None, optional, deprecated |
| 1659 | + Ignored. |
1659 | 1660 | explicit_coordinate_names : bool, optional |
1660 | 1661 | Transfer variable and constraint names to the solver (default: False) |
1661 | 1662 |
|
1662 | 1663 | Returns |
1663 | 1664 | ------- |
1664 | 1665 | Result |
1665 | 1666 | """ |
| 1667 | + |
| 1668 | + if env is not None: |
| 1669 | + warnings.warn("Argument 'env' in solve_problem_from_model",DeprecationWarning) |
1666 | 1670 | with mosek.Task() as m: |
1667 | 1671 | m = model.to_mosek(m, explicit_coordinate_names=explicit_coordinate_names) |
1668 | 1672 |
|
@@ -1701,13 +1705,15 @@ def solve_problem_from_file( |
1701 | 1705 | Path to the warmstart file. |
1702 | 1706 | basis_fn : Path, optional |
1703 | 1707 | Path to the basis file. |
1704 | | - env : None, optional |
1705 | | - Mosek environment for the solver |
| 1708 | + env : None, optional, deprecated. |
| 1709 | + Ignored. |
1706 | 1710 |
|
1707 | 1711 | Returns |
1708 | 1712 | ------- |
1709 | 1713 | Result |
1710 | 1714 | """ |
| 1715 | + if env is not None: |
| 1716 | + warnings.warn("Argument 'env' in solve_problem_from_model",DeprecationWarning) |
1711 | 1717 | with mosek.Task() as m: |
1712 | 1718 | # read sense and io_api from problem file |
1713 | 1719 | sense = read_sense_from_problem_file(problem_fn) |
|
0 commit comments