Skip to content
Snippets Groups Projects
Commit 4c7ea00e authored by Julian Stürmer's avatar Julian Stürmer
Browse files

Improve get_inactive_elements

parent ae738fd6
No related branches found
No related tags found
No related merge requests found
......@@ -282,9 +282,19 @@ function get_inactive_elements(network_data::Dict{String,<:Any})
l["index"] for l in values(network_data["load"]) if
l["status"] != 1
],
"branch" => [
"destroyed_br" => [
br["index"] for br in values(network_data["branch"]) if
br["br_status"] != 1 && haskey(br, "failure_reason") == true &&
br["failure_reason"] == "wind"
],
"overloaded_br" => [
br["index"] for br in values(network_data["branch"]) if
br["br_status"] != 1 && haskey(br, "failure_reason") == true &&
br["failure_reason"] == "overload"
],
"other_br" => [
br["index"] for br in values(network_data["branch"]) if
br["br_status"] != 1
br["br_status"] != 1 && haskey(br, "failure_reason") == false
]
)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment