It’s not a proposal, I was just correcting my claim that you can only index with a single number. It is still not possible to index with a two-dimensional index.
Your problem appears to be that this function
g = d -> @objective m Max begin
sum((price[s]*d[s,n]) for n in N for s in S)
end
is simply not correctly defined.