Skip to content

Commit

Permalink
handle gic blockers in matrix solve
Browse files Browse the repository at this point in the history
  • Loading branch information
bluejuniper committed Oct 11, 2024
1 parent bcd4f08 commit 23e7e1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions src/core/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ function generate_g_i_matrix(network::Dict{String, Any})
diag_g = Dict{Int64, Float64}()
inject_i = Dict{Int64, Float64}()

zb = Dict()

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

for bus in values(network["gmd_bus"])
if bus["status"] == 1
diag_g[bus["index"]] = bus["g_gnd"]
inject_i[bus["index"]] = 0
diag_g[bus["index"]] = zb[bus["index"]] * bus["g_gnd"]
inject_i[bus["index"]] = 0.0
end
end

Expand Down
8 changes: 4 additions & 4 deletions test/data/matpower/b4gic_blocker.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@


%% gmd_branch data
%column_names% f_bus t_bus parent_index br_status br_r br_v len_km name
%column_names% f_bus t_bus parent_type parent_index br_status br_r br_v len_km name
mpc.gmd_branch = {
3 1 1 1 0.1 0 0 'dc_xf1_hi'
3 4 2 1 1.00073475 170.78806587354 170.78806587354 'dc_br1'
4 2 3 1 0.1 0 0 'dc_xf2_hi'
3 1 'branch' 1 1 0.1 0 0 'dc_xf1_hi'
3 4 'branch' 2 1 1.00073475 170.78806587354 170.78806587354 'dc_br1'
4 2 'branch' 3 1 0.1 0 0 'dc_xf2_hi'
};


Expand Down

0 comments on commit 23e7e1f

Please sign in to comment.