Skip to content

Commit

Permalink
Update optimizer_interface.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Feb 7, 2024
1 parent 92f6348 commit 27283b6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/optimizer_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,13 @@ function has_optimal_solution(
(allow_local && (status == LOCALLY_SOLVED)) ||
(allow_almost && (status == ALMOST_OPTIMAL)) ||
(allow_almost && allow_local && (status == ALMOST_LOCALLY_SOLVED))
primal = primal_status(model; result)
ret &=
(primal == FEASIBLE_POINT) ||
(allow_almost && (primal == NEARLY_FEASIBLE_POINT))
if dual
if ret
primal = primal_status(model; result)
ret &=
(primal == FEASIBLE_POINT) ||
(allow_almost && (primal == NEARLY_FEASIBLE_POINT))
end
if ret && dual
dual_stat = dual_status(model; result)
ret &=
(dual_stat == FEASIBLE_POINT) ||
Expand Down

0 comments on commit 27283b6

Please sign in to comment.