pub struct Branch {}Fields§
§from: BusId§to: BusId§r: f64Series resistance (p.u.).
x: f64Series reactance (p.u.).
b: f64Total line-charging susceptance (p.u.); half goes to each end.
rate_a: f64§rate_b: f64§rate_c: f64§tap: f64Tap ratio, MATPOWER convention: 0 means “no tap” (a line), treated as 1.
shift: f64Phase shift (degrees).
in_service: bool§angmin: f64§angmax: f64§extras: BTreeMap<String, Value>Implementations§
Source§impl Branch
impl Branch
Sourcepub fn effective_tap(&self) -> f64
pub fn effective_tap(&self) -> f64
Effective tap ratio (0 ⇒ 1).
Sourcepub fn is_transformer(&self) -> bool
pub fn is_transformer(&self) -> bool
A transformer iff the raw tap field is nonzero (an explicit 1 counts) or
there is a phase shift.
Sourcepub fn has_angle_limits(&self) -> bool
pub fn has_angle_limits(&self) -> bool
True when the branch constrains its angle difference, i.e. the limits deviate from the ±360° “unconstrained” default. Formats without angle limit fields (PSS/E, PowerWorld) use this to warn on what they drop.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Branch
impl<'de> Deserialize<'de> for Branch
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Branch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Branch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Branch
impl Serialize for Branch
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Branch
impl RefUnwindSafe for Branch
impl Send for Branch
impl Sync for Branch
impl Unpin for Branch
impl UnsafeUnpin for Branch
impl UnwindSafe for Branch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more