Hi, I’m trying to create a constraint like specified below, but have this error: “ERROR: BoundsError: attempt to access JuMP.Containers.SparseAxisArray{VariableRef, 3, Tuple{Int64, Int64, Bool}} with 44 entries at index”.
I can’t find the formulation error. Could anybody help me to fix it?
Thanks in advance
Vstation = collect(12:15)
Vcustomer = collect(2:11)
V0_customer = collect(1:11)
Vtotal = collect(1:15)
Q = 10000
@variable(model1, 0 <= q_in_st[i in V0_customer, h in Vstation] <=Q)
@variable(model1, 0 <= q[i in Vtotal, j in Vtotal] <=Q)
@constraint(model1, con5[f in Vcustomer, j in Vstation], q_in_st[f,j] <= sum(q[i,j] for i in V0_customer if i != j))