Load a system from PowerSystemCaseBuilder

Originally Contributed by: Clayton Barrows

Introduction

PowerSystemCaseBuilder.jl provides a utility to manage a library of Systems. The package has utilities to list the available system data and to create instances of each system. By keeping track of which systems have been constructed locally, it makes the re-instantiation of systems efficient by utilizing the serialization features and avoiding the parsing process for systems that have been previously constructed.

Dependencies

julia> using PowerSystemCaseBuilder

List all systems in library

julia> show_systems()
Category: PowerSystemCaseBuilder.MatpowerTestSystems

┌──────────────────────────────┬───────────────────────────────────┐
│ Name                         │ Descriptor                        │
├──────────────────────────────┼───────────────────────────────────┤
│ matpower_ACTIVSg10k_sys      │ ACTIVSg10k Test system            │
│ matpower_ACTIVSg2000_sys     │ MATPOWER ACTIVSg2000 Test system  │
│ matpower_RTS_GMLC_sys        │ Matpower RTS-GMLC Test system     │
│ matpower_case14_sys          │ Matpower Test system              │
│ matpower_case24_sys          │ Matpower Test system              │
│ matpower_case2_sys           │ Matpower Test system              │
│ matpower_case30_sys          │ Matpower Test system              │
│ matpower_case3_tnep_sys      │ Matpower Test system              │
│ matpower_case5_asym_sys      │ Matpower Test system              │
│ matpower_case5_dc_sys        │ Matpower Test system              │
│ matpower_case5_gap_sys       │ Matpower Test system              │
│ matpower_case5_pwlc_sys      │ Matpower Test system              │
│ matpower_case5_re_sys        │ Matpower Test system              │
│ matpower_case5_re_uc_pwl_sys │ Matpower Test system              │
│ matpower_case5_re_uc_sys     │ Matpower Test system              │
│ matpower_case5_strg_sys      │ Matpower Test system              │
│ matpower_case5_sys           │ Matpower Test system              │
│ matpower_case5_tnep_sys      │ Matpower Test system              │
│ matpower_case6_sys           │ Matpower Test system              │
│ matpower_case7_tplgy_sys     │ Matpower Test system              │
│ matpower_frankenstein_00_sys │ Matpower Frankenstein Test system │
└──────────────────────────────┴───────────────────────────────────┘

Category: PowerSystemCaseBuilder.PSIDSystems

┌───────────────────────────────────────┬──────────────────────────────────────────────────────────┐
│ Name                                  │ Descriptor                                               │
├───────────────────────────────────────┼──────────────────────────────────────────────────────────┤
│ 14 Bus Base Case                      │ 14 Bus Dynamic Test System Case                          │
│ 2 Bus Load Tutorial                   │ 2 Bus Base System for load tutorials                     │
│ 2 Bus Load Tutorial Droop             │ 2 Bus Base System for load tutorials with Droop Inverter │
│ 2 Bus Load Tutorial GENROU            │ 2 Bus Base System for load tutorials with GENROU         │
│ 3 Bus Inverter Base                   │ 3 Bus Base System for tutorials                          │
│ OMIB System                           │ OMIB case with 2 state machine for examples              │
│ Three Bus Dynamic data Example System │ Three Bus case for examples                              │
│ WECC 240 Bus                          │ WECC 240 Bus case dynamic data with some modifications   │
│ WECC 9 Bus                            │ WECC 9 Bus System with dynamic gens from Sauer and Pai   │
│ psid_11bus_andes                      │ PSID 11-bus Kundur System compared against Andes         │
│ psid_4bus_multigen                    │ PSID Multiple Generators in Single-Bus Test Case         │
└───────────────────────────────────────┴──────────────────────────────────────────────────────────┘

Category: PowerSystemCaseBuilder.PSIDTestSystems

