Skip to main content

Module contingency

Module contingency 

Source
Expand description

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.

Re-exports§

pub use mon::BranchRef;
pub use mon::InterfaceMember;
pub use mon::MonitorScope;
pub use mon::MonitorStatement;
pub use mon::MonitoredParsed;
pub use mon::MonitoredResolution;
pub use mon::MonitoredSet;
pub use mon::ResolvedInterface;
pub use mon::ResolvedVoltageScope;
pub use mon::UnresolvedMonitor;
pub use mon::UnresolvedMonitorReason;
pub use sub::JoinName;
pub use sub::SelectorGroup;
pub use sub::Subsystem;
pub use sub::SubsystemParsed;
pub use sub::SubsystemSelector;
pub use sub::SubsystemSet;

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.
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.
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.
RetainedStatement
A file level statement outside the grammar, kept as text.
SkipRule
One branch an automatic expansion leaves alone.
UnresolvedAction
One action that bound to 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.
UnresolvedReason
Why an action bound to nothing.