Dear all,
I have a constraint in a integer program like
@constraint(modelo,[j in J,i in I],
sum(x[i,k,h] for h in H for k in S_j) <= 1
)
My problem is how can I write this constraint by using the set S_j.
For example, if j=1, then S_j = {2,4}, if j=2, S_j = {1,3,4}, if j=3 S_j = {2,5,6} and so on, for each j I have a S_j with a diferent cardinality.
Best regards.