You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run HiGHS in an infeasible problem but the solve step raises the RuntimeError exception, instead of returning a results object with the termination status being infeasible. Tried using both using the solver class Highs and the SolverFactory("appsi_highs"), but both produce the same behavior. Moreover, I followed the indication opt.config.load_solution=False, but the exception still raised.
Steps to reproduce the issue
$ python highs_error.pyWARNING: Loading a SolverResults object with a warning status intomodel.name="unknown"; - termination condition: infeasible - message from solver: <undefined>Termination Condition: infeasibleRunning HiGHS 1.5.3 [date: 2023-05-16, git hash: 594fa5a9d-dirty]Copyright (c) 2023 HiGHS under MIT licence termsRuntimeErrorRunning HiGHS 1.5.3 [date: 2023-05-16, git hash: 594fa5a9d-dirty]Copyright (c) 2023 HiGHS under MIT licence termsRuntimeErrorRunning HiGHS 1.5.3 [date: 2023-05-16, git hash: 594fa5a9d-dirty]Copyright (c) 2023 HiGHS under MIT licence termsRuntimeError
Running HiGHS 1.5.3 [date: 2023-05-16, git hash: 594fa5a9d-dirty]
Copyright (c) 2023 HiGHS under MIT licence terms
Traceback (most recent call last):
File "/home/victor/Work/Seita/flexmeasures/pyomo_mve.py", line 23, in <module>
results = opt.solve(
File "/home/victor/Work/Seita/flexmeasures/venv/lib/python3.10/site-packages/pyomo/contrib/appsi/solvers/highs.py", line 250, in solve
res = self._solve(timer)
File "/home/victor/Work/Seita/flexmeasures/venv/lib/python3.10/site-packages/pyomo/contrib/appsi/solvers/highs.py", line 234, in _solve
return self._postsolve(timer)
File "/home/victor/Work/Seita/flexmeasures/venv/lib/python3.10/site-packages/pyomo/contrib/appsi/solvers/highs.py", line 657, in _postsolve
raise RuntimeError(
RuntimeError: A feasible solution was not found, so no solution can be loaded.Please set opt.config.load_solution=False and check results.termination_condition and results.best_feasible_objective before loading a solution.
Information on your system
Pyomo version: Pyomo 6.6.1 (CPython 3.10.6 on Linux 6.2.6-76060206-generic)
Python version: Python 3.10.6
Operating system: Pop Os
How Pyomo was installed (PyPI, conda, source): pip
Solver: HiGHs (v.1.5.3), installed through the pip package highspy (v.1.5.3).
The text was updated successfully, but these errors were encountered:
opt.config.load_solution = False only works with opt_highs = Highs(). If you use the solver factory, you have to use results = opt_highs_factory.solve(model, load_solutions=False).
Summary
I run HiGHS in an infeasible problem but the solve step raises the
RuntimeError
exception, instead of returning a results object with the termination status beinginfeasible
. Tried using both using the solver classHighs
and theSolverFactory("appsi_highs")
, but both produce the same behavior. Moreover, I followed the indicationopt.config.load_solution=False
, but the exception still raised.Steps to reproduce the issue
Error Message
Information on your system
Pyomo version: Pyomo 6.6.1 (CPython 3.10.6 on Linux 6.2.6-76060206-generic)
Python version: Python 3.10.6
Operating system: Pop Os
How Pyomo was installed (PyPI, conda, source): pip
Solver: HiGHs (v.1.5.3), installed through the pip package
highspy
(v.1.5.3).The text was updated successfully, but these errors were encountered: