From 98c1d42d64f7ece3a1520a5e1c8550a7fed3e045 Mon Sep 17 00:00:00 2001 From: odow Date: Thu, 13 Jun 2024 14:04:06 +1200 Subject: [PATCH] Revert "[Bridges] use dual of equality in slack bridge (#2508)" This reverts commit 6d9378acf11653a1cb2ac6c969f388fa4be59f1e. --- src/Bridges/Constraint/bridges/slack.jl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Bridges/Constraint/bridges/slack.jl b/src/Bridges/Constraint/bridges/slack.jl index 3bc5c8ea3d..4109d9ccbf 100644 --- a/src/Bridges/Constraint/bridges/slack.jl +++ b/src/Bridges/Constraint/bridges/slack.jl @@ -127,15 +127,9 @@ function MOI.get( bridge::_AbstractSlackBridge, ) # The dual constraint on slack (since it is free) is - # `-dual_slack_in_set + dual_equality = 0` so the two duals are + # -dual_slack_in_set + dual_equality = 0 so the two duals are # equal and we can return either one of them. - # We decide to use the dual of the equality constraints because - # the `slack_in_set` constraint might be bridge by a variable bridge that - # does not # support `ConstraintDual`. This is the case if the adjoint of - # the linear map on which the bridge is based is not invertible, as for - # instance with `Variable.ZerosBridge` or - # `SumOfSquares.Bridges.Variable.KernelBridge`. - return MOI.get(model, a, bridge.equality) + return MOI.get(model, a, bridge.slack_in_set) end function MOI.set(