You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know how we have't come across this before:
julia>using JuMP
julia> model =Model();
julia>@variable(model, x[1:2]);
julia> y = [NonlinearExpr(:+, Any[xi]) for xi in x]
2-element Vector{NonlinearExpr}:+(x[1])
+(x[2])
julia> a =@expression(model, sum(y[i] for i in1:2))
x[1] + x[2]
julia> y
2-element Vector{NonlinearExpr}:
x[1] + x[2]
+(x[2])
Note that y[1] has been modified.
The text was updated successfully, but these errors were encountered:
julia>using JuMP
julia>import JuMP._MA as MA
julia> model =Model();
julia>@variable(model, x);
julia> y =NonlinearExpr(:+, Any[x])
+(x)
julia> a = MA.operate!!(MA.add_mul, MA.Zero(), y)
+(x)
julia> a === y
true
Found by lanl-ansi/PowerModelsDistribution.jl#459 (comment)
I don't know how we have't come across this before:
Note that
y[1]
has been modified.The text was updated successfully, but these errors were encountered: