Skip to content

Commit b623562

Browse files
committed
Remove supportsconstraint for bridge
1 parent 6b6ec80 commit b623562

File tree

6 files changed

+0
-16
lines changed

6 files changed

+0
-16
lines changed

src/Bridges/bridge.jl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,6 @@ type `F`-in`S` created by the bride `b` in the model (i.e., of length equal to t
3030
"""
3131
MOI.get(b::AbstractBridge, ::MOI.ListOfConstraintIndices{F, S}) where {F, S} = CI{F, S}[]
3232

33-
# TODO supportsconstraint and supports constraint should maybe be on the type of the model in MOI too
34-
# that would clarify the fact that it does not depend on the current state of the model
35-
"""
36-
MOI.supportsconstraint(BT::Type{<:AbstractBridge}, F::Type{<:MOI.AbstractFunction}, S::Type{<:MOI.AbstractSet})::Bool
37-
38-
Return a `Bool` indicating whether the bridges of type `BT` support bridging `F`-in-`S` constraints.
39-
"""
40-
MOI.supportsconstraint(::Type{<:AbstractBridge}, ::Type{<:MOI.AbstractFunction}, ::Type{<:MOI.AbstractSet}) = false
41-
4233
"""
4334
supportedconstrainttypes(BT::Type{<:AbstractBridge})::Bool
4435

src/Bridges/detbridge.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ function LogDetBridge{T}(model, f::MOI.VectorAffineFunction{T}, s::MOI.LogDetCon
8585
LogDetBridge(Δ, l, sdindex, lcindex, tlindex)
8686
end
8787

88-
MOI.supportsconstraint(::Type{LogDetBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.LogDetConeTriangle}) where T = true
8988
supportedconstrainttypes(::Type{LogDetBridge{T}}) where T = [(MOI.VectorOfVariables, MOI.LogDetConeTriangle), (MOI.VectorAffineFunction{T}, MOI.LogDetConeTriangle)]
9089
addedconstrainttypes(::Type{LogDetBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.LogDetConeTriangle}) where T = [(MOI.VectorAffineFunction{T}, MOI.PositiveSemidefiniteConeTriangle), (MOI.VectorAffineFunction{T}, MOI.ExponentialCone), (MOI.ScalarAffineFunction{T}, MOI.LessThan{T})]
9190

@@ -178,7 +177,6 @@ function RootDetBridge{T}(model, f::MOI.VectorAffineFunction{T}, s::MOI.RootDetC
178177
RootDetBridge(Δ, sdindex, gmindex)
179178
end
180179

181-
MOI.supportsconstraint(::Type{RootDetBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.RootDetConeTriangle}) where T = true
182180
supportedconstrainttypes(::Type{RootDetBridge{T}}) where T = [(MOI.VectorOfVariables, MOI.RootDetConeTriangle), (MOI.VectorAffineFunction{T}, MOI.RootDetConeTriangle)]
183181
addedconstrainttypes(::Type{RootDetBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.RootDetConeTriangle}) where T = [(MOI.VectorAffineFunction{T}, MOI.PositiveSemidefiniteConeTriangle), (MOI.VectorAffineFunction{T}, MOI.GeometricMeanCone)]
184182

src/Bridges/geomeanbridge.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ function GeoMeanBridge{T}(model, f::MOI.VectorAffineFunction{T}, s::MOI.Geometri
9191
GeoMeanBridge(d, xij, tubc, socrc)
9292
end
9393

94-
MOI.supportsconstraint(::Type{GeoMeanBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.GeometricMeanCone}) where T = true
9594
supportedconstrainttypes(::Type{GeoMeanBridge{T}}) where T = [(MOI.VectorOfVariables, MOI.GeometricMeanCone), (MOI.VectorAffineFunction{T}, MOI.GeometricMeanCone)]
9695
addedconstrainttypes(::Type{GeoMeanBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.GeometricMeanCone}) where T = [(MOI.ScalarAffineFunction{T}, MOI.LessThan{T}), (MOI.VectorAffineFunction{T}, MOI.RotatedSecondOrderCone)]
9796

src/Bridges/intervalbridge.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ function SplitIntervalBridge{T}(model, f::MOI.ScalarAffineFunction{T}, s::MOI.In
1313
SplitIntervalBridge(lower, upper)
1414
end
1515

16-
MOI.supportsconstraint(::Type{SplitIntervalBridge{T}}, ::Type{MOI.ScalarAffineFunction{T}}, ::Type{MOI.Interval{T}}) where T = true
1716
supportedconstrainttypes(::Type{SplitIntervalBridge{T}}) where T = [(MOI.ScalarAffineFunction{T}, MOI.Interval{T})]
1817
addedconstrainttypes(::Type{SplitIntervalBridge{T}}, ::Type{MOI.ScalarAffineFunction{T}}, ::Type{MOI.Interval{T}}) where T = [(MOI.ScalarAffineFunction{T}, MOI.GreaterThan{T}), (MOI.ScalarAffineFunction{T}, MOI.LessThan{T})]
1918

src/Bridges/rsocbridge.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ function RSOCBridge{T}(model, f::MOI.VectorAffineFunction{T}, s::MOI.RotatedSeco
3535
RSOCBridge{T}(soc)
3636
end
3737

38-
MOI.supportsconstraint(::Type{RSOCBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.RotatedSecondOrderCone}) where T = true
3938
supportedconstrainttypes(::Type{RSOCBridge{T}}) where T = [(MOI.VectorOfVariables, MOI.RotatedSecondOrderCone), (MOI.VectorAffineFunction{T}, MOI.RotatedSecondOrderCone)]
4039
addedconstrainttypes(::Type{RSOCBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.RotatedSecondOrderCone}) where T = [(MOI.VectorAffineFunction{T}, MOI.SecondOrderCone)]
4140

src/Bridges/soctopsdbridge.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ end
6464
_SOCtoPSDCaff(f::MOI.VectorOfVariables, ::Type{T}) where T = _SOCtoPSDCaff(MOI.VectorAffineFunction{T}(f), T)
6565
_SOCtoPSDCaff(f::MOI.VectorAffineFunction, ::Type) = _SOCtoPSDCaff(f, MOIU.eachscalar(f)[1])
6666

67-
MOI.supportsconstraint(::Type{SOCtoPSDCBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.SecondOrderCone}) where T = true
6867
supportedconstrainttypes(::Type{SOCtoPSDCBridge{T}}) where T = [(MOI.VectorOfVariables, MOI.SecondOrderCone), (MOI.VectorAffineFunction{T}, MOI.SecondOrderCone)]
6968
addedconstrainttypes(::Type{SOCtoPSDCBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.SecondOrderCone}) where T = [(MOI.VectorAffineFunction{T}, MOI.PositiveSemidefiniteConeTriangle)]
7069

@@ -116,7 +115,6 @@ struct RSOCtoPSDCBridge{T} <: AbstractBridge
116115
dim::Int
117116
cr::CI{MOI.VectorAffineFunction{T}, MOI.PositiveSemidefiniteConeTriangle}
118117
end
119-
MOI.supportsconstraint(::Type{RSOCtoPSDCBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.RotatedSecondOrderCone}) where T = true
120118
supportedconstrainttypes(::Type{RSOCtoPSDCBridge{T}}) where T = [(MOI.VectorOfVariables, MOI.RotatedSecondOrderCone), (MOI.VectorAffineFunction{T}, MOI.RotatedSecondOrderCone)]
121119
addedconstrainttypes(::Type{RSOCtoPSDCBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.RotatedSecondOrderCone}) where T = [(MOI.VectorAffineFunction{T}, MOI.PositiveSemidefiniteConeTriangle)]
122120
function RSOCtoPSDCBridge{T}(instance, f, s::MOI.RotatedSecondOrderCone) where T

0 commit comments

Comments
 (0)