Skip to content

Commit

Permalink
Revert "[Bridges] use dual of equality in slack bridge (#2508)"
Browse files Browse the repository at this point in the history
This reverts commit 6d9378a.
  • Loading branch information
odow committed Jun 13, 2024
1 parent d20de10 commit 98c1d42
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Bridges/Constraint/bridges/slack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 132 in src/Bridges/Constraint/bridges/slack.jl

View check run for this annotation

Codecov / codecov/patch

src/Bridges/Constraint/bridges/slack.jl#L132

Added line #L132 was not covered by tests
end

function MOI.set(
Expand Down

0 comments on commit 98c1d42

Please sign in to comment.