Skip to content

Commit

Permalink
Fix objective values for certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Nov 24, 2021
1 parent d93b650 commit 907feca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/MOI_wrapper/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@ function MOI.optimize!(
dest.sol.slack;
options...,
)
# If the solution is an infeasibility certificate, the objective values are
# left as infinite, not the value corresponding to the ray.
if !isfinite(sol.info.dobj)
sol.info.dobj = -Ab.constants' * sol.y
end
if !isfinite(sol.info.pobj)
sol.info.pobj = c' * sol.x
end
dest.sol = MOISolution(
sol.x,
sol.y,
Expand Down

0 comments on commit 907feca

Please sign in to comment.