can we add array of nl expressions with name in macro
using JuMP
mm=Model()
for i in 1:5
@NLexpression(mm,pp[i],i)
end
ERROR: An object of name pp is already attached to this model. If this is intended, consider using the anonymous construction syntax, e.g., x = @variable(model, [1:N], …) where the name of the object does not appear inside the macro.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] _error_if_cannot_register(::Model, ::Symbol) at C:\Users\manojkumar.ram.julia\packages\JuMP\YXK4e\src\macros.jl:52
[3] top-level scope at C:\Users\manojkumar.ram.julia\packages\JuMP\YXK4e\src\macros.jl:75
[4] top-level scope at REPL[4]:2