Skip to main content

Module contingency

Module contingency 

Source
Expand description

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. PSS/E contingency description files (.con).

A .con file names the outages a contingency analysis runs. It is free format text: optional header comments, then named cases, automatic specifications that expand against a subsystem, SKIP rules that exclude elements from that expansion, and solver-specific lines that only the tool that wrote them interprets.

CONTINGENCY 'L_000001ODES'
OPEN LINE FROM BUS   1001 TO BUS   1064 CIRCUIT 1
END
SINGLE BRANCH IN SUBSYSTEM 'WOA'
END

ContingencySet::parse reads UTF-8 text and touches no filesystem. Statements outside the grammar below keep their line, with surrounding whitespace dropped, and are reported, so a file reads completely rather than failing on the first line a tool wrote for itself. ContingencySet::to_con writes the set back in one canonical spelling. Only a case that never closes, a case that starts inside another, and a block left open at end of input are errors.

The grammar, its evidence, and the writer’s spellings are in FORMAT.md next to this file. Reading holds what the file states and touches no network. ContingencySet::resolve is the separate step that binds a set to the elements of a crate::network::BalancedNetwork; resolve.rs holds it.

The other two files a contingency analysis reads have their own modules beside this one: sub.rs for the subsystem description file (SubsystemSet) and mon.rs for the monitored element file (MonitoredSet). ContingencySet::expand turns this file’s automatic specifications into explicit cases against a network and a subsystem set; expand.rs holds it.

Modules§

mon
PSS/E monitored element files (.mon).
sub
PSS/E subsystem description files (.sub).

Structs§

AutomaticSpec
A specification that expands into one case per element of a subsystem.
BranchRef
One branch named by its terminal buses and circuit id.
Change
How much a load or generation statement moves, and in what unit.
ContingencyCase
One named case: every action applies together.
ContingencyParsed
Output of a tolerant contingency read: the set plus the reader’s notes on statements it kept as text.
ContingencyResolution
What a whole contingency set bound to.
ContingencySet
One contingency description file.
Expanded
Output of an expansion: the set with its automatic specifications turned into cases, plus the notes on the specifications that produced no case.
InterfaceMember
One branch of an interface, and how the statement stated it against the stored row.
MonitoredParsed
Output of a tolerant monitored element read.
MonitoredResolution
What a whole monitored element set bound to. Rows are positions in the tables of the network the set was resolved against.
MonitoredSet
One monitored element file.
PsseEquipmentIndex
The PSS/E id every element of a network would carry in a RAW file written from it, with the lookups a .con statement needs.
ResolvedCase
What one case bound to.
ResolvedComponent
One network element a case’s action bound to.
ResolvedInterface
One interface and the branches its flow sums over.
ResolvedVoltageScope
One voltage statement’s buses and limits. high is absent for a deviation statement that names one value.
RetainedStatement
A file level statement outside the grammar, kept as text.
SelectorGroup
One group of selectors whose bus sets intersect across selector types.
SkipRule
One branch an automatic expansion leaves alone.
Subsystem
One named subsystem: the union of its selector groups.
SubsystemParsed
Output of a tolerant subsystem read: the set plus the reader’s notes on statements it kept as text.
SubsystemSet
One subsystem description file.
UnresolvedAction
One action that bound to nothing, kept with the reason.
UnresolvedMonitor
One statement that named nothing, kept with the reason.

Enums§

AutomaticOrder
How many elements an automatic specification outages at a time.
AutomaticTarget
The element family an automatic specification expands over.
ChangeOp
Whether a change adds to, subtracts from, or replaces the present value.
ChangeUnit
The unit a change is stated in.
ContingencyAction
One statement inside a case.
JoinName
What a JOIN statement stated after the keyword.
MonitorScope
The buses a voltage statement applies to.
MonitorStatement
One monitor statement.
SubsystemSelector
One bus selector. A statement naming a single value reads as a range whose from and to are equal; both ends are inclusive.
UnresolvedMonitorReason
Why a monitor statement named nothing.
UnresolvedReason
Why an action bound to nothing.