pub enum ContingencyModification {
Show 13 variants
BranchClose {
from_bus: u32,
to_bus: u32,
circuit: String,
},
BranchTap {
from_bus: u32,
to_bus: u32,
circuit: String,
tap: f64,
},
LoadSet {
bus: u32,
p_mw: f64,
q_mvar: f64,
},
LoadAdjust {
bus: u32,
delta_p_mw: f64,
delta_q_mvar: f64,
},
GenOutputSet {
bus: u32,
machine_id: String,
p_mw: f64,
},
GenLimitSet {
bus: u32,
machine_id: String,
pmax_mw: Option<f64>,
pmin_mw: Option<f64>,
},
ShuntAdjust {
bus: u32,
delta_b_pu: f64,
},
BusTypeChange {
bus: u32,
bus_type: u32,
},
AreaScheduleSet {
area: u32,
p_mw: f64,
},
DcLineBlock {
name: String,
},
VscDcLineBlock {
name: String,
},
SwitchedShuntRemove {
bus: u32,
},
DcGridConverterTrip {
converter_id: String,
},
}Expand description
A network modification applied simultaneously with this contingency.
Represents PSS/E .con SET/CHANGE/ALTER/MODIFY/INCREASE/DECREASE
commands within a CONTINGENCY block — network state changes that occur
at the same instant as the element outages.
Applied to the per-contingency network clone before the post-contingency power flow is solved. The base-case network is never mutated.
JSON/Python representation: internally tagged with "type" field, e.g.
{"type": "BranchTap", "from_bus": 1, "to_bus": 2, "circuit": 1, "tap": 1.05}
Variants§
BranchClose
Bring a branch back in-service (close a previously open branch).
PSS/E .con: SET STATUS CLOSE BRANCH FROM BUS <i> TO BUS <j> [CKT <c>]
BranchTap
Set transformer off-nominal tap ratio.
PSS/E .con: SET TAP OF BRANCH FROM BUS <i> TO BUS <j> [CKT <c>] TO <val>
LoadSet
Set bus active and reactive load to absolute values (MW, MVAr).
PSS/E .con: SET PLOAD AT BUS <n> TO <p> / CHANGE LOAD AT BUS <n> TO <p> <q>
Fails if the target bus does not exist.
LoadAdjust
Adjust bus load by a relative change (delta MW, delta MVAr).
PSS/E .con: INCREASE PLOAD AT BUS <n> BY <delta> / DECREASE QLOAD ...
Fails if the target bus does not exist.
GenOutputSet
Set generator real power output directly.
PSS/E .con: SET PGEN OF UNIT <id> AT BUS <n> TO <val>
GenLimitSet
Set generator real power limit (pmax and/or pmin).
PSS/E .con: SET PMAX OF UNIT <id> AT BUS <n> TO <val> / SET PMIN ...
ShuntAdjust
Adjust bus fixed shunt susceptance by a delta (p.u.).
The network stores fixed bus shunt susceptance in MVAr, so this delta
is converted using network.base_mva when applied.
PSS/E .con: CHANGE SHUNT AT BUS <n> BY <delta> / INCREASE SHUNT ...
BusTypeChange
Change bus type (1=PQ, 2=PV, 3=Slack).
PSS/E .con: CHANGE BUS TYPE BUS <n> TO TYPE <t>
AreaScheduleSet
Set area interchange scheduled export.
PSS/E .con: CHANGE AREA INTERCHANGE <n> TO <val>
DcLineBlock
Block (trip) a two-terminal LCC-HVDC line by name.
Sets LccHvdcLink.mode = LccHvdcControlMode::Blocked, causing zero P/Q injection
at both rectifier and inverter buses.
PSS/E .con: BLOCK TWOTERMDC '<name>'
VscDcLineBlock
Block (trip) a VSC-HVDC link by name.
Sets VscHvdcLink.mode = VscHvdcControlMode::Blocked, causing zero P/Q injection
at both converter buses.
PSS/E .con: BLOCK VSCDC '<name>'
SwitchedShuntRemove
Remove a switched shunt device from service at a given bus.
Removes the switched shunt’s contribution from the bus fixed shunt
susceptance (bus.shunt_susceptance_mvar). If switched_shunts_opf data is available
for the bus, the device’s current b_init_pu is subtracted (in MVAr
after conversion by network.base_mva) and its OPF range is zeroed.
If no switched shunt device is present at the bus, the modification
fails so the contingency definition stays honest.
PSS/E .con: REMOVE SWSHUNT [<id>] FROM BUS <n>
DcGridConverterTrip
Trip a single converter in an explicit DC grid.
Sets the matching canonical explicit-DC converter out of service. Fails if the converter does not exist.
Used to model loss of a DC-grid converter terminal during contingency analysis without requiring surge-network to depend on surge-hvdc.
Trait Implementations§
Source§impl Clone for ContingencyModification
impl Clone for ContingencyModification
Source§fn clone(&self) -> ContingencyModification
fn clone(&self) -> ContingencyModification
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more