#[non_exhaustive]pub enum ContingencyAction {
OpenBranch {
from: BusId,
to: BusId,
circuit: String,
},
OpenThreeWinding {
buses: [BusId; 3],
circuit: String,
},
RemoveMachine {
bus: BusId,
id: String,
},
AddMachine {
bus: BusId,
id: String,
},
RemoveShunt {
bus: BusId,
id: Option<String>,
},
RemoveSwitchedShunt {
bus: BusId,
},
RemoveLoad {
bus: BusId,
id: Option<String>,
},
DisconnectBus {
bus: BusId,
},
ChangeLoad {
bus: BusId,
change: Change,
},
ChangeGeneration {
bus: BusId,
change: Change,
},
Unrecognized {
text: String,
},
}Expand description
One statement inside a case.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OpenBranch
A line or two winding transformer, keyed by its terminal buses and circuit id.
OpenThreeWinding
A three winding transformer, keyed by its three buses and circuit id.
RemoveMachine
A machine leaves service; its dispatch leaves the balance.
AddMachine
A machine enters service.
RemoveShunt
A fixed shunt leaves service; without an id, every fixed shunt at the bus.
RemoveSwitchedShunt
The switched shunt at the bus leaves service.
RemoveLoad
A load leaves service; without an id, every load at the bus.
DisconnectBus
Every element at the bus leaves service.
ChangeLoad
The bus load moves by the stated amount.
ChangeGeneration
The bus generation moves by the stated amount.
Unrecognized
A statement outside the grammar, kept as its trimmed line. A nested dispatch block keeps all of its trimmed lines, joined with newlines.
Implementations§
Source§impl ContingencyAction
impl ContingencyAction
Sourcepub fn to_con_statement(&self) -> String
pub fn to_con_statement(&self) -> String
The one line statement ContingencySet::to_con writes for this
action, without its line ending. A statement kept as text reads back
as the line the source wrote.
Trait Implementations§
Source§impl Clone for ContingencyAction
impl Clone for ContingencyAction
Source§fn clone(&self) -> ContingencyAction
fn clone(&self) -> ContingencyAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContingencyAction
impl Debug for ContingencyAction
Source§impl<'de> Deserialize<'de> for ContingencyAction
impl<'de> Deserialize<'de> for ContingencyAction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContingencyAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContingencyAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ContingencyAction
impl JsonSchema for ContingencyAction
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ContingencyAction
impl PartialEq for ContingencyAction
Source§fn eq(&self, other: &ContingencyAction) -> bool
fn eq(&self, other: &ContingencyAction) -> bool
self and other values to be equal, and is used by ==.