Skip to main content

Module network

Module network 

Source
Expand description

Format neutral balanced network model.

Readers map source formats into a BalancedNetwork, and writers map a network to target formats. Loads and shunts have separate tables, so formats can retain several elements at one bus. MATPOWER demand and shunt fields become those records during parsing. IndexedNetwork provides the dense analysis view used by matrix builders.

A network can retain its source bytes and SourceFormat for same format writing. Each element also has an Extras map for source fields not named by the typed model.

Formats represent different data. Cross format writers report unsupported fields rather than claiming an exact conversion.

Structs§

Area
An area record: the area’s scheduled net interchange and its swing bus.
BalancedNetwork
A balanced network with stable source bus IDs and separate element tables.
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.
Diagnostic
A value-domain finding from BalancedNetwork::validate_values: an element field whose value falls outside its physical range, paired with the value repair would set in its place.
GenCost
A generator cost curve (mpc.gencost row).
Generator
Hvdc
A two-terminal HVDC line (MATPOWER dcline).
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.
Load
Shunt
ShuntBlock
One block of a switched shunt: steps equal increments of susceptance b.
SolverParams
Solver / solution-control metadata: the Newton tolerance and iteration cap, the zero-impedance threshold, and the per-quantity adjustment-enable flags.
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.
Transformer3W
A three winding transformer with three terminal buses joined at a star point.
TransformerControl
Automatic-control data for a regulating transformer (Branch::control).
Winding
One winding of a Transformer3W: its terminal bus, off-nominal ratio, phase shift, nominal voltage, and thermal ratings.

Enums§

BusType
Bus type per MATPOWER convention: 1=PQ, 2=PV, 3=ref/slack, 4=isolated.
LoadVoltageModel
Voltage dependence for a transmission load.
SourceFormat
Which format a BalancedNetwork was read from. Drives the same format byte exact echo on write.
SwitchedShuntMode
How a switched shunt adjusts its susceptance. Maps to the PSS/E MODSW code.
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.

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.

Functions§

series_admittance_of
The series admittance (g, b) of an impedance, guarded.

Type Aliases§

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.