If a non-default "disabled" key is used for nodes, identify blocks does not correctly preprocess disabled nodes.
using Pkg
Pkg.activate(".")
Pkg.add("PowerModelsAnalytics")
Pkg.add("PGLib")
using PowerModelsAnalytics
using PGLib
node_settings = Dict{String,Any}(
"node" => "bus",
"disabled" => "status" => 0, # changed to status from bus_type
"x" => "lon",
"y" => "lat",
)
case = pglib("case14")
for (busid,bus) in case["bus"]
bus["status"] = 0 # set all nodes inactive
end
blocks = identify_blocks(case; node_settings)
# no active buses, should be no blocks
julia> println(blocks)
Dict{Int64, Set{Any}}(1 => Set(["4", "1", "12", "2", "6", "11", "13", "5", "14", "7", "8", "10", "9", "3"]))
If a non-default "disabled" key is used for nodes, identify blocks does not correctly preprocess disabled nodes.