From f0abce071e9c01b531f58340e298e27cae488d54 Mon Sep 17 00:00:00 2001 From: odow Date: Fri, 3 Jan 2025 11:18:33 +1300 Subject: [PATCH] Add high cost --- src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl b/src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl index df695beb7d..7056ffe732 100644 --- a/src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl +++ b/src/Bridges/Constraint/bridges/SOCtoPSDBridge.jl @@ -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 + function concrete_bridge_type( ::Type{<:SOCtoPSDBridge{T}}, G::Type{<:MOI.AbstractVectorFunction}, @@ -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 + function concrete_bridge_type( ::Type{<:RSOCtoPSDBridge{T}}, G::Type{<:MOI.AbstractVectorFunction},