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(
9898 return bridge. set
9999end
100100
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+
101110const SwapBridge{T} = Union{VariableSwapBridge{T},ConstraintSwapBridge{T}}
102111
103112function MOI. Bridges. map_function (bridge:: SwapBridge , func)
@@ -214,6 +223,22 @@ function test_runtests()
214223 MOI. add_constraint (model, func, set)
215224 end ,
216225 )
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+ )
217242 MOI. Bridges. runtests (
218243 VariableSwapBridge,
219244 model -> begin
You can’t perform that action at this time.
0 commit comments