title: AMPL syntax error - constraint over indexed set
body: <p>first, here is a simple example that demonstrates my problem:</p>
  
  <pre><code># .mod file
  param N;
  set TIME := 1 .. N;
  set C ordered;
  param tbar {C};
  var X {C,TIME} &gt;= 0;
  
  minimize cost: sum {c in C} X[c,N];
  
  subject to C1 {c in C: ord(c)&gt;1, t in 1 .. N-1}:
      X[c,t+1] = X[c,t] + 3;
  </code></pre>
  
  <p>Here is the .dat file:</p>
  
  <pre><code>param N := 10;
  set C := C1 C2 C3;
  param tbar :=
      C1 2
      C2 3
      C3 3 ;
  </code></pre>
  
  <p>I get the syntax error</p>
  
  <pre><code>test.mod, line 9 (offset 142):
      syntax error
  context:  subject to C1 {c in C:  &gt;&gt;&gt; ord(c)&gt;1, &lt;&lt;&lt;  t in 1 .. N-1}:
  </code></pre>
  
  <p>If I change the position of the indexing to </p>
  
  <pre><code>{t in 1 .. N-1, c in C: ord(c)&gt;1},
  </code></pre>
  
  <p>it works fine. The problem is, that I want to have</p>
  
  <pre><code>{c in C: ord(c)&gt;1, t in tbar[c] .. N-1},
  </code></pre>
  
  <p>so I cannot change the position.
  Does anybody know why this error happens and if there is a way around it?</p>