Help with function sum{}

jump
#1

H, on my file there’s a constraint written like this @NLconstraint(m,-sum{log(x[i])/gamma[i], i=1:n}<=mm), when I run the program I get an error saying that this type of syntax is no longer supported. so…¿What is the new syntax for sum{} function then? I installed Julia 2 days ago.

Kind regards.

Daniel Castro.

#2
@NLconstraint (m,-sum{log(x[i])/gamma[i], i=1:n}&lt;=mm)

maybe the { symbol before sum?, i don´t use JuMP, something like this?

@NLconstraint (m,-sum(log(x[i])/gamma[i], i=1:n}&lt;=mm)
#3

a non related question, that gamma is an activity?

#4

sum{} is old syntax and has been replaced by sum(). You can find the latest JuMP documentation here: http://www.juliaopt.org/JuMP.jl/v0.19/