Working efficiently with sparse variables in JuMP

To clarify, our suggested work-around is the following:

using JuMP
model = Model()
A = 1:3
B = 1:3
C = 1:5
cond(a, b, c) = a + b + c == 5
S = [(a, b, c) for a in A, b in B, c in C if cond(a, b, c)]
@variable(model, x[S])
x[(1, 1, 3)]

Note that you need the additional parentheses.

In the long-term, we should investigate ways to improve the performance.