Skip to main content

Crate powerio

Crate powerio 

Source
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-tx rather 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-tx rather 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§

AcOpfInstance
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.
AcOpfSolution
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.
AcPfInstance
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 one AcBusSpecification per bus.
AcPfSolution
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.
AcScucInstance
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.
AcScucSolution
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.
ActivePower
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.
ApparentPower
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.
ArtifactPath
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.
BalancedNetwork
A balanced network with stable source bus IDs and separate element tables: an immutable cheap to clone owning handle over private shared tables.
BmopfEmitOptions
Options for BMOPF JSON output.
Branch
BranchCharging
Per terminal branch shunt admittance in p.u. This is the canonical physical branch shunt model when present.
BranchCurrentRatings
Current limits for a branch, in source units.
BranchRatingSet
Extra branch MVA rating set beyond the canonical A/B/C columns.
BranchSolution
Solved branch terminal flows in MW/MVAr.
Bus
BusId
A source bus ID, preserved from the input format.
Canvas
Diagram canvas metadata.
ComponentId
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.
DcOpfInstance
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.
DcOpfSolution
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.
DcPfInstance
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.
DcPfSolution
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.
DiagnosticCode
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.
DiagnosticId
The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
DiagnosticInfo
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.
DistGeoMeta
Network level coordinate metadata.
ElementKey
Element identity for one feature. Matching tries uid, then id, then case insensitive name; branches additionally fall back to the unordered (from, to) bus pair. index is a positional row alias (1-based, the MATPOWER row convention) accepted on read and never written; the durable identity is the payload uid (buses:3, branches:7).
EmitResult
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.
FormatId
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.
FormatInfo
The canonical identity and destination shape of a PowerIO format.
GenCost
A generator cost curve (mpc.gencost row).
Generator
GeoApplyReport
Result of applying a GeoLayer to 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.
HistoryEntry
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.
HistoryId
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.
IndexCore
The owned, network-independent derivation behind IndexedNetwork: the dense bus-id map plus the per-bus demand/shunt aggregates. Build it once with IndexCore::build and reuse it across many IndexedNetwork::with_core views of the same BalancedNetwork.
IndexedNetwork
A BalancedNetwork paired with its derived IndexCore. 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 via BalancedNetwork::expand_transformers_3w); the core is owned (IndexedNetwork::new) or borrowed from a cached IndexCore (IndexedNetwork::with_core).
Load
Location
A point attached to one model element.
McAcOpfInstance
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.
McAcOpfSolution
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.
McAcPfInstance
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.
McAcPfSolution
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.
MemoryArtifact
The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. One owned memory artifact.
MulticonductorNetwork
A multiconductor distribution network: an immutable cheap to clone owning handle over private shared tables.
OperatingPoint
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.
ParseOptions
Optional configuration for parse_with_options. Every field defaults to inference, so ParseOptions::default is what parse uses.
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.
PioScenarioSet
A dynamically typed scenario set at the universal parser boundary. Typed Rust code uses ScenarioSet<T> directly.
PioTimeSeries
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. x and y are diagram coordinates as stored, y north positive (see the module docs).
ReactivePower
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.
ScenarioId
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.
ScenarioSet
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 subset keeps: inclusive ranges over area, zone, base kV, and bus number, ANDed together. An unset (None) filter matches every bus, so Selector::default selects the whole network.
Shunt
ShuntBlock
One block of a switched shunt: steps equal admittance increments.
SocwrOpfDuals
Optional dual quantities reported by a SOCWR AC OPF solve.
SocwrOpfSolution
A solution of the PowerModels SOCWR relaxation of AC optimal power flow.
SocwrOpfValues
The primal quantities reported by a SOCWR AC OPF solve.
SolverParams
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::open on a file retains the primary bytes and permits constrained acquisition of referenced files beneath the file’s canonical containing directory; Source::with_acquisition_root widens that root at construction, and never from a parser. Source::from_memory grants no filesystem access; referenced content reaches an in-memory source only through Source::with_named_buffer.
SourceBuffer
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.
SourceDescriptor
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.
SourceId
The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
SourceMapEntry
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.
SourceSpan
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.
StagedEdit
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.
SwitchedShuntControl
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’s b is the initial value within the blocks’ total range.
ThreeWindingTransformerTerminalActivePower
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.
ThreeWindingTransformerTerminalPower
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.
TimePoint
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.
TimeSeries
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.
TransformerControl
Automatic-control data for a regulating transformer (Branch::control).
UpdateChange
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.
UpdateReport
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§

AcBusSpecification
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.
ActivePowerUnit
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.
ApparentPowerUnit
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.
BmopfSchemaVersion
The BMOPF schema version a document is read as or written against.
BranchSusceptanceFormula
Rule for the DC branch susceptance b.
BusType
Bus type per MATPOWER convention: 1=PQ, 2=PV, 3=ref/slack, 4=isolated.
CalculationUpdate
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.
CoordinateSpace
Coordinate space for locations in a network.
CoordsKind
Coordinate origin.
DcBusSpecification
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.
DiagnosticSeverity
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.
DiagnosticStage
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.
DigestAlgorithm
The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
DistGraphEdgeKind
Edge family in the collapsed graph.
EmittedOutput
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.
HistoryKind
The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
JsonClass
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.
LoadAllocation
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.
LoadVoltageModel
Voltage dependence for a transmission load.
NetworkUpdate
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 leaves terminal as None.
OperatingPointUpdate
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 leaves terminal as None.
OutputLayout
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.
ReactivePowerUnit
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.
SourceFormat
Which format a BalancedNetwork was read from. Drives the same format byte exact echo on write.
SourceRelation
The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths.
SwitchedShuntMode
How a switched shunt adjusts its susceptance. Maps to the PSS/E MODSW code.
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.
TransformerControlMode
What a regulating transformer’s tap (or phase shift) automatically controls. Maps to the PSS/E control code COD and the PSLF transformer type.
UpdatedField
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 $id of the JSON Schema for the documents this build writes, which is also the address the schema is served from.
IR_SCHEMA_NAME
The schema discriminator 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 C pio_classify_str label before its optional :<format> tail, the Python classify_json_text status, and the Julia family symbol.
VERSION
The facade version recorded on producers and stored modules.

Traits§

BalancedCalculationInstance
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 (or SubNumber) extras key: every bus in a matched substation takes the substation’s point, and the layer’s space becomes the network’s GeoMeta when 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 to target.
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 format into output. The concrete value routes to its grid exchange format implementation. PowerIO IR uses crate::serialize instead.
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) produce PioValue::MulticonductorNetwork. A source that defines a particular calculation produces that calculation’s value. One DOE GO Challenge 3 problem data file produces PioValue::AcScucInstance. One source that contains a problem data file and its matching solution data file produces PioValue::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, produces PioValue::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. parse is 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 Repair history entry naming each change in its parameters, and one VALIDATE.BALANCED.VALUE_DOMAIN finding 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 diagnostics field carries, with an identity minted for every record that has none.
to_geo_layer_from_aux_text
Transform the Substation table in PowerWorld AUX text into a geographic layer without exposing the component parser’s borrowed AuxFile type.
to_geo_layer_from_pwd
Lift decoded .pwd substation symbols into a diagram space GeoLayer with 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 of y / K. Hand edited diagrams drift from this, so treat the result as approximate.

Type Aliases§

ConductorMatrix
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_KEYS name.
Result