┌──────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────┐
│ Name                                     │ Descriptor                                                                           │
├──────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ psid_psse_test_avr                       │ PSID AVR Test Cases for PSSE Validation                                              │
│ psid_psse_test_constantI_load            │ PSID Constant Current Load Test Case                                                 │
│ psid_psse_test_constantP_load            │ PSID Constant Power Load Test Case                                                   │
│ psid_psse_test_exp_load                  │ PSID Exponential Load Test Case                                                      │
│ psid_psse_test_gen                       │ PSID GEN Test Cases for PSSE Validation                                              │
│ psid_psse_test_pss                       │ PSID PSS Test Cases for PSSE Validation                                              │
│ psid_psse_test_tg                        │ PSID TG Test Cases for PSSE Validation                                               │
│ psid_test_3rd_indmotor                   │ PSID System with 3rd-order Induction Motor Test Case                                 │
│ psid_test_5th_indmotor                   │ PSID System with 5th-order Induction Motor Test Case                                 │
│ psid_test_droop_inverter                 │ PSID Two Bus Droop GFM Inverter Test Case                                            │
│ psid_test_gfoll_inverter                 │ PSID Two Bus Grid Following Inverter Test Case                                       │
│ psid_test_ieee_9bus                      │ PSID IEEE 9-bus system with Anderson-Fouad Machine Test Case                         │
│ psid_test_indmotor                       │ PSID System without Induction Motor Test Case                                        │
│ psid_test_omib                           │ PSID OMIB Test Case                                                                  │
│ psid_test_pvs                            │ PSID OMIB with Periodic Variable Source Test Case                                    │
│ psid_test_threebus_5shaft                │ PSID Three Bus 5-shaft Test Case                                                     │
│ psid_test_threebus_anderson              │ PSID Three Bus Anderson-Fouad Test Case                                              │
│ psid_test_threebus_genrou_avr            │ PSID Three Bus GENROU with PSAT AVRs Test Case                                       │
│ psid_test_threebus_machine_vsm           │ PSID Three Bus One-d-One-q Machine against VSM Inverter Test Case                    │
│ psid_test_threebus_machine_vsm_dynlines  │ PSID Three Bus One-d-One-q Machine against VSM Inverter Test Case with Dynamic Lines │
│ psid_test_threebus_marconato             │ PSID Three Bus Simple Marconato Test Case                                            │
│ psid_test_threebus_multimachine          │ PSID Three Bus Multi-Machine Test Case                                               │
│ psid_test_threebus_multimachine_dynlines │ PSID Three Bus Multi-Machine with Dynamic Lines Test Case                            │
│ psid_test_threebus_oneDoneQ              │ PSID Three Bus One-d-One-q Test Case                                                 │
│ psid_test_threebus_psat_avrs             │ PSID Three Bus TG Type I and AVR Type II Test Case                                   │
│ psid_test_threebus_simple_anderson       │ PSID Three Bus Simple Anderson-Fouad Test Case                                       │
│ psid_test_threebus_simple_marconato      │ PSID Three Bus Simple Marconato Test Case                                            │
│ psid_test_threebus_vsm_reference         │ PSID Three Bus Inverter Reference Test Case                                          │
│ psid_test_vsm_inverter                   │ PSID Two Bus D'Arco VSM Inverter Test Case                                           │
└──────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────┘

Category: PowerSystemCaseBuilder.PSISystems

┌─────────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Name                                │ Descriptor                                                                                                                            │
├─────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 2Area 5 Bus System                  │ PSI test system with two areas connected with an HVDC Line                                                                            │
│ 5_bus_hydro_ed_sys                  │ 5-Bus hydro economic dispatch data                                                                                                    │
│ 5_bus_hydro_ed_sys_with_targets     │ 5-Bus hydro economic dispatch data with energy targets                                                                                │
│ 5_bus_hydro_uc_sys                  │ 5-Bus hydro unit commitment data                                                                                                      │
│ 5_bus_hydro_uc_sys_with_targets     │ 5-Bus hydro unit commitment data with energy targets                                                                                  │
│ 5_bus_hydro_wk_sys                  │ 5-Bus hydro system for weekly dispatch                                                                                                │
│ 5_bus_hydro_wk_sys_with_targets     │ 5-Bus hydro system for weekly dispatch with energy targets                                                                            │
│ 5_bus_matpower_AGC                  │ matpower 5-Bus system with AGC time series                                                                                            │
│ 5_bus_matpower_DA                   │ matpower 5-Bus system with DA time series                                                                                             │
│ 5_bus_matpower_RT                   │ matpower 5-Bus system with RT time series                                                                                             │
│ AC_TWO_RTO_RTS_1Hr_sys              │ Two Area RTO System Connected via AC with 1-hour resolution                                                                           │
│ AC_TWO_RTO_RTS_5min_sys             │ Two Area RTO System Connected via AC with 5-min resolution                                                                            │
│ HVDC_TWO_RTO_RTS_1Hr_sys            │ Two Area RTO System Connected via HVDC with 1-hour resolution                                                                         │
│ HVDC_TWO_RTO_RTS_5min_sys           │ Two Area RTO System Connected via HVDC with 5-min resolution                                                                          │
│ MTHVDC_two_RTS_DA_sys_noForecast    │ Two RTS systems connected by two multi-terminal HVDC systems                                                                          │
│ RTS_GMLC_DA_sys                     │ RTS-GMLC Full system from git repo for day-ahead simulations                                                                          │
│ RTS_GMLC_DA_sys_noForecast          │ RTS-GMLC Full system from git repo for day-ahead simulations                                                                          │
│ RTS_GMLC_RT_sys                     │ RTS-GMLC Full system from git repo for day-ahead simulations                                                                          │
│ RTS_GMLC_RT_sys_noForecast          │ RTS-GMLC Full system from git repo for day-ahead simulations                                                                          │
│ c_sys5_pjm                          │ 5-Bus system                                                                                                                          │
│ c_sys5_pjm_rt                       │ 5-Bus system                                                                                                                          │
│ modified_RTS_GMLC_DA_sys            │ Modified RTS-GMLC Full system for day-ahead simulations\n            with modifications to reserve definitions to improve feasibility │
│ modified_RTS_GMLC_DA_sys_noForecast │ Modified RTS-GMLC Full system for day-ahead simulations\n            with modifications to reserve definitions to improve feasibility │
│ modified_RTS_GMLC_RT_sys            │ Modified RTS-GMLC Full system for real-time simulations\n            with modifications to reserve definitions to improve feasibility │
│ modified_RTS_GMLC_RT_sys_noForecast │ Modified RTS-GMLC Full system for real-time simulations\n            with modifications to reserve definitions to improve feasibility │
│ modified_RTS_GMLC_realization_sys   │ Modified RTS-GMLC Full system for real-time simulations\n            with modifications to reserve definitions to improve feasibility │
│ sys10_pjm_ac_dc                     │ 10-bus system (duplicate 5-bus PJM) with 4-DC bus system                                                                              │
│ two_area_pjm_DA                     │ 2 Area 5-Bus system                                                                                                                   │
└─────────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Category: PowerSystemCaseBuilder.PSITestSystems

