@@ -10,15 +10,58 @@ import MathOptInterface.Utilities as MOIU
1010
1111# Model similar to SDPA format, it gives a good example because it does not
1212# support a lot hence need a lot of bridges
13- MOIU. @model (SDPAModel,
14- (), (MOI. EqualTo,), (MOI. Nonnegatives, MOI. PositiveSemidefiniteConeTriangle), (),
15- (), (MOI. ScalarAffineFunction,), (MOI. VectorOfVariables,), ())
16- MOI. supports_constraint (:: SDPAModel{T} , :: Type{MOI.VariableIndex} , :: Type{MOI.GreaterThan{T}} ) where {T} = false
17- MOI. supports_constraint (:: SDPAModel{T} , :: Type{MOI.VariableIndex} , :: Type{MOI.LessThan{T}} ) where {T} = false
18- MOI. supports_constraint (:: SDPAModel{T} , :: Type{MOI.VariableIndex} , :: Type{MOI.EqualTo{T}} ) where {T} = false
19- MOI. supports_constraint (:: SDPAModel{T} , :: Type{MOI.VariableIndex} , :: Type{MOI.Interval{T}} ) where {T} = false
20- MOI. supports_constraint (:: SDPAModel , :: Type{MOI.VectorOfVariables} , :: Type{MOI.Reals} ) = false
21- MOI. supports (:: SDPAModel{T} , :: MOI.ObjectiveFunction{MOI.ScalarQuadraticFunction{T}} ) where {T} = false
13+ MOIU. @model (
14+ SDPAModel,
15+ (),
16+ (MOI. EqualTo,),
17+ (MOI. Nonnegatives, MOI. PositiveSemidefiniteConeTriangle),
18+ (),
19+ (),
20+ (MOI. ScalarAffineFunction,),
21+ (MOI. VectorOfVariables,),
22+ ()
23+ )
24+ function MOI. supports_constraint (
25+ :: SDPAModel{T} ,
26+ :: Type{MOI.VariableIndex} ,
27+ :: Type{MOI.GreaterThan{T}} ,
28+ ) where {T}
29+ return false
30+ end
31+ function MOI. supports_constraint (
32+ :: SDPAModel{T} ,
33+ :: Type{MOI.VariableIndex} ,
34+ :: Type{MOI.LessThan{T}} ,
35+ ) where {T}
36+ return false
37+ end
38+ function MOI. supports_constraint (
39+ :: SDPAModel{T} ,
40+ :: Type{MOI.VariableIndex} ,
41+ :: Type{MOI.EqualTo{T}} ,
42+ ) where {T}
43+ return false
44+ end
45+ function MOI. supports_constraint (
46+ :: SDPAModel{T} ,
47+ :: Type{MOI.VariableIndex} ,
48+ :: Type{MOI.Interval{T}} ,
49+ ) where {T}
50+ return false
51+ end
52+ function MOI. supports_constraint (
53+ :: SDPAModel ,
54+ :: Type{MOI.VectorOfVariables} ,
55+ :: Type{MOI.Reals} ,
56+ )
57+ return false
58+ end
59+ function MOI. supports (
60+ :: SDPAModel{T} ,
61+ :: MOI.ObjectiveFunction{MOI.ScalarQuadraticFunction{T}} ,
62+ ) where {T}
63+ return false
64+ end
2265MOI. supports (:: SDPAModel , :: MOI.ObjectiveFunction{MOI.VariableIndex} ) = false
2366
2467function interval_constraint ()
@@ -31,7 +74,7 @@ function interval_constraint()
3174 MOI. Bridges. _reset_bridge_graph ($ bridged)
3275 MOI. Bridges. node ($ bridged, $ F, $ S)
3376 end )
34- display (@benchmark begin
77+ return display (@benchmark begin
3578 MOI. Bridges. _reset_bridge_graph ($ bridged)
3679 MOI. Bridges. bridge_index ($ bridged, $ F, $ S)
3780 end )
@@ -48,7 +91,7 @@ function quadratic_objective()
4891 MOI. Bridges. _reset_bridge_graph ($ bridged)
4992 MOI. Bridges. node ($ bridged, $ F)
5093 end )
51- display (@benchmark begin
94+ return display (@benchmark begin
5295 MOI. Bridges. _reset_bridge_graph ($ bridged)
5396 MOI. Bridges. bridge_index ($ bridged, $ F)
5497 end )
0 commit comments