I’m tying optimize the sum of series objective functions in `funcs`

using the Ipot optimizer

A minimal example shown below show result in an optimal objective value of 5.

However it current returns `objective_value(model) = 2.0`

```
using JuMP, Ipopt
f1(δ) = -(δ - 2) ^ 2 + 1
f2(δ) = -(δ - 7) ^ 2 + 4
funcs = [f1, f2]
model = Model(Ipopt.Optimizer)
@variable(model, x[1:length(funcs)] >= 0)
@constraint(model, sum(x) <= 10)
@NLobjective(model, Max, sum(f(x) for (f,x) in zip(funcs, x)))
optimize!(model)
@show objective_value(model);
```

My understanding is that the `@NLobjectives`

is parsing the actual code so the `f(x)`

in the sum gets interpreted as repeats of the same function. so it is just optimizing `f1 + f1`

instead of `f1 + f2`

.

Is it possible to make `@NLobjectives`

parse the correct target function without doing a lot of metaprogramming?

Thanks in advance for the help!