Skip to content

Commit

Permalink
add method to handle TwoTerminalHVDC
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Sep 6, 2023
1 parent 3146059 commit 7b843f5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/common.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
function _add_to_collection!(collection::Vector{PSY.ACBranch}, branch::PSY.ACBranch)
push!(collection, branch)
return
end

function _add_to_collection!(::Vector{PSY.ACBranch}, ::Union{PSY.TwoTerminalHVDCLine, PSY.TwoTerminalVSCDCLine})
return
end

"""
Gets the AC branches from a given Systems.
"""
Expand All @@ -19,7 +28,7 @@ function get_ac_branches(sys::PSY.System)
),
)
end
push!(collection, br)
_add_to_collection!(collection, br)
end
return sort!(collection;
by = x -> (PSY.get_number(PSY.get_arc(x).from), PSY.get_number(PSY.get_arc(x).to)),
Expand Down

0 comments on commit 7b843f5

Please sign in to comment.