Hello,

I'm trying to do the following:

@defConstraint(m, t == sum{param[i,j]*x[i,j], (i,j)=con_values}

When I test it in the interpreter I get:

*ERROR: no method 
addToExpression(GenericAffExpr{Float64,Variable},Float64,Array{Int64,1})*

with con_values defined as [(1,2), (3,4)] and x defined as: 

for (i,j)=con_values

    @defVar(m, x[i,j] >=0)

end

The docs show using the sum operator with single single value arrays. From 
the code illustrating what sum does it seems like it shouldn't be a stretch 
to do what I have above; I even use the list of tuples in the for loop to 
define the variables.

How can I achieve a constraint definition as I have it above?



Reply via email to