From 5b75d611a822399a01cb4cc22774ebee9c681757 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Mon, 14 Sep 2026 09:27:39 +1200 Subject: [PATCH] [Utilities] fix status checks in get_fallback --- src/Utilities/results.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Utilities/results.jl b/src/Utilities/results.jl index 34e7479907..65d3a7cfb9 100644 --- a/src/Utilities/results.jl +++ b/src/Utilities/results.jl @@ -42,7 +42,7 @@ function get_fallback(model::MOI.ModelLike, attr::MOI.ObjectiveValue) obj = eval_variables(model, f) do vi return MOI.get(model, MOI.VariablePrimal(attr.result_index), vi) end - if is_ray(MOI.get(model, MOI.PrimalStatus())) + if is_ray(MOI.get(model, MOI.PrimalStatus(attr.result_index))) # Dual infeasibility certificates do not include the primal # objective constant. obj -= MOI.constant(f, typeof(obj)) @@ -176,7 +176,7 @@ function get_fallback( c = eval_variables(model, f) do vi return MOI.get(model, MOI.VariablePrimal(attr.result_index), vi) end - if is_ray(MOI.get(model, MOI.PrimalStatus())) + if is_ray(MOI.get(model, MOI.PrimalStatus(attr.result_index))) c -= MOI.constant(f, typeof(c)) end return c @@ -371,7 +371,7 @@ function _variable_dual( ci::MOI.ConstraintIndex, vi::MOI.VariableIndex, ) where {T} - ray = is_ray(MOI.get(model, MOI.DualStatus())) + ray = is_ray(MOI.get(model, MOI.DualStatus(attr.result_index))) dual = zero(T) if !ray sense = MOI.get(model, MOI.ObjectiveSense())