@@ -575,6 +575,8 @@ function moi_function(f::GenericNonlinearExpr{V}) where {V}
575575 for i in length (f. args): - 1 : 1
576576 if f. args[i] isa GenericNonlinearExpr{V}
577577 push! (stack, (ret, i, f. args[i]))
578+ elseif f. args[i] isa AbstractArray
579+ ret. args[i] = moi_function .(f. args[i])
578580 else
579581 ret. args[i] = moi_function (f. args[i])
580582 end
@@ -586,6 +588,8 @@ function moi_function(f::GenericNonlinearExpr{V}) where {V}
586588 for j in length (arg. args): - 1 : 1
587589 if arg. args[j] isa GenericNonlinearExpr{V}
588590 push! (stack, (child, j, arg. args[j]))
591+ elseif arg. args[j] isa AbstractArray
592+ child. args[j] = moi_function .(arg. args[j])
589593 else
590594 child. args[j] = moi_function (arg. args[j])
591595 end
@@ -611,6 +615,8 @@ function jump_function(model::GenericModel, f::MOI.ScalarNonlinearFunction)
611615 for child in reverse (arg. args)
612616 push! (stack, (new_ret, child))
613617 end
618+ elseif arg isa AbstractArray
619+ push! (parent. args, jump_function .(model, arg))
614620 else
615621 push! (parent. args, jump_function (model, arg))
616622 end
0 commit comments