┌────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Name                           │ Descriptor                                                                                                        │
├────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ batt_test_case_b_sys           │ test system for Storage Energy Target formulation(case-b)                                                         │
│ batt_test_case_c_sys           │ test system for Storage Energy Target formulation(case-c)                                                         │
│ batt_test_case_d_sys           │ test system for Storage Energy Target formulation(case-d)                                                         │
│ batt_test_case_e_sys           │ test system for Storage Energy Target formulation(case-e)                                                         │
│ batt_test_case_f_sys           │ test system for Storage Energy Target formulation(case-f)                                                         │
│ c_duration_test                │ 1 Bus for duration testing                                                                                        │
│ c_fixed_market_bid_cost        │ 1 bus system with a Fixed MarketBidCost Model                                                                     │
│ c_linear_cost_test             │ 1 Bus linear cost for testing                                                                                     │
│ c_linear_fuel_test             │ 1 Bus linear fuel curve testing                                                                                   │
│ c_linear_fuel_test_ts          │ 1 Bus linear fuel curve testing                                                                                   │
│ c_market_bid_cost              │ 1 bus system with MarketBidCost Model                                                                             │
│ c_non_convex_io_pwl_cost_test  │ 1 Bus PWL sos testing                                                                                             │
│ c_pwl_incremental_cost_test    │ 1 Bus PWL incremental cost curve testing                                                                          │
│ c_pwl_incremental_fuel_test    │ 1 Bus PWL incremental (marginal) fuel curve testing                                                               │
│ c_pwl_incremental_fuel_test_ts │ 1 Bus PWL incremental (marginal) fuel curve testing                                                               │
│ c_pwl_io_cost_test             │ 1 Bus PWL I/O cost curve testing                                                                                  │
│ c_pwl_io_fuel_test             │ 1 Bus PWL I/O fuel curve testing                                                                                  │
│ c_pwl_io_fuel_test_ts          │ 1 Bus PWL I/O fuel curve testing                                                                                  │
│ c_quadratic_cost_test          │ 1 Bus quadratic cost for testing                                                                                  │
│ c_quadratic_fuel_test          │ 1 Bus quadratic fuel curve testing                                                                                │
│ c_quadratic_fuel_test_ts       │ 1 Bus quadratic fuel curve testing                                                                                │
│ c_ramp_test                    │ 1-bus for ramp testing                                                                                            │
│ c_sys14                        │ 14-bus system                                                                                                     │
│ c_sys14_dc                     │ 14-bus system with DC line                                                                                        │
│ c_sys5                         │ 5-Bus system                                                                                                      │
│ c_sys5_all_components          │ 5-Bus system with 5-Bus system with Renewable Energy, Hydro Energy Reservoir, and both StandardLoad and PowerLoad │
│ c_sys5_bat                     │ 5-Bus system with Storage Device                                                                                  │
│ c_sys5_bat_ems                 │ 5-Bus system with Storage Device with EMS                                                                         │
│ c_sys5_dc                      │ Systems with HVDC data in the branches                                                                            │
│ c_sys5_ed                      │ 5-Bus System for Economic Dispatch Simulations                                                                    │
│ c_sys5_hy                      │ 5-Bus system with HydroDispatch                                                                                   │
│ c_sys5_hy_ed                   │ 5-Bus system with Hydro-Power for Economic Dispatch Simulations                                                   │
│ c_sys5_hy_ems_ed               │ 5-Bus system with Hydro-Power for Economic Dispatch Simulations                                                   │
│ c_sys5_hy_ems_uc               │ 5-Bus system with Hydro-Power for Unit Commitment Simulations                                                     │
│ c_sys5_hy_uc                   │ 5-Bus system with Hydro-Power for Unit Commitment Simulations                                                     │
│ c_sys5_hybrid                  │ 5-Bus system with Hybrid devices                                                                                  │
│ c_sys5_hybrid_ed               │ 5-Bus system with Hybrid devices and thermal devices for ED.                                                      │
│ c_sys5_hybrid_uc               │ 5-Bus system with Hybrid devices and thermal UC devices                                                           │
│ c_sys5_hyd                     │ 5-Bus system with Hydro Energy Reservoir                                                                          │
│ c_sys5_hyd_ems                 │ 5-Bus system with Hydro Energy Reservoir                                                                          │
│ c_sys5_il                      │ System with Interruptible Load                                                                                    │
│ c_sys5_ml                      │ Test System with Monitored Line                                                                                   │
│ c_sys5_pglib                   │ 5-Bus with ThermalMultiStart                                                                                      │
│ c_sys5_pglib_sim               │ 5-Bus with ThermalMultiStart for simulation                                                                       │
│ c_sys5_phes_ed                 │ 5-Bus system with Hydro Pumped Energy Storage for Economic Dispatch Simulations                                   │
│ c_sys5_pwl_ed                  │ 5-Bus with pwl cost function                                                                                      │
│ c_sys5_pwl_ed_nonconvex        │ 5-Bus with SOS cost function for Economic Dispatch Simulations                                                    │
│ c_sys5_pwl_uc                  │ 5-Bus with SOS cost function for Unit Commitment Simulations                                                      │
│ c_sys5_radial                  │ 5-Bus with a radial branches                                                                                      │
│ c_sys5_re                      │ 5-Bus system with Renewable Energy                                                                                │
│ c_sys5_re_only                 │ 5-Bus system with only Renewable Energy                                                                           │
│ c_sys5_uc                      │ 5-Bus system for Unit Commitment Simulations                                                                      │
│ c_sys5_uc_non_spin             │ 5-Bus system for Unit Commitment with Non-Spinning Reserve Simulations                                            │
│ c_sys5_uc_re                   │ 5-Bus system for Unit Commitment Simulations with Renewable Units                                                 │
│ hydro_test_case_b_sys          │ test system for HydroGen Energy Target formulation(case-b)                                                        │
│ hydro_test_case_c_sys          │ test system for HydroGen Energy Target formulation(case-c)                                                        │
│ hydro_test_case_d_sys          │ test system for HydroGen Energy Target formulation(case-d)                                                        │
│ hydro_test_case_e_sys          │ test system for HydroGen Energy Target formulation(case-e)                                                        │
│ hydro_test_case_f_sys          │ test system for HydroGen  Energy Target formulation(case-f)                                                       │
│ test_RTS_GMLC_sys              │ RTS-GMLC test system with day-ahead forecast                                                                      │
│ test_RTS_GMLC_sys_with_hybrid  │ RTS-GMLC test system with day-ahead forecast and HybridSystem                                                     │
└────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Category: PowerSystemCaseBuilder.PSSEParsingTestSystems

