Skip to content

Commit c9da2a4

Browse files
authored
Merge pull request #1430 from NREL-Sienna/mb/parse-multi-section-dummy-buses
Don't add dummy buses to system
2 parents 1828061 + e67e39e commit c9da2a4

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/parsers/pm_io/psse.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,6 +1566,9 @@ function _psse2pm_multisection_line!(pm_data::Dict, pti_data::Dict, import_all::
15661566

15671567
dummy_buses =
15681568
Dict(k => v for (k, v) in multisec_line if startswith(k, "DUM") && v != "")
1569+
for (k, v) in dummy_buses
1570+
pm_data["bus"][v]["skip_add"] = true
1571+
end
15691572
sub_data["ext"] = dummy_buses
15701573

15711574
# Check if the multisection line is available based on branch status

src/parsers/power_models_data.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,10 @@ function read_bus!(sys::System, data::Dict; kwargs...)
424424
)
425425

426426
bus_number_to_bus[bus.number] = bus
427-
428-
add_component!(sys, bus; skip_validation = SKIP_PM_VALIDATION)
427+
# Multi-section dummy buses are in the dict, but should not be added to System
428+
if !haskey(d, "skip_add")
429+
add_component!(sys, bus; skip_validation = SKIP_PM_VALIDATION)
430+
end
429431
end
430432

431433
if data["source_type"] == "pti" && haskey(data, "interarea_transfer")
@@ -1359,7 +1361,6 @@ function read_multisection_line!(
13591361
end
13601362

13611363
branch_data = data["branch"]
1362-
13631364
for (_, d) in data["multisection_line"]
13641365
bus_f = bus_number_to_bus[d["f_bus"]]
13651366
bus_t = bus_number_to_bus[d["t_bus"]]

0 commit comments

Comments
 (0)