title: Constraints in Julia
body: <p>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 :))</p>
  
  <p>If I have a variable representing a production:</p>
  
  <pre><code>g[i,j]
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>d[j]
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>for j in 1:6
      @constraint(model,sum(g[i,j] for i in 1:50) == d[j])
  end
  </code></pre>
  
  <p>Thank you!</p>