Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error in HiGHS interface for infeasible/unbounded solutions #732

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

tmaarse
Copy link
Contributor

@tmaarse tmaarse commented Feb 21, 2024

Currently the following problem:

from pulp import *

problem = LpProblem("infeasible", LpMaximize)

# Infeasible problem
x = LpVariable("x", 0, 1)
y = LpVariable("y", 0, 1)
problem += x <= -1

solver = HiGHS_CMD(timeLimit=1, msg=1)

problem.solve(solver)

results in an error pulp.apis.core.PulpSolverError: Cannot read HiGHS solver output (line 253 of highs_api.py).

This error appeared after b0856c2, which sets the solution status for infeasible/unbounded problems. This PR fixes the attempt to read the solution in those cases.

pulp/apis/highs_api.py Outdated Show resolved Hide resolved
@pchtsp pchtsp merged commit 6e18ecb into coin-or:master Feb 27, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants