title: Can an optimization constraint be implemented with 2 variable that declared with different feature?
body: <p>My goal is to write the following constraint with the doxplex.mp.model with Python API:
  P[t,j] &gt;= s[t-j+1] - sum(s[k=t-j+2] from k to t) for t = 1,....,N, j = 1,...,t</p>
  <p><strong>my code.</strong></p>
  <pre><code>from docplex.mp.model import Model
  clsp = Model(name = 'capacitated lot sizing problem')
  no_of_period = 8
  period_list = [t for t in range(1, no_of_period+1)]
  s_indicator = clsp.binary_var_dict(period_list, name = 's_indicator')
  p_indicator = clsp.binary_var_matrix(period_list, period_list, name = 'p_indicator')
  m_8 = clsp.add_constraints(p_indicator[t,j] &gt;= s_indicator[t-j+1] - clsp.sum(s_indicator[t-j+2]  for j in range(1,t+1))  
                             for j in t for t in period_list )
  </code></pre>
  <p><strong>Output: Keyerror 0</strong>
  <strong>Any help would be appreciated</strong></p>