Skip to main content

ContingencyModification

Enum ContingencyModification 

Source
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>]

Fields

§from_bus: u32
§to_bus: u32
§circuit: String
§

BranchTap

Set transformer off-nominal tap ratio.

PSS/E .con: SET TAP OF BRANCH FROM BUS <i> TO BUS <j> [CKT <c>] TO <val>

Fields

§from_bus: u32
§to_bus: u32
§circuit: String
§tap: f64
§

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.

Fields

§bus: u32
§p_mw: f64
§q_mvar: f64
§

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.

Fields

§bus: u32
§delta_p_mw: f64
§delta_q_mvar: f64
§

GenOutputSet

Set generator real power output directly.

PSS/E .con: SET PGEN OF UNIT <id> AT BUS <n> TO <val>

Fields

§bus: u32
§machine_id: String
§p_mw: f64
§

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 ...

Fields

§bus: u32
§machine_id: String
§pmax_mw: Option<f64>
§pmin_mw: Option<f64>
§

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 ...

Fields

§bus: u32
§delta_b_pu: f64
§

BusTypeChange

Change bus type (1=PQ, 2=PV, 3=Slack).

PSS/E .con: CHANGE BUS TYPE BUS <n> TO TYPE <t>

Fields

§bus: u32
§bus_type: u32
§

AreaScheduleSet

Set area interchange scheduled export.

PSS/E .con: CHANGE AREA INTERCHANGE <n> TO <val>

Fields

§area: u32
§p_mw: f64
§

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>'

Fields

§name: String
§

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>'

Fields

§name: String
§

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>

Fields

§bus: u32
§

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.

Fields

§converter_id: String

Trait Implementations§

Source§

impl Clone for ContingencyModification

Source§

fn clone(&self) -> ContingencyModification

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ContingencyModification

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ContingencyModification

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ContingencyModification

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,