Expand description
PowerIO: compiler infrastructure for power system data.
The short powerio name is the entry facade over the component crates:
powerio-core (sources, diagnostics, errors, modules), powerio-tx
(the balanced transmission model and its format parsing and emission),
powerio-dist (the multiconductor distribution model), and powerio-prob
(operating points, problem instances, and solutions). The facade owns the
dynamic value boundary: PioValue, parse, emit, serialize,
and deserialize.
parse compiles one input into PioModule<PioValue>, routing to
whichever built in family claims it. Inspect the value with ordinary enum
matching and emit the module without discarding its input or diagnostics:
let module = powerio::parse("case9.m")?;
match module.value() {
powerio::PioValue::BalancedNetwork(network) => {
println!("{} buses", network.buses().len());
}
other => println!("parsed {}", other.type_name()),
}
powerio::emit(&module, "matpower", "copy.m")?;A file name, a directory name, and content already in memory all reach the same operation, so it does not multiply into name-, text-, and byte-specific verbs:
let from_file = powerio::parse("case9.m")?;
let from_directory = powerio::parse("pypsa_case/")?;
let from_memory = powerio::parse(std::fs::read("case9.egret.json")?)?;Content in memory carries the name <memory>, which identifies no format,
so a format detected from a file extension rather than from the document
itself is either declared or named:
let declared = powerio::parse_with_options(
std::fs::read("case9.m")?,
&powerio::ParseOptions::default().format("matpower")?,
)?;
let named = powerio::parse(powerio::Source::from_memory(
"case9.m",
std::fs::read("case9.m")?,
)?)?;A geographic layer is a value like any other: the canonical .geo.json,
GeoJSON, aliased CSV or JSON records, headerless buscoords CSV, and a
PowerWorld .pwd display all parse to PioValue::GeoLayer, emit
writes one as geo-json, and apply_geo_layer places one onto a case.
parse_with_options selects the parser explicitly and widens the
directory a format may refer to further files beneath. Source and
Destination remain the advanced input and output: a source carrying
named buffers for a multi-file case in memory, and a memory destination
with its artifact root name.
let module = powerio::parse_with_options(
"case.data",
&powerio::ParseOptions::default().format("psse")?,
)?;Re-exports§
pub use transform::apply_geo_layer;pub use transform::to_ac_opf_instance;pub use transform::to_ac_pf_instance;pub use transform::to_dc_opf_instance;pub use transform::to_dc_pf_instance;pub use transform::to_mc_ac_opf_instance;pub use transform::to_mc_ac_pf_instance;pub use powerio_dist as dist;pub use powerio_matrix as matrix;
Modules§
- codes
- The facade’s diagnostic code registry. An emission site names an entry rather than a loose string.
- dist_
geo - Geographic layer glue for the multiconductor model.
- geo
- Balanced network records and the public network and geographic submodules.
Derived indexes, normalization data, solver tables, and component error
types remain available from
powerio-txrather than being duplicated at the facade root. Typed coordinate metadata for the balanced model, and the standalone geographic document (GeoLayer) that carries coordinates as a file of their own. - gridfm_
codes - GridFM reader diagnostics.
- network
- Balanced network records and the public network and geographic submodules.
Derived indexes, normalization data, solver tables, and component error
types remain available from
powerio-txrather than being duplicated at the facade root. Format neutral balanced network model. - transform
- Explicit transformations and their preflight checks.
Macros§
- diagnostic_
codes - Declare one crate’s diagnostic registry.
Structs§
- AcOpf
Instance - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The AC optimal power flow instance: the shared network, the typed objective, and the active generator capability, voltage, thermal, and angle constraint selections. - AcOpf
Solution - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The AC optimal power flow solution: the AC power flow results plus the optimized generator active and reactive dispatch and the objective value. - AcPf
Instance - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The AC power flow instance: the shared network plus oneAcBusSpecificationper bus. - AcPf
Solution - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The AC power flow solution: complex bus voltages, active and reactive bus injections, and terminal branch flows over the shared instance. - AcScuc
Instance - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The AC security constrained unit commitment instance: the shared balanced network plus the Challenge 3 formulation inputs. - AcScuc
Solution - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The AC security constrained unit commitment solution over the shared instance. - Active
Power - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. An absolute active power replacement with an explicit unit. - Apparent
Power - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. An absolute apparent power rating with an explicit unit. - Area
- An area record: the area’s scheduled net interchange and its swing bus.
- Artifact
Path - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Portable relative path of one output artifact.
- Balanced
Network - A balanced network with stable source bus IDs and separate element tables: an immutable cheap to clone owning handle over private shared tables.
- Bmopf
Emit Options - Options for BMOPF JSON output.
- Branch
- Branch
Charging - Per terminal branch shunt admittance in p.u. This is the canonical physical branch shunt model when present.
- Branch
Current Ratings - Current limits for a branch, in source units.
- Branch
Rating Set - Extra branch MVA rating set beyond the canonical A/B/C columns.
- Branch
Solution - Solved branch terminal flows in MW/MVAr.
- Bus
- BusId
- A source bus ID, preserved from the input format.
- Canvas
- Diagram canvas metadata.
- Component
Id - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Stable identity of one component in a PowerIO value.
- DcOpf
Instance - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The DC optimal power flow instance: the shared network, the typed objective, the active constraint selections, the selected DC branch susceptance formula, and the reference conditions the network states. - DcOpf
Solution - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The DC optimal power flow solution: the DC power flow results plus the optimized generator active dispatch, the objective value, and the optional economic outputs an optimizing producer can attach. - DcPf
Instance - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The DC power flow instance: the shared network plus per bus boundary specifications and the selected branch susceptance formula. - DcPf
Solution - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The DC power flow solution: bus angles and injections and branch terminal active flows over the shared instance. - Destination
- The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Owned output destination for one file, one directory, or memory artifacts.
- Diagnostic
- The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. One coded user facing finding.
- Diagnostic
Code - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Stable dotted identity of one diagnostic.
- Diagnostic
Id - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
- Diagnostic
Info - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. One entry in a crate’s diagnostic registry.
- Digest
- The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Validated digest attached to a stored source descriptor.
- Dist
GeoMeta - Network level coordinate metadata.
- Element
Key - Element identity for one feature. Matching tries
uid, thenid, then case insensitivename; branches additionally fall back to the unordered(from, to)bus pair.indexis a positional row alias (1-based, the MATPOWER row convention) accepted on read and never written; the durable identity is the payloaduid(buses:3,branches:7). - Emit
Result - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Successful write output plus diagnostics emitted by the writer.
- Error
- The facade error covers source acquisition, routing, stored modules, and component failures converted at their boundary. Failure to produce an operation’s requested output.
- Format
Id - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Open stable identifier used to select a parser or writer.
- Format
Info - The canonical identity and destination shape of a PowerIO format.
- GenCost
- A generator cost curve (
mpc.gencostrow). - Generator
- GeoApply
Report - Result of applying a
GeoLayerto a network. - GeoFeature
- One point or route in a
GeoLayer. The key names its element, or a branch without a key states both endpoint bus references as its identity. - GeoLayer
- A standalone geographic document: element points and routes in one coordinate space, keyed by element identity rather than embedded in a case.
- GeoMeta
- Network level coordinate metadata.
- GeoParsed
- Output of a tolerant geo read: the layer plus the reader’s notes on records it could not use.
- History
Entry - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Structured description of an operation that produced the current value.
- History
Id - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
- Hvdc
- Impedance
- A series impedance with the MVA base it is expressed on. Used pairwise by
Transformer3W; a self-contained unit so the base travels with the value instead of being implied by position. - Index
Core - The owned, network-independent derivation behind
IndexedNetwork: the dense bus-id map plus the per-bus demand/shunt aggregates. Build it once withIndexCore::buildand reuse it across manyIndexedNetwork::with_coreviews of the sameBalancedNetwork. - Indexed
Network - A
BalancedNetworkpaired with its derivedIndexCore. The network is borrowed for the common case, but owned when it had to be star-lowered (a 3-winding transformer expanded into a star bus plus three branches viaBalancedNetwork::expand_transformers_3w); the core is owned (IndexedNetwork::new) or borrowed from a cachedIndexCore(IndexedNetwork::with_core). - Load
- Location
- A point attached to one model element.
- McAc
OpfInstance - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The multiconductor AC optimal power flow instance: the shared network, the typed per phase objective, and the active terminal voltage, conductor, and per phase generator constraint selections. - McAc
OpfSolution - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The multiconductor AC optimal power flow solution: the power flow results plus per phase generator dispatch and the objective value. - McAc
PfInstance - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The multiconductor AC power flow instance. - McAc
PfSolution - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. The multiconductor AC power flow solution: terminal complex voltages, optional terminal currents and powers, and source injections over the shared instance. - Memory
Artifact - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. One owned memory artifact.
- Multiconductor
Network - A multiconductor distribution network: an immutable cheap to clone owning handle over private shared tables.
- Operating
Point - A possibly partial assignment of instantaneous operating quantities over one network’s fixed equipment identities. One possibly partial alternate electrical assignment: a small owning handle over the shared network and the series’ shared columns. Cloning it or retaining it after the parent series drops copies no table and no column.
- Parse
Options - Optional configuration for
parse_with_options. Every field defaults to inference, soParseOptions::defaultis whatparseuses. - PioModule
- The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. One typed PowerIO compiler unit.
- PioScenario
Set - A dynamically typed scenario set at the universal parser boundary.
Typed Rust code uses
ScenarioSet<T>directly. - PioTime
Series - A dynamically typed time series at the universal parser boundary.
- Producer
- The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Program identity recorded with a module.
- PwdDisplay
- Decoded PowerWorld display file content.
- PwdSubstation
- One substation symbol from a display file: the identity row joined with
its drawing record, in identity table (display) order.
xandyare diagram coordinates as stored, y north positive (see the module docs). - Reactive
Power - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. An absolute reactive power replacement with an explicit unit. - Scenario
- The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. One named scenario and its optional probability.
- Scenario
Id - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Case-sensitive stable identity of one scenario.
- Scenario
Set - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Named alternatives with no implied time order.
- Selector
- Which buses a
subsetkeeps: inclusive ranges over area, zone, base kV, and bus number, ANDed together. An unset (None) filter matches every bus, soSelector::defaultselects the whole network. - Shunt
- Shunt
Block - One block of a switched shunt:
stepsequal admittance increments. - Socwr
OpfDuals - Optional dual quantities reported by a SOCWR AC OPF solve.
- Socwr
OpfSolution - A solution of the PowerModels SOCWR relaxation of AC optimal power flow.
- Socwr
OpfValues - The primal quantities reported by a SOCWR AC OPF solve.
- Solver
Params - Solver / solution-control metadata: the Newton tolerance and iteration cap, the zero-impedance threshold, and the per-quantity adjustment-enable flags.
- Source
- The common module records and containers. These explicit facade exports
keep ordinary callers out of the component crate paths.
Source::openon a file retains the primary bytes and permits constrained acquisition of referenced files beneath the file’s canonical containing directory;Source::with_acquisition_rootwidens that root at construction, and never from a parser.Source::from_memorygrants no filesystem access; referenced content reaches an in-memory source only throughSource::with_named_buffer. - Source
Buffer - The common module records and containers. These explicit facade exports
keep ordinary callers out of the component crate paths.
Immutable named bytes retained by a
Source. - Source
Descriptor - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Durable description of one source buffer.
- Source
Id - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
- Source
MapEntry - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Relation between one typed value target and its source bytes.
- Source
Span - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Half open byte range in one module source.
- Staged
Edit - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. An isolated candidate for one atomic module edit.
- Storage
- Switch
- A transmission switch. Closed switches are preserved as data; matrix builders do not lower them into zero impedance branches.
- Switched
Shunt Control - Switching-control data for a switched shunt (
Shunt::control): the mode, the regulated voltage band and bus, the reactive-range percentage, and the adjustable susceptance blocks. The shunt’sbis the initial value within the blocks’ total range. - Three
Winding Transformer Terminal Active Power - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. Active power at the three terminals of one three winding transformer, in the transformer’s declared winding order. Positive values enter the transformer. - Three
Winding Transformer Terminal Power - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. Active and reactive power at the three terminals of one three winding transformer, in the transformer’s declared winding order. Positive values enter the transformer. - Time
Point - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. One ordered position in a time series.
- Time
Series - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Ordered complete values of one Rust type.
- Transformer3W
- A three winding transformer with three terminal buses joined at a star point.
- Transformer
Control - Automatic-control data for a regulating transformer (
Branch::control). - Update
Change - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. One exact component field changed by an update batch. - Update
Report - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. Exact changes made by one atomic update batch. - Winding
- One winding of a
Transformer3W: its terminal bus, off-nominal ratio, phase shift, nominal voltage, and thermal ratings.
Enums§
- AcBus
Specification - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. One bus of an AC power flow problem, the standard partial specification. Powers are MW and MVAr, voltage magnitudes per unit, angles degrees, as the network states them. - Active
Power Unit - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. Unit carried by an active power replacement. - Apparent
Power Unit - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. Unit carried by an apparent power rating replacement. - Bmopf
Schema Version - The BMOPF schema version a document is read as or written against.
- Branch
Susceptance Formula - Rule for the DC branch susceptance
b. - BusType
- Bus type per MATPOWER convention: 1=PQ, 2=PV, 3=ref/slack, 4=isolated.
- Calculation
Update - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. One update to a calculation instance. - Coordinate
Space - Coordinate space for locations in a network.
- Coords
Kind - Coordinate origin.
- DcBus
Specification - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. One bus of a DC power flow problem: what the calculation is told, never what it solves. - Detection
- A classification result that can be known, absent, or unsafe to choose.
- Diagnostic
Severity - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Severity of one user facing finding.
- Diagnostic
Stage - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Pipeline stage encoded by the first segment of a diagnostic code.
- Digest
Algorithm - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
- Dist
Graph Edge Kind - Edge family in the collapsed graph.
- Emitted
Output - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Complete inventory of output owned by the caller.
- Fidelity
- The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. How an emitted artifact inventory relates to the module supplied to its writer.
- GeoGeometry
- Feature geometry: a point or a polyline route.
- GeoTarget
- The element family a feature places.
- History
Kind - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
- Json
Class - Top level classification of bare JSON text: a PowerIO IR document or a case document with its format detection. One header read answers every question instead of requiring a full document parse per question.
- Load
Allocation - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. How an aggregate active demand replacement is divided among the in service loads connected to one bus. - Load
Voltage Model - Voltage dependence for a transmission load.
- Network
Update - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. An update to a physical network parameter or limit. Every replacement is absolute. A conductor resolved line rating names one terminal; a balanced branch rating leavesterminalasNone. - Operating
Point Update - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. An update to an electrical assignment. Every replacement is absolute. A conductor resolved power update names one terminal; a balanced update leavesterminalasNone. - Output
Layout - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Physical shape of one completed emission.
- PioValue
- A value produced by PowerIO’s universal parser or decoded from PowerIO IR.
Application values remain ordinary
PioModule<T>values. - Reactive
Power Unit - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. Unit carried by a reactive power replacement. - Source
Format - Which format a
BalancedNetworkwas read from. Drives the same format byte exact echo on write. - Source
Relation - The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
- Switched
Shunt Mode - How a switched shunt adjusts its susceptance. Maps to the PSS/E
MODSWcode. - Termination
- The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. How the producing calculation ended. - Transformer
Control Mode - What a regulating transformer’s tap (or phase shift) automatically controls.
Maps to the PSS/E control code
CODand the PSLF transformertype. - Updated
Field - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. A field changed by an update batch.
Constants§
- DEFAULT_
BASE_ FREQUENCY - System base frequency in hertz when a format records none. Power networks run at 50 or 60 Hz; 60 is the default for the formats (MATPOWER, PowerModels, egret) that carry no frequency field.
- IR_
MIN_ VERSION - The oldest PowerIO IR generation this build reads.
- IR_
SCHEMA_ ID - The
$idof the JSON Schema for the documents this build writes, which is also the address the schema is served from. - IR_
SCHEMA_ NAME - The
schemadiscriminator of every PowerIO IR document. - IR_
VERSION - The PowerIO IR generation this build writes.
- JSON_
CLASSES - The closed set of classification families, in the one spelling every
surface uses: the Rust
JsonClass, the Cpio_classify_strlabel before its optional:<format>tail, the Pythonclassify_json_textstatus, and the Julia family symbol. - VERSION
- The facade version recorded on producers and stored modules.
Traits§
- Balanced
Calculation Instance - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. A balanced calculation instance whose network can receive typed updates.
Functions§
- apply_
bus_ load_ active_ power - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. Replace the aggregate active demand at one bus using an explicit allocation rule, then apply the resulting load updates atomically to the module. - apply_
substation_ points - Join a layer’s substation points onto buses through the
SubNum(orSubNumber) extras key: every bus in a matched substation takes the substation’s point, and the layer’s space becomes the network’sGeoMetawhen anything matched. Replaced locations and a coordinate space change are reported in the notes rather than happening silently. - apply_
updates - The balanced calculation types used by solver consumers. The full problem
vocabulary lives in
powerio_prob; these types sit at the facade root so a consumer does not need a second PowerIO dependency to name its boundary. Validate a complete batch, then apply it atomically totarget. - calc_
series_ admittance_ of - The series admittance
(g, b)of an impedance, guarded. - classify_
json_ bytes - Classify JSON bytes without performing lossy text replacement.
- classify_
json_ text - Classify a JSON document: a PowerIO IR module or a case document across the transmission and distribution domains.
- deserialize
- Deserialize one PowerIO IR input: a file name, content in memory, or a
powerio_core::Source. - emit
- Emit one module as
formatintooutput. The concrete value routes to its grid exchange format implementation. PowerIO IR usescrate::serializeinstead. - generate_
ir_ schema - Generate the JSON Schema for this build’s PowerIO IR document.
- parse
- Parse one source into a compiled module of whichever built in family
claims it. Balanced network formats produce
PioValue::BalancedNetwork; network only distribution formats (OpenDSS.dss, PMD ENGINEERING JSON, and BMOPF JSON) producePioValue::MulticonductorNetwork. A source that defines a particular calculation produces that calculation’s value. One DOE GO Challenge 3 problem data file producesPioValue::AcScucInstance. One source that contains a problem data file and its matching solution data file producesPioValue::AcScucSolution; a solution data file alone is rejected because its row identities and time axis come from the problem. DeepMind OPFData JSON, which explicitly represents a solved AC OPF, producesPioValue::AcOpfSolution. The parser’s findings are the module’s diagnostics, and the module keeps the original input, so writing the same format again returns the original file content. - parse_
with_ options - Parse one input under
options, which selects the parser explicitly or widens the directory a format may refer to further files beneath.parseis this operation with the default options. - repair_
values - Clamp every out-of-domain value of a parsed module to its repaired value
and record the pass: one
Repairhistory entry naming each change in its parameters, and oneVALIDATE.BALANCED.VALUE_DOMAINfinding per repaired field. The retained source is severed — the value no longer matches the bytes, so a same format write serializes the repaired network rather than echoing the input. A module already in domain comes back unchanged. - resolve_
format - Resolve a format token or common alias to facade owned metadata.
- serialize
- Serialize a dynamic module as PowerIO IR.
- serialize_
diagnostics - Serialize a diagnostics list as the JSON array of PowerIO IR diagnostic
records: the encoding a module’s
diagnosticsfield carries, with an identity minted for every record that has none. - to_
geo_ layer_ from_ aux_ text - Transform the
Substationtable in PowerWorld AUX text into a geographic layer without exposing the component parser’s borrowedAuxFiletype. - to_
geo_ layer_ from_ pwd - Lift decoded
.pwdsubstation symbols into a diagram spaceGeoLayerwith substation targets keyed by substation number. - to_
lonlat_ from_ pwd_ mercator - Approximate inverse of the projection PowerWorld’s auto generated layouts
use (verified against ACTIVSg200/2000 to within ~0.02 degrees): longitude
is
x / K, latitude the inverse Gudermannian ofy / K. Hand edited diagrams drift from this, so treat the result as approximate.
Type Aliases§
- Conductor
Matrix - A square matrix in conductor order, row major.
- Extras
- Source format fields the neutral model does not name, kept for round trips and cross format conversion. Keys are field names; values are JSON scalars.
- GenCaps
- A generator’s capability / ramp columns, one slot per
GEN_EXTRA_KEYSname. - Result