File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,13 @@ function MOI.get(
161
161
return collect (keys (v. constraints))
162
162
end
163
163
164
+ function MOI. get (
165
+ :: VectorOfConstraints{F,S} ,
166
+ :: MOI.ListOfConstraintAttributesSet{F,S} ,
167
+ ) where {F,S}
168
+ return MOI. AbstractConstraintAttribute[]
169
+ end
170
+
164
171
function MOI. modify (
165
172
v:: VectorOfConstraints{F,S} ,
166
173
ci:: MOI.ConstraintIndex{F,S} ,
Original file line number Diff line number Diff line change @@ -504,6 +504,17 @@ function test_get_unsupported_constraint()
504
504
return
505
505
end
506
506
507
+ function test_vector_of_constraints_list_of_constraint_attributes_set ()
508
+ model = MOI. Utilities. Model {Float64} ()
509
+ x = MOI. add_variable (model)
510
+ MOI. add_constraint (model, 1.0 * x, MOI. EqualTo (1.0 ))
511
+ inner = model. constraints. moi_scalaraffinefunction. moi_equalto
512
+ F, S = MOI. ScalarAffineFunction{Float64}, MOI. EqualTo{Float64}
513
+ @test MOI. get (inner, MOI. ListOfConstraintAttributesSet {F,S} ()) ==
514
+ MOI. AbstractConstraintAttribute[]
515
+ return
516
+ end
517
+
507
518
end # module
508
519
509
520
TestModel. runtests ()
You can’t perform that action at this time.
0 commit comments