@@ -78,21 +78,24 @@ by the bridges.
7878bridges (S:: Type{<:MOI.AbstractSet} ) = bridges (MOI. VectorOfVariables, S)
7979
8080function bridges (
81- :: Type{<:MOI.AbstractVectorFunction} ,
81+ F :: Type{<:MOI.AbstractVectorFunction} ,
8282 :: Type{<:ZeroPolynomialSet{FullSpace}} ,
8383)
84- return [Bridges. Constraint. ZeroPolynomialBridge]
84+ return [( Bridges. Constraint. ZeroPolynomialBridge, _coef_type (F)) ]
8585end
8686
8787function bridges (
88- :: Type{<:MOI.AbstractVectorFunction} ,
88+ F :: Type{<:MOI.AbstractVectorFunction} ,
8989 :: Type{<:ZeroPolynomialSet{<:AbstractAlgebraicSet}} ,
9090)
91- return [Bridges. Constraint. ZeroPolynomialInAlgebraicSetBridge]
91+ return [(
92+ Bridges. Constraint. ZeroPolynomialInAlgebraicSetBridge,
93+ _coef_type (F),
94+ )]
9295end
9396
94- function bridges (:: Type{<:MOI.AbstractVectorFunction} , :: Type{<:PlusMinusSet} )
95- return [Bridges. Constraint. PlusMinusBridge]
97+ function bridges (F :: Type{<:MOI.AbstractVectorFunction} , :: Type{<:PlusMinusSet} )
98+ return [( Bridges. Constraint. PlusMinusBridge, _coef_type (F)) ]
9699end
97100
98101"""
128131function bridgeable (c:: JuMP.AbstractConstraint , S:: Type{<:MOI.AbstractSet} )
129132 bridge_types = bridges (S)
130133 for bridge_type in bridge_types
131- c = BridgeableConstraint (c, bridge_type)
132- concrete_bridge_type = _concrete (bridge_type{Float64}, S)
134+ BT, T = bridge_type
135+ c = BridgeableConstraint (c, BT; coefficient_type = T)
136+ concrete_bridge_type = _concrete (BT{T}, S)
133137 for (ST,) in
134138 MOI. Bridges. added_constrained_variable_types (concrete_bridge_type)
135139 c = bridgeable (c, ST)
@@ -151,12 +155,10 @@ function bridgeable(
151155)
152156 bridge_types = bridges (F, S)
153157 for bridge_type in bridge_types
154- c = BridgeableConstraint (c, bridge_type)
155- concrete_bridge_type = MOI. Bridges. Constraint. concrete_bridge_type (
156- bridge_type{_coef_type (F)},
157- F,
158- S,
159- )
158+ BT, T = bridge_type
159+ c = BridgeableConstraint (c, BT, coefficient_type = T)
160+ concrete_bridge_type =
161+ MOI. Bridges. Constraint. concrete_bridge_type (BT{T}, F, S)
160162 for (ST,) in
161163 MOI. Bridges. added_constrained_variable_types (concrete_bridge_type)
162164 c = bridgeable (c, ST)
0 commit comments