Skip to content

Commit

Permalink
Merge pull request #2125 from bknueven/xpress_warning
Browse files Browse the repository at this point in the history
Issue warning when using the Xpress LP/MPS interface
  • Loading branch information
blnicho authored Sep 28, 2021
2 parents c0b92cb + b66daec commit 6f79c07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyomo/environ/tests/standalone_minimal_pyomo_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def run_writer_test():
def run_solverfactory_test():
skip_solvers = {
'py',
'xpress',
'_xpress_shell',
'_mock_xpress',
}

with LoggingIntercept() as LOG, capture_output(capture_fd=True) as OUT:
Expand Down
6 changes: 6 additions & 0 deletions pyomo/solvers/plugins/solvers/XPRESS.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ class XPRESS_shell(ILMLicensedSystemCallSolver):
"""

def __init__(self, **kwds):
logger.warning(
"The shell interface for Xpress is broken for recent versions "\
"of Xpress. Please use xpress_direct or xpress_persistent, "\
"which require the Xpress Python API. Python bindings "\
"for recent versions of Xpress can be installed via `pip`: "\
"<https://pypi.org/project/xpress/>.")
#
# Call base class constructor
#
Expand Down

0 comments on commit 6f79c07

Please sign in to comment.