┌────────────────────────────────┬───────────────────────────────┐
│ Name                           │ Descriptor                    │
├────────────────────────────────┼───────────────────────────────┤
│ PSSE 30 Test System            │ PSSE 30 Test system           │
│ psse_ACTIVSg2000_sys           │ PSSE ACTIVSg2000 Test system  │
│ psse_RTS_GMLC_sys              │ PSSE .raw RTS-GMLC system     │
│ pti_case14_sys                 │ PSSE 14-bus Test system       │
│ pti_case24_sys                 │ PSSE 24-bus Test system       │
│ pti_case30_sys                 │ PSSE 30-bus Test system       │
│ pti_case3_sys                  │ PSSE 3-bus Test system        │
│ pti_case5_alc_sys              │ PSSE 5-Bus alc Test system    │
│ pti_case5_sys                  │ PSSE 5-Bus Test system        │
│ pti_case73_sys                 │ PSSE 73-bus Test system       │
│ pti_case7_tplgy_sys            │ PSSE 7-bus Test system        │
│ pti_frankenstein_00_2_sys      │ PSSE frankenstein Test system │
│ pti_frankenstein_00_sys        │ PSSE frankenstein Test system │
│ pti_frankenstein_20_sys        │ PSSE frankenstein Test system │
│ pti_frankenstein_70_sys        │ PSSE frankenstein Test system │
│ pti_parser_test_a_sys          │ PSSE Test system              │
│ pti_three_winding_mag_test_sys │ PSSE Test system              │
│ pti_three_winding_test_2_sys   │ PSSE Test system              │
│ pti_three_winding_test_sys     │ PSSE Test system              │
│ pti_two_terminal_hvdc_test_sys │ PSSE Test system              │
│ pti_two_winding_mag_test_sys   │ PSSE Test system              │
│ pti_vsc_hvdc_test_sys          │ PSSE Test system              │
└────────────────────────────────┴───────────────────────────────┘

Category: PowerSystemCaseBuilder.PSYTestSystems

