I have said this many times, but you are trying to write code that is too cryptic. Be more verbose. It is easier to read.
One option is:
function Model!(m, t, T, F, GD, WD, DD, uvH;PfMax,KupRe,SuCostK,LsCost,WcCost)
DDˈi, DDˈD, DDˈn, DDˈC = DD.i, DD.D, DD.n, DD.C
times, Times, lines, loads = t+1:t+T, t:t+T, 1:size(F,1), eachindex(DDˈD)
Common = JuMP.@variable(m)
JuMP.@variable(model, 0 <= ζ1[d in loads] <= DDˈC[DDˈi[d]][t]DDˈD[d])
JuMP.@variable(
model,
0 <= ζ2[d in loads, i in times, s in 1:S] <= DDˈC[DDˈi[d]][i]DDˈD[d],
)
ζ = JuMP.Containers.@container(
[d in loads, i in Times, s in 1:S],
i == t ? ζ1[d] : ζ2[d, i, s]
)
end
But otherwise, you can create your own data structures, you don’t need to use JuMP’s containers.
You could, for example, do:
struct Variables{T1,T2}
t::Int
ζ1::T1
ζ2::T2
end
function Base.getindex(x::Variables, d, i, s)
if i == x.t
return x.ζ1[d]
else
return x.ζ2[d, i, s]
end
end
ζ = Variables(t, ζ1, ζ2)