From 115fe386ec6b0f57b04c2f46c2a3125ef44ec2e5 Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Mon, 26 Jun 2023 10:35:18 -0600 Subject: [PATCH 1/5] update test data reference --- Artifacts.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Artifacts.toml b/Artifacts.toml index 622644d..20def00 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -2,7 +2,7 @@ git-tree-sha1 = "8ca703c3979927752c9ff77a32bd85f3c97d93b9" [[CaseData.download]] - url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/1.0.1.tar.gz" + url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/1.0.2.tar.gz" sha256 = "15d0e7a8c7e40e62ae2a77a4691fc83a2c6a60dc79774411bcf0bfb6ecea5a57" [rts] From 49da4ac688a6ce064b1692c034988f196b76be2d Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Mon, 26 Jun 2023 10:35:24 -0600 Subject: [PATCH 2/5] add new files --- src/library/psid_library.jl | 28 ++++++++++++++++++++++++++-- src/library/psidtest_library.jl | 2 +- src/system_descriptor_data.jl | 20 +++++++++++++++++++- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/library/psid_library.jl b/src/library/psid_library.jl index d13c7fe..9f3cebb 100644 --- a/src/library/psid_library.jl +++ b/src/library/psid_library.jl @@ -6,8 +6,8 @@ function build_psid_4bus_multigen(; kwargs...) dyr_file = joinpath(data_dir, "FourBus_multigen.dyr") sys = System(raw_file, dyr_file; sys_kwargs...) - for l in get_components(PSY.PowerLoad, sys) - PSY.set_model!(l, PSY.LoadModels.ConstantImpedance) + for l in get_components(PSY.StandardLoad, sys) + transform_load_to_constant_impedance(l) end return sys end @@ -18,5 +18,29 @@ function build_psid_11bus_andes(; kwargs...) raw_file = joinpath(data_dir, "11BUS_KUNDUR.raw") dyr_file = joinpath(data_dir, "11BUS_KUNDUR_TGOV.dyr") sys = System(raw_file, dyr_file; sys_kwargs...) + for l in get_components(PSY.StandardLoad, sys) + transform_load_to_constant_impedance(l) + end + return sys +end + +function build_psid_omib(; kwargs...) + sys_kwargs = filter_kwargs(; kwargs...) + sys_file = joinpath(DATA_DIR, "psid_tests", "data_examples", "omib_sys.json") + sys = System(sys_file; sys_kwargs...) + return sys +end + +function build_psid_3bus(; kwargs...) + sys_kwargs = filter_kwargs(; kwargs...) + sys_file = joinpath(DATA_DIR, "psid_tests", "data_examples", "threebus_sys.json") + sys = System(sys_file; sys_kwargs...) + return sys +end + +function build_wecc_240_dynamic(; kwargs...) + sys_kwargs = filter_kwargs(; kwargs...) + sys_file = joinpath(DATA_DIR, "psid_tests", "data_tests", "WECC_240_dynamic.json") + sys = System(sys_file; sys_kwargs...) return sys end diff --git a/src/library/psidtest_library.jl b/src/library/psidtest_library.jl index 5ffa373..16f773f 100644 --- a/src/library/psidtest_library.jl +++ b/src/library/psidtest_library.jl @@ -788,7 +788,7 @@ function build_psid_test_threebus_multimachine_dynlines(; kwargs...) add_component!(sys, dyn_line) end - for l in get_components(PSY.StandardLoad, threebus_sys) + for l in get_components(PSY.StandardLoad, sys) transform_load_to_constant_impedance(l) end diff --git a/src/system_descriptor_data.jl b/src/system_descriptor_data.jl index 9298576..f1fbfd2 100644 --- a/src/system_descriptor_data.jl +++ b/src/system_descriptor_data.jl @@ -1105,9 +1105,27 @@ const SYSTEM_CATALOG = [ ), SystemDescriptor(; name = "2Area 5 Bus System", - description = "PSI test system with two areas connected with an HVDC Line", # Old Test 38 + description = "PSI test system with two areas connected with an HVDC Line", category = PSISystems, raw_data = joinpath(DATA_DIR, "psy_data", "data_5bus_pu.jl"), build_function = build_two_zone_5_bus, ), + SystemDescriptor(; + name = "OMIB System", + description = "OMIB case with 2 state machine for examples", + category = PSIDSystems, + build_function = build_psid_omib, + ), + SystemDescriptor(; + name = "Three Bus Dynamic data Example System", + description = "Three Bus case for examples", + category = PSIDSystems, + build_function = build_psid_3bus, + ), + SystemDescriptor(; + name = "WECC 240 Bus", + description = "WECC 240 Bus case dynamic data with some modifications", + category = PSIDSystems, + build_function = build_psid_3bus, +), ] From 80eb03c302dfd237c40c0c843e1869237b898986 Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Mon, 26 Jun 2023 10:38:19 -0600 Subject: [PATCH 3/5] fix sys name --- src/library/psidtest_library.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/psidtest_library.jl b/src/library/psidtest_library.jl index 16f773f..932eba0 100644 --- a/src/library/psidtest_library.jl +++ b/src/library/psidtest_library.jl @@ -667,7 +667,7 @@ function build_psid_test_threebus_genrou_avr(; kwargs...) ) end - for l in get_components(PSY.StandardLoad, threebus_sys) + for l in get_components(PSY.StandardLoad, sys) transform_load_to_constant_impedance(l) end From a83aee816f51384a5c68a4de8da730672df02ff7 Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Mon, 26 Jun 2023 11:14:44 -0600 Subject: [PATCH 4/5] update artifacts refs --- Artifacts.toml | 4 ++-- src/definitions.jl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Artifacts.toml b/Artifacts.toml index 20def00..34235f2 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -1,9 +1,9 @@ [CaseData] -git-tree-sha1 = "8ca703c3979927752c9ff77a32bd85f3c97d93b9" +git-tree-sha1 = "2fc84c9858b0cada3d37ffe198a4dd11ed54601d" [[CaseData.download]] url = "https://github.com/NREL-Sienna/PowerSystemsTestData/archive/refs/tags/1.0.2.tar.gz" - sha256 = "15d0e7a8c7e40e62ae2a77a4691fc83a2c6a60dc79774411bcf0bfb6ecea5a57" + sha256 = "e58a881dc784be1c7edf6ebd57b7276232aab9b8e46bfb9f10365f902c8ede3d" [rts] git-tree-sha1 = "5098f357bad765bfefcff58f080818863ca776bd" diff --git a/src/definitions.jl b/src/definitions.jl index 428be2c..dd32e8f 100644 --- a/src/definitions.jl +++ b/src/definitions.jl @@ -1,5 +1,5 @@ const PACKAGE_DIR = joinpath(dirname(dirname(pathof(PowerSystemCaseBuilder)))) -const DATA_DIR = joinpath(LazyArtifacts.artifact"CaseData", "PowerSystemsTestData-1.0.1") +const DATA_DIR = joinpath(LazyArtifacts.artifact"CaseData", "PowerSystemsTestData-1.0.2") const RTS_DIR = joinpath(LazyArtifacts.artifact"rts", "RTS-GMLC-0.2.2") const SYSTEM_DESCRIPTORS_FILE = joinpath(PACKAGE_DIR, "src", "system_descriptor.jl") From 0f68c776a21afaff384f0dddab155e0135c39dce Mon Sep 17 00:00:00 2001 From: Jose Daniel Lara Date: Mon, 26 Jun 2023 11:18:55 -0600 Subject: [PATCH 5/5] formatter --- src/system_descriptor_data.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system_descriptor_data.jl b/src/system_descriptor_data.jl index f1fbfd2..cbda455 100644 --- a/src/system_descriptor_data.jl +++ b/src/system_descriptor_data.jl @@ -1127,5 +1127,5 @@ const SYSTEM_CATALOG = [ description = "WECC 240 Bus case dynamic data with some modifications", category = PSIDSystems, build_function = build_psid_3bus, -), + ), ]