diff --git a/src/Bridges/Variable/bridges/set_dot.jl b/src/Bridges/Variable/bridges/set_dot.jl index d8b5dd1df8..d378e7d290 100644 --- a/src/Bridges/Variable/bridges/set_dot.jl +++ b/src/Bridges/Variable/bridges/set_dot.jl @@ -1,4 +1,5 @@ -struct DotProductsBridge{T,S,A,V} <: SetMapBridge{T,S,MOI.SetWithDotProducts{S,A,V}} +struct DotProductsBridge{T,S,A,V} <: + SetMapBridge{T,S,MOI.SetWithDotProducts{S,A,V}} variables::Vector{MOI.VariableIndex} constraint::MOI.ConstraintIndex{MOI.VectorOfVariables,S} set::MOI.SetWithDotProducts{S,A,V} @@ -55,13 +56,14 @@ end # This returns `true` by default for `SetMapBridge` # but is is not supported for this bridge because `inverse_map_function` # is not implemented -function MOI.supports(::MOI.ModelLike, ::MOI.VariablePrimalStart, ::Type{<:DotProductsBridge}) +function MOI.supports( + ::MOI.ModelLike, + ::MOI.VariablePrimalStart, + ::Type{<:DotProductsBridge}, +) return false end -function unbridged_map( - ::DotProductsBridge, - ::Vector{MOI.VariableIndex}, -) +function unbridged_map(::DotProductsBridge, ::Vector{MOI.VariableIndex}) return nothing end diff --git a/test/Bridges/Variable/set_dot.jl b/test/Bridges/Variable/set_dot.jl index e77d775b64..65a058af4f 100644 --- a/test/Bridges/Variable/set_dot.jl +++ b/test/Bridges/Variable/set_dot.jl @@ -27,30 +27,30 @@ function test_psd() MOI.Bridges.runtests( MOI.Bridges.Variable.DotProductsBridge, model -> begin - x, _ = MOI.add_constrained_variables(model, + x, _ = MOI.add_constrained_variables( + model, MOI.SetWithDotProducts( MOI.PositiveSemidefiniteConeTriangle(2), MOI.TriangleVectorization.([ - [1 2.0 - 2 3], - [4 5.0 - 5 6], + [ + 1 2.0 + 2 3 + ], + [ + 4 5.0 + 5 6 + ], ]), - ) - ) - MOI.add_constraint( - model, - 1.0x[1], - MOI.EqualTo(0.0), - ) - MOI.add_constraint( - model, - 1.0x[2], - MOI.LessThan(0.0), + ), ) + MOI.add_constraint(model, 1.0x[1], MOI.EqualTo(0.0)) + MOI.add_constraint(model, 1.0x[2], MOI.LessThan(0.0)) end, model -> begin - Q, _ = MOI.add_constrained_variables(model, MOI.PositiveSemidefiniteConeTriangle(2)) + Q, _ = MOI.add_constrained_variables( + model, + MOI.PositiveSemidefiniteConeTriangle(2), + ) MOI.add_constraint( model, 1.0 * Q[1] + 4.0 * Q[2] + 3.0 * Q[3],