File tree 2 files changed +18
-4
lines changed
src/Bridges/Constraint/bridges 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,10 @@ function bridge_constraint(
60
60
end
61
61
62
62
function MOI. supports_constraint (
63
- :: Type{<:IndicatorSOS1Bridge} ,
64
- :: Type{<: MOI.AbstractVectorFunction } ,
63
+ :: Type{<:IndicatorSOS1Bridge{T} } ,
64
+ :: Type{MOI.VectorAffineFunction{T} } ,
65
65
:: Type{<:MOI.Indicator{MOI.ACTIVATE_ON_ONE,<:MOI.AbstractScalarSet}} ,
66
- )
66
+ ) where {T}
67
67
return true
68
68
end
69
69
113
113
114
114
function concrete_bridge_type (
115
115
:: Type{<:IndicatorSOS1Bridge{T}} ,
116
- :: Type{<: MOI.AbstractVectorFunction } ,
116
+ :: Type{MOI.VectorAffineFunction{T} } ,
117
117
:: Type{MOI.Indicator{MOI.ACTIVATE_ON_ONE,S}} ,
118
118
) where {T,S}
119
119
return IndicatorSOS1Bridge{T,S}
Original file line number Diff line number Diff line change @@ -332,6 +332,20 @@ function test_runtests()
332
332
[y, z] in SOS1([0.4, 0.6])
333
333
""" ,
334
334
)
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
+ )
335
349
return
336
350
end
337
351
You can’t perform that action at this time.
0 commit comments