Is there any way to register an NLParameter
as part of a Model
? For example, I would like to create a model
model = Model(Ipopt.Optimizer)
@variable(model, x)
@NLParameter(model, p == 0)
@NLobjective(model, Min, (x + p)^2)
and then access model[:p]
so that I can update the value with set_value(model[:p], 1)
. I’d like to do this so that if I have multiple model
s, then I can just update all the parameters like
for m in models
set_value(m[:p], 1)
end