geopulse.io.matpower
MATPOWER-GMD (.m) parser for power-grid GIC test cases.
Extracts only the GMD/DC-network-relevant sections used by
PowerGridNetwork:
mpc.gmd_bus— DC ground nodes and grounding conductanceg_gnd[S]mpc.gmd_branch— DC-equivalent branches (lines, transformer windings) with per-branch resistancebr_r[Ω] and lengthlen_km[km]mpc.bus_gmd— (lat, lon) per AC busmpc.bus/mpc.branch— AC-side metadata retained for downstream configuration helpers (baseKV, ratings, statuses)
This is a narrow parser — enough to load epri21.m (Horton et al.
2012) and equivalent PowerModelsGMD.jl test files. It is NOT a general
MATPOWER reader; that is out of scope for GeoPulse core.
References
Notes
Row-position vs. AC bus number: the f_bus / t_bus fields inside
mpc.gmd_branch reference 1-based row positions within
mpc.gmd_bus, NOT AC bus numbers. Callers must respect this convention.
The parent_index column on each gmd_bus row instead names the AC
bus (substation) that DC node belongs to; use it for geographic lookup via
mpc.bus_gmd.
Functions
|
Parse a MATPOWER-GMD |
Classes
|
Structured contents of a MATPOWER-GMD |
- class geopulse.io.matpower.MatpowerGMDCase(source_path, n_dc_nodes, dc_nodes=<factory>, dc_branches=<factory>, bus_latlon=<factory>, ac_bus_kv=<factory>, ac_branches=<factory>)[source]
Bases:
objectStructured contents of a MATPOWER-GMD
.mfile.- Parameters:
- source_path
Path the case was loaded from.
- Type:
- dc_nodes
One entry per DC node, ordered by 1-based row position within
mpc.gmd_bus. Fields:row1-based row index (DC node id used by branches)parent_ac_busAC bus number this DC node groundsstatus1 = in service, 0 = outg_gnd_Sgrounding conductance in Siemensnamehuman name (e.g."dc_sub1")
- dc_branches
DC branches. Fields:
from_row,to_row1-based DC node row indicesparent_ac_branch1-based AC branch index (or 0 for none)status1 in service, 0 outresistance_OhmDC resistancelength_kmgeographic length (km); 0 for xfmr windingsnamehuman name
- ac_branches
AC-side branches, retained for case-configuration helpers (each has
f,t,rateA,ratio,status).