Skip to content

Commit

Permalink
Fix bugs in HiGHS termination status
Browse files Browse the repository at this point in the history
  • Loading branch information
KeShih committed Jul 25, 2024
1 parent f286686 commit 7c565cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyoptinterface/_src/highs.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def get_terminationstatus(model):
elif model_status == Enum.kHighsModelStatusOptimal:
return TerminationStatusCode.OPTIMAL
elif model_status == Enum.kHighsModelStatusInfeasible:
return TerminationStatusCode.Infeasible
return TerminationStatusCode.INFEASIBLE
elif model_status == Enum.kHighsModelStatusUnboundedOrInfeasible:
return TerminationStatusCode.INFEASIBLE_OR_UNBOUNDED
elif model_status == Enum.kHighsModelStatusUnbounded:
Expand All @@ -206,7 +206,7 @@ def get_terminationstatus(model):
elif model_status == Enum.kHighsModelStatusTimeLimit:
return TerminationStatusCode.TIME_LIMIT
elif model_status == Enum.kHighsModelStatusIterationLimit:
return TerminationStatusCode.IterationLimit
return TerminationStatusCode.ITERATION_LIMIT
elif model_status == Enum.kHighsModelStatusUnknown:
return TerminationStatusCode.OTHER_ERROR
else:
Expand Down

0 comments on commit 7c565cd

Please sign in to comment.