Skip to content

Commit

Permalink
Add high cost
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Jan 2, 2025
1 parent 77e1362 commit f0abce0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ end
const SOCtoPSD{T,OT<:MOI.ModelLike} =
SingleBridgeOptimizer{SOCtoPSDBridge{T},OT}

# This bridge destorys a lot of structure and adding PSD variables is almost
# always undesirable. We give this bridge an arbitrarily hight cost so that it
# is used only if necessary.
bridging_cost(::Type{<:SOCtoPSDBridge}) = 10.0

Check warning on line 83 in src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl

View check run for this annotation

Codecov / codecov/patch

src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl#L83

Added line #L83 was not covered by tests

function concrete_bridge_type(
::Type{<:SOCtoPSDBridge{T}},
G::Type{<:MOI.AbstractVectorFunction},
Expand Down Expand Up @@ -186,6 +191,11 @@ end
const RSOCtoPSD{T,OT<:MOI.ModelLike} =
SingleBridgeOptimizer{RSOCtoPSDBridge{T},OT}

# This bridge destorys a lot of structure and adding PSD variables is almost
# always undesirable. We give this bridge an arbitrarily hight cost so that it
# is used only if necessary.
bridging_cost(::Type{<:RSOCtoPSDBridge}) = 10.0

Check warning on line 197 in src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl

View check run for this annotation

Codecov / codecov/patch

src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl#L197

Added line #L197 was not covered by tests

function concrete_bridge_type(
::Type{<:RSOCtoPSDBridge{T}},
G::Type{<:MOI.AbstractVectorFunction},
Expand Down

0 comments on commit f0abce0

Please sign in to comment.