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'
ENDContingencySet::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§
Structs§
- Automatic
Spec - 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.
- Contingency
Case - One named case: every action applies together.
- Contingency
Parsed - Output of a tolerant contingency read: the set plus the reader’s notes on statements it kept as text.
- Contingency
Resolution - What a whole contingency set bound to.
- Contingency
Set - 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.
- Psse
Equipment Index - The PSS/E id every element of a network would carry in a RAW file written
from it, with the lookups a
.constatement needs. - Resolved
Case - What one case bound to.
- Resolved
Component - One network element a case’s action bound to.
- Retained
Statement - A file level statement outside the grammar, kept as text.
- Skip
Rule - One branch an automatic expansion leaves alone.
- Unresolved
Action - One action that bound to nothing, kept with the reason.
Enums§
- Automatic
Order - How many elements an automatic specification outages at a time.
- Automatic
Target - The element family an automatic specification expands over.
- Change
Op - Whether a change adds to, subtracts from, or replaces the present value.
- Change
Unit - The unit a change is stated in.
- Contingency
Action - One statement inside a case.
- Unresolved
Reason - Why an action bound to nothing.