API reference
Every exported name, grouped by source file. The guides link to these entries.
The package
PowerIO — Module
PowerIOJulia binding of PowerIO, the power system data compiler, over C ABI 7.
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 IRparse 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.
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>") -> PioModuleParse 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.
These methods extend Base.parse so the bare name works after using PowerIO. Parse failures throw PowerIOError.
Display and identity
PowerIO.ActivePowerHandle — Type
Active power with an explicit unit.
PowerIO.ApparentPowerHandle — Type
Apparent power with an explicit unit.
PowerIO.ArtifactHandle — Type
One emitted artifact.
PowerIO.BalancedNetworkHandle — Type
Balanced network; keeps its module alive.
PowerIO.CalculationInstanceHandle — Type
Calculation instance; keeps its module alive.
PowerIO.CalculationSolutionHandle — Type
Calculation solution; keeps its module alive.
PowerIO.CalculationUpdateHandle — Type
One update ready to apply.
PowerIO.ComponentIdHandle — Type
Stable component identity.
PowerIO.DcOperatorsHandle — Type
DC operators built once over a balanced network.
PowerIO.DestinationHandle — Type
Selected output location.
PowerIO.DetailedConnectivityHandle — Type
Detailed connectivity tables; keep their network alive.
PowerIO.DiagnosticsHandle — Type
One diagnostics list.
PowerIO.EmitResultHandle — Type
Completed emission inventory.
PowerIO.JsonValueHandle — Type
Owned structured JSON value.
PowerIO.ModuleHandle — Type
One PioModule inside the C library.
PowerIO.MulticonductorNetworkHandle — Type
Multiconductor network; keeps its module alive.
PowerIO.NetworkUpdateHandle — Type
One network update.
PowerIO.OperatingPointHandle — Type
Operating point; keeps its module alive.
PowerIO.OperatingPointUpdateHandle — Type
One operating point update.
PowerIO.ReactivePowerHandle — Type
Reactive power with an explicit unit.
PowerIO.ScenarioSetHandle — Type
Scenario set; keeps its module alive.
PowerIO.SourceHandle — Type
Acquired input bytes or path.
PowerIO.SparseMatrixHandle — Type
Owned CSR matrix.
PowerIO.StringHandle — Type
Owned string.
PowerIO.TimeSeriesHandle — Type
Time series; keeps its module alive.
PowerIO.UpdateChangeHandle — Type
One change from an update report.
PowerIO.UpdateReportHandle — Type
Report of one applied update batch.
PowerIO.ValueHandle — Type
View of a module value; keeps the module alive.
PowerIO.VectorHandle — Type
Owned double vector.
Everything else
The remaining docstrings appear on their guide pages: Modules, Networks, Distribution, Collections and instances, Matrices, Updates, Interop, and Binary distribution.
PowerIOPowerIO.AcOpfInstancePowerIO.AcOpfSolutionPowerIO.AcPfInstancePowerIO.AcPfSolutionPowerIO.AcScucInstancePowerIO.AcScucSolutionPowerIO.ActivePowerPowerIO.ActivePowerControlPowerIO.ActivePowerHandlePowerIO.ApparentPowerPowerIO.ApparentPowerHandlePowerIO.AreaPowerIO.ArtifactPowerIO.ArtifactHandlePowerIO.BalancedNetworkPowerIO.BalancedNetworkHandlePowerIO.BranchPowerIO.BranchRatingPowerIO.BusPowerIO.BusMappedMatrixPowerIO.CalculationInstanceHandlePowerIO.CalculationSolutionHandlePowerIO.CalculationUpdateHandlePowerIO.ComponentIdPowerIO.ComponentIdHandlePowerIO.ControlProfilePowerIO.DcOperatorsHandlePowerIO.DcOpfInstancePowerIO.DcOpfSolutionPowerIO.DcPfInstancePowerIO.DcPfSolutionPowerIO.DestinationHandlePowerIO.DetailedConnectivityPowerIO.DetailedConnectivityHandlePowerIO.DiagnosticPowerIO.DiagnosticsHandlePowerIO.ElementsPowerIO.EmitResultPowerIO.EmitResultHandlePowerIO.GeneratorPowerIO.GeneratorCapabilityPowerIO.GeneratorCostPowerIO.GeoPowerIO.HistoryEntryPowerIO.HvdcPowerIO.HvdcConverterPowerIO.InverterBasedResourcePowerIO.JsonValueHandlePowerIO.LinDist3FlowOpfInstancePowerIO.LinDist3FlowOpfSolutionPowerIO.LoadPowerIO.LoadSeriesPowerIO.LoadVoltageModelPowerIO.LocationPowerIO.McAcOpfInstancePowerIO.McAcOpfSolutionPowerIO.McAcPfInstancePowerIO.McAcPfSolutionPowerIO.ModuleHandlePowerIO.ModuleSourcePowerIO.MulticonductorBusPowerIO.MulticonductorCapacitorPowerIO.MulticonductorGeneratorPowerIO.MulticonductorLinePowerIO.MulticonductorLineCodePowerIO.MulticonductorLoadPowerIO.MulticonductorNetworkPowerIO.MulticonductorNetworkHandlePowerIO.MulticonductorShuntPowerIO.MulticonductorSwitchPowerIO.MulticonductorTransformerPowerIO.MulticonductorTransformerWindingPowerIO.NetworkUpdatePowerIO.NetworkUpdateHandlePowerIO.OperatingPointPowerIO.OperatingPointHandlePowerIO.OperatingPointUpdatePowerIO.OperatingPointUpdateHandlePowerIO.PioModulePowerIO.PowerIOErrorPowerIO.ProducerPowerIO.ReactivePowerPowerIO.ReactivePowerHandlePowerIO.ScenarioSetPowerIO.ScenarioSetHandlePowerIO.ShuntPowerIO.ShuntBlockPowerIO.ShuntControlPowerIO.SocwrOpfSolutionPowerIO.SourceCommandPowerIO.SourceHandlePowerIO.SourceSpanPowerIO.SparseMatrixHandlePowerIO.StaticVarCompensatorPowerIO.StoragePowerIO.StringHandlePowerIO.SwitchPowerIO.TerminalReferencePowerIO.ThreeWindingTransformerPowerIO.TimeSeriesPowerIO.TimeSeriesHandlePowerIO.TransformerControlPowerIO.TransformerImpedancePowerIO.TransformerWindingPowerIO.UnknownValuePowerIO.UntypedObjectPowerIO.UpdateChangePowerIO.UpdateChangeHandlePowerIO.UpdateReportPowerIO.UpdateReportHandlePowerIO.ValueHandlePowerIO.VectorHandlePowerIO.VoltVarControlPowerIO.VoltWattControlPowerIO.VoltageSourceBase.parsePowerIO.abi_versionPowerIO.apply_updates!PowerIO.build_powermodels_refPowerIO.calc_admittance_matrixPowerIO.calc_bdoubleprime_matrixPowerIO.calc_bprime_matrixPowerIO.calc_branch_admittancesPowerIO.calc_branch_flow_dcPowerIO.calc_branch_flow_matrixPowerIO.calc_branch_phase_shift_injectionPowerIO.calc_branch_susceptancesPowerIO.calc_bus_injection_dcPowerIO.calc_bus_phase_shift_injectionPowerIO.calc_bus_susceptance_matrixPowerIO.calc_dc_index_mapPowerIO.calc_incidence_matrixPowerIO.clear_library!PowerIO.demands_mwPowerIO.deserializePowerIO.emitPowerIO.from_powermodelsPowerIO.library_availablePowerIO.library_versionPowerIO.n_periodsPowerIO.read_load_seriesPowerIO.reference_bus_idsPowerIO.repair_powermodels_angle_bounds!PowerIO.serializePowerIO.set_branch_in_servicePowerIO.set_branch_thermal_ratingPowerIO.set_generator_active_powerPowerIO.set_generator_in_servicePowerIO.set_generator_reactive_powerPowerIO.set_generator_voltage_magnitudePowerIO.set_library!PowerIO.set_load_active_powerPowerIO.set_load_reactive_powerPowerIO.set_switch_closedPowerIO.set_transformer_phase_shift_degreesPowerIO.set_transformer_tap_ratioPowerIO.time_countPowerIO.to_ac_opf_instancePowerIO.to_ac_pf_instancePowerIO.to_ac_power_dataPowerIO.to_dc_opf_instancePowerIO.to_dc_pf_instancePowerIO.to_densePowerIO.to_graphPowerIO.to_lindist3flow_opf_instancePowerIO.to_mc_ac_opf_instancePowerIO.to_mc_ac_pf_instancePowerIO.to_powerdataPowerIO.to_powermodels