File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,15 @@ function MOI.Bridges.inverse_map_set(
98
98
return bridge. set
99
99
end
100
100
101
+ # Otherwise, it fails Bridges.runtests for `NOT_INVERTIBLE`
102
+ function MOI. supports (
103
+ :: MOI.ModelLike ,
104
+ :: MOI.ConstraintDualStart ,
105
+ :: Type{<:ConstraintSwapBridge} ,
106
+ )
107
+ return false
108
+ end
109
+
101
110
const SwapBridge{T} = Union{VariableSwapBridge{T},ConstraintSwapBridge{T}}
102
111
103
112
function MOI. Bridges. map_function (bridge:: SwapBridge , func)
@@ -214,6 +223,22 @@ function test_runtests()
214
223
MOI. add_constraint (model, func, set)
215
224
end ,
216
225
)
226
+ MOI. Bridges. runtests (
227
+ ConstraintSwapBridge,
228
+ model -> begin
229
+ x = MOI. add_variables (model, 2 )
230
+ func = MOI. VectorOfVariables (x)
231
+ set = SwapSet (do_swap, NOT_INVERTIBLE)
232
+ MOI. add_constraint (model, func, set)
233
+ end ,
234
+ model -> begin
235
+ x = MOI. add_variables (model, 2 )
236
+ func = MOI. VectorOfVariables (swap (x, do_swap))
237
+ set = MOI. Nonnegatives (2 )
238
+ MOI. add_constraint (model, func, set)
239
+ end ,
240
+ cannot_unbridge = true ,
241
+ )
217
242
MOI. Bridges. runtests (
218
243
VariableSwapBridge,
219
244
model -> begin
You can’t perform that action at this time.
0 commit comments