Steph
1
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 + 1000*(z[j,k,t]-1);
however, t + fen[j] is greater than T, so I get the following:
Error executing “solve” command:
error processing constraint Siembra_Cult_perm1[12,1,10]:
invalid subscript z[12,1,13]
gomfy
2
Hello Steph,
You can add a filter to your indexing expression as follows:
subject to Siembra_Cult_perm1 {j in PERM, k in U, t in T: t + fen[j] <= T}:
z [j,k,t+fen[j]] <= 1 + 1000*(z[j,k,t]-1);
Make sure to double check that this will give you the correct constraints. You can look at your constraints explicitly by saying:
expand Siembra_Cult_perm1;