The original problem is so larg. But, Suppose we have this small set of vectors
A = [ [ [13, 48,99] , [71, 58, 99]],
[[91, 59, 22], [94, 86, 22], [71, 58, 22], [19,55,22]],
[[41, 79, 12], [23, 16, 12], [53, 28, 12]] ]
B =[99, 22, 12] # the last member of each above vector has a meaning
as length(A) = 3
, I’d like to have three constraints similar the following:
c1 := x[13, 48,99] + x[71, 58, 99] >= 2
c2: = x[91, 59, 22]+ x[94, 86, 22]+ x[71, 58, 22]+ x[19,55,22] >=2
c3:= x[41, 79, 12]+ x[23, 16, 12]+ x[53, 28, 12] >=2
My try
@constraint(m, [b in B], sum( x[i] for i in A) >=2)