diff --git a/src/Bridges/Constraint/bridges/indicator_sos.jl b/src/Bridges/Constraint/bridges/indicator_sos.jl index c0148eaa01..ce87ff8de7 100644 --- a/src/Bridges/Constraint/bridges/indicator_sos.jl +++ b/src/Bridges/Constraint/bridges/indicator_sos.jl @@ -60,10 +60,10 @@ function bridge_constraint( end function MOI.supports_constraint( - ::Type{<:IndicatorSOS1Bridge}, - ::Type{<:MOI.AbstractVectorFunction}, + ::Type{<:IndicatorSOS1Bridge{T}}, + ::Type{MOI.VectorAffineFunction{T}}, ::Type{<:MOI.Indicator{MOI.ACTIVATE_ON_ONE,<:MOI.AbstractScalarSet}}, -) +) where {T} return true end @@ -113,7 +113,7 @@ end function concrete_bridge_type( ::Type{<:IndicatorSOS1Bridge{T}}, - ::Type{<:MOI.AbstractVectorFunction}, + ::Type{MOI.VectorAffineFunction{T}}, ::Type{MOI.Indicator{MOI.ACTIVATE_ON_ONE,S}}, ) where {T,S} return IndicatorSOS1Bridge{T,S} diff --git a/test/Bridges/Constraint/indicator_sos.jl b/test/Bridges/Constraint/indicator_sos.jl index d66036c80b..fe592488af 100644 --- a/test/Bridges/Constraint/indicator_sos.jl +++ b/test/Bridges/Constraint/indicator_sos.jl @@ -332,6 +332,20 @@ function test_runtests() [y, z] in SOS1([0.4, 0.6]) """, ) + # Test that the bridge does nothing for VectorQuadraticFunctions + MOI.Bridges.runtests( + MOI.Bridges.Constraint.IndicatorSOS1Bridge, + """ + variables: x, z + [z, 2.0 * x * x] in Indicator{ACTIVATE_ON_ONE}(LessThan(2.0)) + z in ZeroOne() + """, + """ + variables: x, z + [z, 2.0 * x * x] in Indicator{ACTIVATE_ON_ONE}(LessThan(2.0)) + z in ZeroOne() + """, + ) return end