Dear all,
I have the following issue with JuMP: I define an array of symbolic expression I want to use as constraint in a mathematical program. In particular, I have defined my function in the array gn and I want to write something like:
for k in 1:num_cnsts
g = Symbol("g$(k)")
register(model, g, num_vars, gn[k]; autodiff = true)
@NLconstraint(model, :($g) <= 0)
end
I found an answer in https://discourse.julialang.org/t/registering-an-array-of-functions-and-using-them-in-constraints-and-objectives/53294/2, but it seems no longer working.
Thanks in advance for all your help.
Best regards,
Luca