File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
src/Bridges/Constraint/bridges Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,10 @@ function bridge_constraint(
6060end
6161
6262function MOI. supports_constraint (
63- :: Type{<:IndicatorSOS1Bridge} ,
64- :: Type{<: MOI.AbstractVectorFunction } ,
63+ :: Type{<:IndicatorSOS1Bridge{T} } ,
64+ :: Type{MOI.VectorAffineFunction{T} } ,
6565 :: Type{<:MOI.Indicator{MOI.ACTIVATE_ON_ONE,<:MOI.AbstractScalarSet}} ,
66- )
66+ ) where {T}
6767 return true
6868end
6969
113113
114114function concrete_bridge_type (
115115 :: Type{<:IndicatorSOS1Bridge{T}} ,
116- :: Type{<: MOI.AbstractVectorFunction } ,
116+ :: Type{MOI.VectorAffineFunction{T} } ,
117117 :: Type{MOI.Indicator{MOI.ACTIVATE_ON_ONE,S}} ,
118118) where {T,S}
119119 return IndicatorSOS1Bridge{T,S}
Original file line number Diff line number Diff line change @@ -332,6 +332,20 @@ function test_runtests()
332332 [y, z] in SOS1([0.4, 0.6])
333333 """ ,
334334 )
335+ # Test that the bridge does nothing for VectorQuadraticFunctions
336+ MOI. Bridges. runtests (
337+ MOI. Bridges. Constraint. IndicatorSOS1Bridge,
338+ """
339+ variables: x, z
340+ [z, 2.0 * x * x] in Indicator{ACTIVATE_ON_ONE}(LessThan(2.0))
341+ z in ZeroOne()
342+ """ ,
343+ """
344+ variables: x, z
345+ [z, 2.0 * x * x] in Indicator{ACTIVATE_ON_ONE}(LessThan(2.0))
346+ z in ZeroOne()
347+ """ ,
348+ )
335349 return
336350end
337351
You can’t perform that action at this time.
0 commit comments