diff --git a/Artifacts.toml b/Artifacts.toml index 000fe0c..9e97aa2 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -1,10 +1,10 @@ [CaseData] -git-tree-sha1 = "906591a156d0f786940f105e4f6aeceffefa7a2e" +git-tree-sha1 = "afb608473cf4d5eb22147856de1a1a651f36d40b" lazy = true [[CaseData.download]] - url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/3.0.tar.gz" - sha256 = "6e8b16c62c8859d39a0d8eae65a20f8aa3da9a70b7e36d3dce690dcad1775437" + url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/3.1.tar.gz" + sha256 = "4ac6ccd9dc9690b52ad6d0f46eeb759608e04ef8bc871732ff54bdbb0493dcea" [rts] git-tree-sha1 = "5098f357bad765bfefcff58f080818863ca776bd" diff --git a/src/definitions.jl b/src/definitions.jl index b0275ac..814e540 100644 --- a/src/definitions.jl +++ b/src/definitions.jl @@ -1,6 +1,6 @@ const PACKAGE_DIR = joinpath(dirname(dirname(pathof(PowerSystemCaseBuilder)))) const DATA_DIR = - joinpath(LazyArtifacts.artifact"CaseData", "PowerSystemsTestData-3.0") + joinpath(LazyArtifacts.artifact"CaseData", "PowerSystemsTestData-3.1") const RTS_DIR = joinpath(LazyArtifacts.artifact"rts", "RTS-GMLC-0.2.2") diff --git a/src/library/psi_library.jl b/src/library/psi_library.jl index 213b637..4061dfc 100644 --- a/src/library/psi_library.jl +++ b/src/library/psi_library.jl @@ -1545,3 +1545,75 @@ function build_HVDC_TWO_RTO_RTS_5Min_sys(; kwargs...) new_sys = _duplicate_system(main_sys_RT, deepcopy(main_sys_RT), true) return new_sys end + +function build_MTHVDC_two_RTS_DA_sys_noForecast(; kwargs...) + sys_rts = build_RTS_GMLC_DA_sys_noForecast(; kwargs...) + sys = _duplicate_system(sys_rts, deepcopy(sys_rts), false) + include(joinpath( + DATA_DIR, + "psy_data", + "data_mthvdc_twin_rts.jl", + )) + # Remove AC connection + ac_interconnection = first(PSY.get_components(PSY.MonitoredLine, sys)) + PSY.remove_component!(sys, ac_interconnection) + + ### Add DC Buses ### + for dcbus in dcbuses + PSY.add_component!(sys, dcbus) + end + + ### Add DC Lines ### + for dcline in dclines + PSY.add_component!(sys, dcline) + end + + ### Add IPCs ### + function get_bus_by_number(sys, number) + return first(get_components(x -> x.number == number, Bus, sys)) + end + + for (ix, bus_tuple) in enumerate(bus_arcs_7T) + dcbus = get_bus_by_number(sys, bus_tuple[1]) + acbus = get_bus_by_number(sys, bus_tuple[2]) + ipc = PSY.InterconnectingConverter(; + name = "$(bus_tuple[2])_$(bus_tuple[1])", + available = true, + bus = acbus, + dc_bus = dcbus, + active_power = 0.0, + rating = 1.0, + active_power_limits = (min = 0.0, max = 1.0), + base_power = P_limit_7T[ix], + loss_function = PSY.QuadraticCurve( + c_pu[ix], + b_pu[ix], + a_pu[ix], + ), + ) + PSY.add_component!(sys, ipc) + end + + for bus_tuple in bus_arcs_9T + dcbus = get_bus_by_number(sys, bus_tuple[1]) + acbus = get_bus_by_number(sys, bus_tuple[2]) + ipc = PSY.InterconnectingConverter(; + name = "$(bus_tuple[2])_$(bus_tuple[1])", + available = true, + bus = acbus, + dc_bus = dcbus, + active_power = 0.0, + rating = 1.0, + active_power_limits = (min = 0.0, max = 1.0), + base_power = P_limit_9T, + loss_function = PSY.QuadraticCurve( + c_pu_9T, + b_pu_9T, + a_pu_9T, + ), + ) + PSY.add_component!(sys, ipc) + end + + return sys +end diff --git a/src/system_descriptor_data.jl b/src/system_descriptor_data.jl index 9cffb3f..8e700d4 100644 --- a/src/system_descriptor_data.jl +++ b/src/system_descriptor_data.jl @@ -829,6 +829,13 @@ const SYSTEM_CATALOG = [ raw_data = RTS_DIR, build_function = build_HVDC_TWO_RTO_RTS_5Min_sys, ), + SystemDescriptor(; + name = "MTHVDC_two_RTS_DA_sys_noForecast", + description = "Two RTS systems connected by two multi-terminal HVDC systems", + category = PSISystems, + raw_data = RTS_DIR, + build_function = build_MTHVDC_two_RTS_DA_sys_noForecast, + ), SystemDescriptor(; name = "psse_ACTIVSg2000_sys", description = "PSSE ACTIVSg2000 Test system",