Variable start values from Dict

Ok, I figured this out. You can use the Dict directly. Here’s what worked:

A = ["cat","dog"]
R = ["E" , "W"]
X0 = Dict(
       ("cat","E") => 1.1,
       ("cat","W") => 1.2,
       ("dog","E") => 1.3,
       ("dog","W") => 1.4
)

m1 = Model()

@variable(m1, X[i = A,j = R], start = X0[i,j])

Thank you for the interest.

1 Like