Error invalid subscript

I am declaring the following restriction:

subject to Siembra_Cult_perm1 {j in PERM, k in U, t in T}:
   z[j,k,t+fen[j]] <= 1 + M * (z[j,k,t]-1);

However, t + fen[j] is greater than T, because in this point fen[j] is 3…so I get the following: Error executing “solve” command:
error processing constraint Siembra_Cult_perm1[12,1,10]:
invalid subscript z[12,1,13]

How Can I rewrite this restriction, if I want only t+fen[j] less than 12 in the z subscript, before the equal?

If you do not want any constraint to be generated when t+fen[j] is greater than 12, then you can add that condition to the constraint’s indexing expression:

subject to Siembra_Cult_perm1
      {j in PERM, k in U, t in T: t+fen[j] <= 12}:
   z[j,k,t+fen[j]] <= 1 + M * (z[j,k,t]-1);

This is OK if the last member of set T will always be 12. Otherwise, you may want to replace the explicit “12” by a parameter of the model (or an expression involving parameters).