PowerIO.jl
Julia entry point for PowerIO: parser, compiler package, and IR infrastructure for power system software. The Rust core reads case files, writes them back, converts between formats, and exposes the same model through Julia, Python, C/C++, and Rust.
using PowerIO
net = parse_file("case14.m") # BalancedNetwork
length(PowerIO.buses(net)) # 14
text, warnings = convert_file("case14.m", "psse")Install
pkg> add PowerIOReleased versions fetch the prebuilt powerio-capi binary as a lazy artifact on first use; you never build Rust. Working on the binding itself needs a local build; see Binary distribution.
Two network models
BalancedNetwork— transmission: balanced positive sequence cases (MATPOWER, PSS/E, PowerWorld, PSLF EPC, PowerModels JSON, egret JSON, pandapower JSON, PyPSA CSV folders, Surge JSON). See Transmission networks.MulticonductorNetwork— distribution: multiconductor unbalanced cases (OpenDSS, PowerModelsDistribution JSON, IEEE BMOPF JSON). See Distribution networks.
The two share the same verbs, and the bare verbs route on the format: parse_file("case14.m") returns a BalancedNetwork, parse_file("feeder.dss") a MulticonductorNetwork, and parse_file("case.pio.json") whichever model the package holds. to_format, convert_file, and warnings dispatch on the network type; the type marker forms (parse_file(BalancedNetwork, path), parse_file(MulticonductorNetwork, path)) pin a model explicitly.
Where to go
- Transmission networks — parse, inspect, normalize, serialize, and extract dense arrays from a
BalancedNetwork. - Matrices — Rust computed sparse matrices as Julia native arrays and PowerModels compatible wrappers.
- Distribution networks — the
MulticonductorNetworkAPI: parse and convert OpenDSS, PMD, and BMOPF cases. - Ecosystem interop — the bridges: PowerModels.jl, ExaModelsPower.jl,
.pio.jsonpackages, GridFM, GO Challenge 3. - Memory safety — FFI ownership, lifetime guarantees, and remaining conditions.
- API reference — every docstring, grouped by area.
Version compatibility
At first use the binding checks the library's ABI version (pio_abi_version) against the version it targets and refuses a stale or mismatched library with an error stating both versions. Distribution calls also check pio_dist_abi_version. PowerIO.library_available probes without throwing, and PowerIO.features reports the optional Arrow, matrix, GridFM, distribution, and package features. PowerIO.dist_capabilities reports finer distribution fidelity flags for downstream packages.