Skip to content

Commit f0abce0

Browse files
committed
Add high cost
1 parent 77e1362 commit f0abce0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ end
7777
const SOCtoPSD{T,OT<:MOI.ModelLike} =
7878
SingleBridgeOptimizer{SOCtoPSDBridge{T},OT}
7979

80+
# This bridge destorys a lot of structure and adding PSD variables is almost
81+
# always undesirable. We give this bridge an arbitrarily hight cost so that it
82+
# is used only if necessary.
83+
bridging_cost(::Type{<:SOCtoPSDBridge}) = 10.0
84+
8085
function concrete_bridge_type(
8186
::Type{<:SOCtoPSDBridge{T}},
8287
G::Type{<:MOI.AbstractVectorFunction},
@@ -186,6 +191,11 @@ end
186191
const RSOCtoPSD{T,OT<:MOI.ModelLike} =
187192
SingleBridgeOptimizer{RSOCtoPSDBridge{T},OT}
188193

194+
# This bridge destorys a lot of structure and adding PSD variables is almost
195+
# always undesirable. We give this bridge an arbitrarily hight cost so that it
196+
# is used only if necessary.
197+
bridging_cost(::Type{<:RSOCtoPSDBridge}) = 10.0
198+
189199
function concrete_bridge_type(
190200
::Type{<:RSOCtoPSDBridge{T}},
191201
G::Type{<:MOI.AbstractVectorFunction},

0 commit comments

Comments
 (0)