@@ -121,14 +121,14 @@ end
121121# Model not supporting RotatedSecondOrderCone
122122MOIU. @model (NoRSOCModel,
123123 (),
124- (MOI. EqualTo, MOI. GreaterThan, MOI. LessThan, MOI . Interval ),
124+ (MOI. EqualTo, MOI. GreaterThan, MOI. LessThan),
125125 (MOI. Zeros, MOI. Nonnegatives, MOI. Nonpositives, MOI. SecondOrderCone,
126126 MOI. ExponentialCone, MOI. PositiveSemidefiniteConeTriangle),
127127 (),
128128 (MOI. SingleVariable,),
129- (MOI. ScalarAffineFunction,),
129+ (MOI. ScalarAffineFunction, MOI . ScalarQuadraticFunction ),
130130 (MOI. VectorOfVariables,),
131- (MOI. VectorAffineFunction,))
131+ (MOI. VectorAffineFunction, MOI . VectorQuadraticFunction ))
132132
133133@testset " LazyBridgeOptimizer" begin
134134 mock = MOIU. MockOptimizer (NoRSOCModel {Float64} ())
@@ -150,7 +150,7 @@ MOIU.@model(NoRSOCModel,
150150 MOIT. copytest (bridgedmock, NoRSOCModel {Float64} ())
151151 end
152152
153- # Test that RSOCtoPSD is used instead of RSOC+SOCtoPSD as it is a shortest path
153+ # Test that RSOCtoPSD is used instead of RSOC+SOCtoPSD as it is a shortest path.
154154 @testset " Bridge selection" begin
155155 MOI. empty! (bridgedmock)
156156 @test ! (MOI. supports_constraint (bridgedmock, MOI. VectorAffineFunction{Float64}, MOI. LogDetConeTriangle))
@@ -160,6 +160,34 @@ MOIU.@model(NoRSOCModel,
160160 @test bridgedmock. dist[(MathOptInterface. VectorOfVariables, MathOptInterface. RotatedSecondOrderCone)] == 1
161161 end
162162
163+ @testset " Supports" begin
164+ fullbridgedmock = MOIB. fullbridgeoptimizer (mock, Float64)
165+ for F in [MOI. SingleVariable, MOI. ScalarAffineFunction{Float64},
166+ MOI. ScalarQuadraticFunction{Float64}]
167+ @test MOI. supports_constraint (fullbridgedmock, F,
168+ MOI. Interval{Float64})
169+ end
170+ for F in [MOI. VectorOfVariables, MOI. VectorAffineFunction{Float64},
171+ MOI. VectorQuadraticFunction{Float64}]
172+ @test MOI. supports_constraint (fullbridgedmock, F,
173+ MOI. PositiveSemidefiniteConeSquare)
174+ @test MOI. supports_constraint (fullbridgedmock, F,
175+ MOI. GeometricMeanCone)
176+ end
177+ for F in [MOI. VectorOfVariables, MOI. VectorAffineFunction{Float64}]
178+ # The bridges in this for loop do not support yet
179+ # VectorQuadraticFunction. See TODO 's for the reason.
180+ # TODO : Missing vcat for quadratic for supporting quadratic.
181+ @test MOI. supports_constraint (fullbridgedmock, F,
182+ MOI. RotatedSecondOrderCone)
183+ # TODO : Det bridges need to use MOIU.operate to support quadratic.
184+ @test MOI. supports_constraint (fullbridgedmock, F,
185+ MOI. LogDetConeTriangle)
186+ @test MOI. supports_constraint (fullbridgedmock, F,
187+ MOI. RootDetConeTriangle)
188+ end
189+ end
190+
163191 @testset " Combining two briges" begin
164192 fullbridgedmock = MOIB. fullbridgeoptimizer (mock, Float64)
165193 mock. optimize! = (mock:: MOIU.MockOptimizer ) -> MOIU. mock_optimize! (mock, [1 , 1 , 0 , 1 , 1 , 0 , 1 , √ 2 ])
0 commit comments