From 907fecae44d4750ffa933bae55cd5cde315f2a66 Mon Sep 17 00:00:00 2001 From: odow Date: Thu, 18 Nov 2021 11:06:49 +1300 Subject: [PATCH] Fix objective values for certificates --- src/MOI_wrapper/MOI_wrapper.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/MOI_wrapper/MOI_wrapper.jl b/src/MOI_wrapper/MOI_wrapper.jl index 88622b04..856ec04f 100644 --- a/src/MOI_wrapper/MOI_wrapper.jl +++ b/src/MOI_wrapper/MOI_wrapper.jl @@ -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,