@@ -511,15 +511,17 @@ function _build_copy_variables_with_set_cache(
511
511
:: Type{S} ,
512
512
) where {S<: MOI.AbstractScalarSet }
513
513
F = MOI. VariableIndex
514
+ indices = MOI. ConstraintIndex{F,S}[]
514
515
for ci in MOI. get (src, MOI. ListOfConstraintIndices {F,S} ())
515
516
f = MOI. get (src, MOI. ConstraintFunction (), ci)
516
517
if f in cache. variables_with_domain
517
- push! (cache . constraints_not_added , ci)
518
+ push! (indices , ci)
518
519
else
519
520
push! (cache. variables_with_domain, f)
520
521
push! (cache. variable_cones, ([f], ci))
521
522
end
522
523
end
524
+ push! (cache. constraints_not_added, indices)
523
525
return
524
526
end
525
527
@@ -544,6 +546,7 @@ function _build_copy_variables_with_set_cache(
544
546
:: Type{S} ,
545
547
) where {S<: MOI.AbstractVectorSet }
546
548
F = MOI. VectorOfVariables
549
+ indices = MOI. ConstraintIndex{F,S}[]
547
550
for ci in MOI. get (src, MOI. ListOfConstraintIndices {F,S} ())
548
551
f = MOI. get (src, MOI. ConstraintFunction (), ci)
549
552
if _is_variable_cone (cache, f)
@@ -552,15 +555,16 @@ function _build_copy_variables_with_set_cache(
552
555
end
553
556
push! (cache. variable_cones, (f. variables, ci))
554
557
else
555
- push! (cache . constraints_not_added , ci)
558
+ push! (indices , ci)
556
559
end
557
560
end
561
+ push! (cache. constraints_not_added, indices)
558
562
return
559
563
end
560
564
561
565
function _copy_variables_with_set (dest, src)
562
- vis_src = MOI. get (src, MOI. ListOfVariableIndices ())
563
566
index_map = IndexMap ()
567
+ vis_src = MOI. get (src, MOI. ListOfVariableIndices ())
564
568
cache = _CopyVariablesWithSetCache ()
565
569
for (i, v) in enumerate (vis_src)
566
570
cache. variable_to_column[v] = i
0 commit comments