Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Bridges/Constraint/det.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function subsum(model, t::MOI.ScalarAffineFunction, l::Vector{MOI.VariableIndex}
allow_modify_function=true)
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
MOI.get(b::LogDetBridge, ::MOI.NumberOfVariables) = length(b.Δ) + length(b.l)
MOI.get(b::LogDetBridge{T}, ::MOI.NumberOfConstraints{MOI.VectorAffineFunction{T}, MOI.PositiveSemidefiniteConeTriangle}) where T = 1
MOI.get(b::LogDetBridge{T}, ::MOI.NumberOfConstraints{MOI.VectorAffineFunction{T}, MOI.ExponentialCone}) where T = length(b.lcindex)
Expand Down Expand Up @@ -196,7 +196,7 @@ end
MOI.supports_constraint(::Type{RootDetBridge{T}}, ::Type{<:Union{MOI.VectorOfVariables, MOI.VectorAffineFunction{T}}}, ::Type{MOI.RootDetConeTriangle}) where T = true
added_constraint_types(::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)]

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
MOI.get(b::RootDetBridge, ::MOI.NumberOfVariables) = length(b.Δ)
MOI.get(b::RootDetBridge{T}, ::MOI.NumberOfConstraints{MOI.VectorAffineFunction{T}, MOI.PositiveSemidefiniteConeTriangle}) where T = 1
MOI.get(b::RootDetBridge{T}, ::MOI.NumberOfConstraints{MOI.VectorAffineFunction{T}, MOI.GeometricMeanCone}) where T = 1
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/flip_sign.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function added_constraint_types(
return [(F, S2)]
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
function MOI.get(::FlipSignBridge{T, S1, S2, F},
::MOI.NumberOfConstraints{F, S2}) where {T, S1, S2, F}
return 1
Expand Down
4 changes: 2 additions & 2 deletions src/Bridges/Constraint/functionize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function concrete_bridge_type(::Type{<:ScalarFunctionizeBridge{T}},
return ScalarFunctionizeBridge{T, S}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
MOI.get(b::ScalarFunctionizeBridge{T, S}, ::MOI.NumberOfConstraints{MOI.ScalarAffineFunction{T}, S}) where {T, S} = 1
MOI.get(b::ScalarFunctionizeBridge{T, S}, ::MOI.ListOfConstraintIndices{MOI.ScalarAffineFunction{T}, S}) where {T, S} = [b.constraint]

Expand Down Expand Up @@ -100,7 +100,7 @@ function concrete_bridge_type(::Type{<:VectorFunctionizeBridge{T}},
return VectorFunctionizeBridge{T, S}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
MOI.get(b::VectorFunctionizeBridge{T, S},
::MOI.NumberOfConstraints{MOI.VectorAffineFunction{T}, S}) where {T, S} = 1
MOI.get(b::VectorFunctionizeBridge{T, S},
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/geomean.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function concrete_bridge_type(::Type{<:GeoMeanBridge{T}},
return GeoMeanBridge{T, F, G}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
MOI.get(b::GeoMeanBridge, ::MOI.NumberOfVariables) = length(b.xij)
function MOI.get(b::GeoMeanBridge{T, F},
::MOI.NumberOfConstraints{F, MOI.LessThan{T}}) where {T, F}
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/interval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function concrete_bridge_type(::Type{<:SplitIntervalBridge},
return SplitIntervalBridge{T, F}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
MOI.get(b::SplitIntervalBridge{T, F}, ::MOI.NumberOfConstraints{F, MOI.LessThan{T}}) where {T, F} = 1
MOI.get(b::SplitIntervalBridge{T, F}, ::MOI.NumberOfConstraints{F, MOI.GreaterThan{T}}) where {T, F} = 1
MOI.get(b::SplitIntervalBridge{T, F}, ::MOI.ListOfConstraintIndices{F, MOI.GreaterThan{T}}) where {T, F} = [b.lower]
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/quad_to_soc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function concrete_bridge_type(::Type{<:QuadtoSOCBridge{T}},
return QuadtoSOCBridge{T}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
function MOI.get(::QuadtoSOCBridge{T},
::MOI.NumberOfConstraints{MOI.VectorAffineFunction{T},
MOI.RotatedSecondOrderCone}) where T
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/rsoc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function concrete_bridge_type(::Type{<:RSOCBridge{T}},
RSOCBridge{T, F, G}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
function MOI.get(b::RSOCBridge{T, F},
::MOI.NumberOfConstraints{F, MOI.SecondOrderCone}) where {T, F}
return 1
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/scalarize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function concrete_bridge_type(::Type{<:ScalarizeBridge{T}},
return ScalarizeBridge{T, MOIU.scalar_type(F), scalar_set_type(S, T)}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
function MOI.get(bridge::ScalarizeBridge{T, F, S},
::MOI.NumberOfConstraints{F, S}) where {T, F, S}
return length(bridge.scalar_constraints)
Expand Down
4 changes: 2 additions & 2 deletions src/Bridges/Constraint/slack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function concrete_bridge_type(::Type{<:ScalarSlackBridge{T}},
return ScalarSlackBridge{T, F2, S}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
MOI.get(b::ScalarSlackBridge{T, F, S}, ::MOI.NumberOfVariables) where {T, F, S} = 1
MOI.get(b::ScalarSlackBridge{T, F, S}, ::MOI.NumberOfConstraints{F, MOI.EqualTo{T}}) where {T, F, S} = 1
MOI.get(b::ScalarSlackBridge{T, F, S}, ::MOI.NumberOfConstraints{MOI.SingleVariable, S}) where {T, F, S} = 1
Expand Down Expand Up @@ -147,7 +147,7 @@ function concrete_bridge_type(::Type{<:VectorSlackBridge{T}},
return VectorSlackBridge{T, F2, S}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
MOI.get(b::VectorSlackBridge{T, F, S}, ::MOI.NumberOfVariables) where {T, F, S} = length(b.slacks)
MOI.get(b::VectorSlackBridge{T, F, S}, ::MOI.NumberOfConstraints{F, MOI.Zeros}) where {T, F, S} = 1
MOI.get(b::VectorSlackBridge{T, F, S}, ::MOI.NumberOfConstraints{MOI.VectorOfVariables, S}) where {T, F, S} = 1
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/square.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function concrete_bridge_type(::Type{<:SquareBridge{T}},
SquareBridge{T, F, G, TT, ST}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
function MOI.get(::SquareBridge{T, F, G, TT},
::MOI.NumberOfConstraints{F, TT}) where {T, F, G, TT}
return 1
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/vectorize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function concrete_bridge_type(::Type{<:VectorizeBridge{T}},
return VectorizeBridge{T, F, vector_set_type(S), G}
end

# Attributes, Bridge acting as an model
# Attributes, Bridge acting as a model
function MOI.get(::VectorizeBridge{T, F, S},
::MOI.NumberOfConstraints{F, S}) where {T, F, S}
return 1
Expand Down