you can use the generator syntax:
using JuMP
set = Symbol[]
m = Model()
@variable(m, x[i in set])
@objective(m, Min, sum(x[i] for i in set; init=0.0))
you can use the generator syntax:
using JuMP
set = Symbol[]
m = Model()
@variable(m, x[i in set])
@objective(m, Min, sum(x[i] for i in set; init=0.0))