title: Define several JuMP variables names in loop based on iteration
body: <p>A bit new to julia, and JuMP. I wanted to define variables in a loop i.e x_i for some loop index i. For example.</p>
  <pre><code>for i=1:10
  @variable(m, x_i[1:100], bin)
  
  end
  </code></pre>
  <p>and then reference x_i as needed, just as I would normally (without a loop) use x_1 if I hard coded it in constraints, objective etc. Effectively here, I would like to not have to hardcode.</p>
  <p>From the documentation:</p>
  <pre><code>@variable(model, expr, args..., kw_args...)
  </code></pre>
  <p>Looks like you pass an expression, but its not clear how I would do this/if it is possible. Also it would be useful to know if I can do this, what the syntax is to reference the x_i created in the loop appropiatley in constraints, objectives, etc.</p>
  <p>Any feedback would be greatly appreciated.</p>
  <p>Thank you.</p>