Reputation: 29
I'm switching from AMPL to Julia right now, and while I've checked the JuMP manual on constraints, I didn't see there an answer to my question (in case I've missed it - I'm sorry :))
If I have a variable representing a production:
g[i,j]
Where i - is the number of possible producers and j - is the number of months. And a constant representing a total demand for each month:
d[j]
How should I construct my constraint, if I want the model to fulfill monthly demand? Right now I have this, but it doesn't seem to work for me:
for j in 1:6
@constraint(model,sum(g[i,j] for i in 1:50) == d[j])
end
Thank you!
Upvotes: 0
Views: 134