Getting variable values in PowerModels.jl

I think the issue you have is that that branch index in “case[“branch”]” is a string, not an int. Try something like this,

bpp= Dict( (branch["f_bus"] , branch["t_bus"]) => w[(parse(Int,i)] for (i,branch) in case["branch"])