Skip to content

Commit

Permalink
fix error with partial blocker placement
Browse files Browse the repository at this point in the history
  • Loading branch information
bluejuniper committed Oct 29, 2024
1 parent 50fb47f commit fa9ce28
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ function generate_g_i_matrix(network::Dict{String, Any})

zb = Dict()

for blocker in values(network["gmd_blocker"])
zb[blocker["gmd_bus"]] = 1.0 - blocker["status"]
if "gmd_blocker" in keys(network)
for blocker in values(network["gmd_blocker"])
zb[blocker["gmd_bus"]] = 1.0 - blocker["status"]
end
end

for bus in values(network["gmd_bus"])
if bus["status"] == 1
diag_g[bus["index"]] = zb[bus["index"]] * bus["g_gnd"]
diag_g[bus["index"]] = get(zb, bus["index"], 1.0) * bus["g_gnd"]
inject_i[bus["index"]] = 0.0
end
end
Expand Down

0 comments on commit fa9ce28

Please sign in to comment.