Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Oct 6, 2023
1 parent 30270ca commit 678ab12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docs/src/submodules/Bridges/list_of_bridges.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ These bridges are subtypes of [`Bridges.Objective.AbstractBridge`](@ref).
```@docs
Bridges.Objective.FunctionizeBridge
Bridges.Objective.QuadratizeBridge
Bridges.Objective.SlackBridge
Bridges.Objective.VectorFunctionizeBridge
Bridges.Objective.FunctionConversionBridge
Bridges.Objective.SlackBridge
Bridges.Objective.VectorSlackBridge
```

Expand Down
6 changes: 3 additions & 3 deletions src/Bridges/Objective/bridges/conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function MOI.get(
end

"""
FunctionizeBridge{T,G}
FunctionizeBridge{T,G} <: FunctionConversionBridge{T,MOI.ScalarAffineFunction{T},G}
`FunctionizeBridge` implements the following reformulations:
Expand Down Expand Up @@ -140,7 +140,7 @@ const Functionize{T,OT<:MOI.ModelLike} =
SingleBridgeOptimizer{FunctionizeBridge{T},OT}

"""
QuadratizeBridge{T,G}
QuadratizeBridge{T,G} <: FunctionConversionBridge{T,MOI.ScalarQuadraticFunction{T},G}
`QuadratizeBridge` implements the following reformulations:
Expand Down Expand Up @@ -168,7 +168,7 @@ const Quadratize{T,OT<:MOI.ModelLike} =
SingleBridgeOptimizer{QuadratizeBridge{T},OT}

"""
VectorFunctionizeBridge{T,G}
VectorFunctionizeBridge{T,G} <: FunctionConversionBridge{T,MOI.VectorAffineFunction{T},G}
`VectorFunctionizeBridge` implements the following reformulations:
Expand Down
4 changes: 2 additions & 2 deletions test/Bridges/lazy_bridge_optimizer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ Bridge graph with 1 variable nodes, 3 constraint nodes and 0 objective nodes.
MOI.Bridges.add_bridge(bridged, MOI.Bridges.Objective.FunctionizeBridge{T})
@test MOI.supports(bridged, MOI.ObjectiveFunction{MOI.VariableIndex}())
@test MOI.Bridges.bridge_type(bridged, MOI.VariableIndex) ==
MOI.Bridges.Objective.FunctionizeBridge{T}
MOI.Bridges.Objective.FunctionizeBridge{T,MOI.VariableIndex}
@test MOI.supports(bridged, attr)
@test MOI.Bridges.bridge_type(bridged, F) ==
MOI.Bridges.Objective.SlackBridge{T,F,F}
Expand Down Expand Up @@ -1085,7 +1085,7 @@ Bridge graph with 2 variable nodes, 5 constraint nodes and 2 objective nodes.
(4) `MOI.VectorAffineFunction{$T}`-in-`MOI.Zeros` constraints are bridged (distance 1) by $(MOI.Bridges.Constraint.ScalarizeBridge{T,MOI.ScalarAffineFunction{T},MOI.EqualTo{T}}).
(5) `MOI.ScalarQuadraticFunction{$T}`-in-`MOI.LessThan{$T}` constraints are bridged (distance 5) by $(MOI.Bridges.Constraint.QuadtoSOCBridge{T}).
|1| objective function of type `MOI.ScalarQuadraticFunction{$T}` is bridged (distance 13) by $(MOI.Bridges.Objective.SlackBridge{T,MOI.ScalarQuadraticFunction{T},MOI.ScalarQuadraticFunction{T}}).
|2| objective function of type `MOI.VariableIndex` is bridged (distance 1) by $(MOI.Bridges.Objective.FunctionizeBridge{T}).
|2| objective function of type `MOI.VariableIndex` is bridged (distance 1) by $(MOI.Bridges.Objective.FunctionizeBridge{T,MOI.VariableIndex}).
""",
)
end
Expand Down

0 comments on commit 678ab12

Please sign in to comment.