API reference

Every exported name, grouped by source file. The guides link to these entries.

The package

PowerIO — Module
PowerIO

Julia binding of PowerIO, the power system data compiler, over its C ABI.

using PowerIO
case = parse("case9.m")             # PioModule{BalancedNetwork}
net = case.value
length(net.buses)                   # 9
net.branches[1].reactance_pu
case.diagnostics                    # the reader's findings
emit(case, "matpower", "copy.m")    # same format: writes the original file unchanged
result = emit(case, "psse")         # another format, in memory
result.text
serialize(case, "case9.pio.json")   # PowerIO IR

parse reads a grid exchange source into a typed module. emit writes one. serialize and deserialize move PowerIO IR between PowerIO consumers. calc_* functions compute matrices and vectors. to_* functions construct another value type in memory. apply_updates! changes a module in place.

The C library resolves automatically: the bundled artifact, or a sibling powerio build during development. Point at a custom build with set_library!, the POWERIO_CAPI environment variable, or a persisted Preferences.jl override.

source

Parsing

Base.parse — Method
parse(path::AbstractString; format=nothing) -> PioModule
parse(io::IO; format=nothing, name=nothing) -> PioModule
parse(bytes::AbstractVector{UInt8}; format=nothing, name="<memory>") -> PioModule

Parse one grid exchange source into a typed module. A string is a path to a file or directory. An IO or byte vector is read in memory; name supplies the source name for format detection and diagnostics (an open file stream uses its path). format is a canonical format token such as "matpower", "psse", or "dss"; when omitted, the source name and content select the format.

The value type follows the source: MATPOWER, PSS/E, XIIDM, CGMES, and the other balanced formats give PioModule{BalancedNetwork}; OpenDSS, PMD JSON, and BMOPF give PioModule{MulticonductorNetwork}; PyPSA and GridFM folders give time series and scenario sets; GO Challenge 3 and OPFData give calculation instances and solutions.

Explicit sincal_multiconductor=SincalReadOptions(...) requires the matching format="sincal-multiconductor". Balanced inputs use sincal_balanced=SincalBalancedReadOptions(...) and format="sincal-balanced". Path inputs may widen their acquisition root with acquisition_root; memory inputs receive named_buffers and never read companions from disk. C/Julia options do not change the returned network family.

These methods extend Base.parse so the bare name works after using PowerIO. Parse failures throw PowerIOError.

parse(V, source; kwargs...) -> V
parse(PioModule{V}, source; kwargs...) -> PioModule{V}

The same, for a source whose value type the caller knows. As with parse(T, str) in Base, the result is a V: parse(BalancedNetwork, "case14.m") is the network and parse(AcScucInstance, path) the instance, each keeping its module's data alive. Ask for PioModule{V} to keep the module itself, for emit, apply_updates!, or its records; parse(PioModule, source) is the untyped form. For a concrete V both results are inferred, where the untyped form's is not, so these are the forms to call from code compiled with juliac --trim=safe.

V may also name a family, such as TimeSeries or CalculationInstance: the value type is then resolved at run time and must belong to it. A module type names one value type, so PioModule{V} takes a concrete V. A source that holds another kind of value is an ArgumentError naming what it holds.

source
PowerIO.SincalBalancedReadOptions — Type
SincalBalancedReadOptions(; variant=nothing, snapshot_hours=nothing, acquired_tables=nothing)

Explicit balanced SINCAL selection. Use with format="sincal-balanced" and sincal_balanced=.... The optional Access companion is verified against the original MDB; parsing never runs an external acquisition tool.

source
PowerIO.SincalReadOptions — Type
SincalReadOptions(; variant=nothing, snapshot_hours=nothing, acquired_tables=nothing,
                  assume_inactive_source_controls=false)

Explicit conductor-resolved SINCAL selection. variant is a native ID; snapshot_hours selects a daily snapshot. acquired_tables is a relative companion name for explicitly acquired Access records. Parsing retains the original MDB and verifies its length/hash; it never runs an acquisition tool. Use with parse(...; format="sincal-multiconductor", sincal_multiconductor=...). assume_inactive_source_controls=true opts into experimental schema-11.5 NULL source-control defaults. Every applied assumption emits a diagnostic.

source

Display and identity

Everything else

The remaining docstrings appear on their guide pages: Modules, Networks, Distribution, Collections and instances, Matrices, Updates, Interop, and Binary distribution.