Multiple amount of summations in JuMP

Hello, I’m wondering If it is possible to pass a multi summation expression into setNLobjective. Currently I have a for loop to compute summation, but, I was wondering if it is possible to optimize with JuMP on this front.

JuMP.setNLobjective(m, :Min, sum(sum(sum(sum(expres[i,j,k,t] for i=1:W) for j=1:X) for k=1:Y) for l=1:Z))

sorry, I’m really new to this stuff :frowning: any comments will be helpful!

edit: Using IpopT solver, if that is important

Try using the @NLobjective macro:

@NLobjective(model, Min, sum(sum(x[i, j] for j in 1:J) for i in 1:N))

You should also read Please read: make it easier to help you and provide a minimal example of what you are trying to achieve.