Still thinking about Nonlinear Programming with JuMP with some generality.
(@NLconstraint with a sum, array and scalar variables)
There are many NLP JuMP examples available but all more or less similar to the Rosenbrok problem in the sense that they involve a few explicit functions for objective and constraints.
My intuition for my own problem (pyro chemistry) is that I might need to create many nonlinear functions and that I would use as part of an array of functions or a dictionary of functions.
Therefore when registering some new function(s) with some symbol(s) like here:
JuMP.register(model, :hJuMP, 1, hjulia; autodiff=true)
there is the problem that I will probably never be able to use literally the
hJuMP symbol created in this statement. Instead, my likely use of
hJuMP would be as one element from a list of such function:
funlist = [..., ..., hJuMP, ..., ...] @NLconstraint(model, funlist[idx](T, xs...) == h0)
This kind of statement does not work and return for example this error:
LoadError: MethodError: no method matching _is_sum(::Expr)
I tried several variant of the idea without success.
Would there be a way to use JuMP/Julia as above?
Or should I think otherwise?
Thanks for your suggestions,