Creating a tuple from combination of tuple and vectors

Is this question related to Define variables on each elemnts of a vector of vectors? It seems pretty similar.

A = [
    (1, 2), (1, 3), (2, 1), (2, 7), (2, 8), (2, 4), (3, 4), (3, 5), (4, 3), 
    (4, 2), (4, 6), (4, 9), (5, 6), (7, 8), (7, 10), (8, 9), (8, 10), (9, 10),
]
B = [2, 9]
C = [[1, 7, 3, 4], [4, 10, 1, 2, 6, 7]]
D = [12, 15]

using JuMP
model = Model()
sets = [(b, c, d) for (k, d) in enumerate(D) for b in B for c in C[k] if (b, c) in A]
@variable(model, x[sets])
x[(2, 7, 12)]
2 Likes