┌─────────────────────────────────┬─────────────────────────────────────────────────────────────────┐
│ Name                            │ Descriptor                                                      │
├─────────────────────────────────┼─────────────────────────────────────────────────────────────────┤
│ dynamic_inverter_sys            │ PSY test dynamic inverter system                                │
│ psse_240_parsing_sys            │ Test parsing of PSSE 240 Bus Case system                        │
│ psse_3bus_SEXS_sys              │ Test parsing of PSSE 3-bus Test system with SEXS                │
│ psse_3bus_gen_cls_sys           │ Test parsing of PSSE 3-bus Test system with CLS                 │
│ psse_3bus_no_cls_sys            │ Test parsing of PSSE 3-bus Test system without CLS              │
│ psse_Benchmark_4ger_33_2015_sys │ Test parsing of PSSE Benchmark system                           │
│ psse_OMIB_sys                   │ Test parsing of PSSE OMIB Test system                           │
│ psse_renewable_parsing_1        │ Test parsing PSSE 3-bus Test system with REPCA, REECB and REGCA │
│ tamu_ACTIVSg2000_sys            │ TAMU ACTIVSg2000 Test system                                    │
└─────────────────────────────────┴─────────────────────────────────────────────────────────────────┘

Systems can be listed by category

The available categories can be displayed with:

julia> show_categories()PowerSystemCaseBuilder.MatpowerTestSystems
PowerSystemCaseBuilder.PSIDSystems
PowerSystemCaseBuilder.PSIDTestSystems
PowerSystemCaseBuilder.PSISystems
PowerSystemCaseBuilder.PSITestSystems
PowerSystemCaseBuilder.PSSEParsingTestSystems
PowerSystemCaseBuilder.PSYTestSystems

Create a System

The first time this is run, it will parse csv data. Subsequent executions will rely on serialized data and will execute much faster since the employ deserialization

julia> sys = build_system(PSITestSystems, "c_sys5_uc")┌ Info: Building new system c_sys5_uc from raw data
  sys_descriptor.raw_data = "/home/runner/.julia/artifacts/afb608473cf4d5eb22147856de1a1a651f36d40b/PowerSystemsTestData-3.1/psy_data/data_5bus_pu.jl"
[ Info: Serialized time series data to /home/runner/.julia/packages/PowerSystemCaseBuilder/uZO8H/data/serialized_system/4e67b70ea6977dbe21c7731d72cdc1494adf072a7f3f08d921db740cf264ce79/c_sys5_uc_time_series_storage.h5.
[ Info: Serialized System to /home/runner/.julia/packages/PowerSystemCaseBuilder/uZO8H/data/serialized_system/4e67b70ea6977dbe21c7731d72cdc1494adf072a7f3f08d921db740cf264ce79/c_sys5_uc.json
[ Info: Serialized System metadata to /home/runner/.julia/packages/PowerSystemCaseBuilder/uZO8H/data/serialized_system/4e67b70ea6977dbe21c7731d72cdc1494adf072a7f3f08d921db740cf264ce79/c_sys5_uc_metadata.json
System
┌───────────────────┬─────────────┐
│ Property          │ Value       │
├───────────────────┼─────────────┤
│ Name              │             │
│ Description       │             │
│ System Units Base │ SYSTEM_BASE │
│ Base Power        │ 100.0       │
│ Base Frequency    │ 60.0        │
│ Num Components    │ 25          │
└───────────────────┴─────────────┘

Static Components
┌─────────────────┬───────┐
│ Type            │ Count │
├─────────────────┼───────┤
│ ACBus           │ 5     │
│ Arc             │ 6     │
│ Line            │ 6     │
│ PowerLoad       │ 3     │
│ ThermalStandard │ 5     │
└─────────────────┴───────┘

Time Series Summary
┌────────────┬────────────────┬──────────────────┬──────────────────────┬───────
│ owner_type │ owner_category │ time_series_type │ time_series_category │ init ⋯
│ String     │ String         │ String           │ String               │ Stri ⋯
├────────────┼────────────────┼──────────────────┼──────────────────────┼───────
│ PowerLoad  │ Component      │ Deterministic    │ Forecast             │ 2024 ⋯
└────────────┴────────────────┴──────────────────┴──────────────────────┴───────
                                                               3 columns omitted