Skip to main content

Branch

Struct Branch 

Source
pub struct Branch {
Show 14 fields pub from: BusId, pub to: BusId, pub r: f64, pub x: f64, pub b: f64, pub rate_a: f64, pub rate_b: f64, pub rate_c: f64, pub tap: f64, pub shift: f64, pub in_service: bool, pub angmin: f64, pub angmax: f64, pub extras: BTreeMap<String, Value>,
}

Fields§

§from: BusId§to: BusId§r: f64

Series resistance (p.u.).

§x: f64

Series reactance (p.u.).

§b: f64

Total line-charging susceptance (p.u.); half goes to each end.

§rate_a: f64§rate_b: f64§rate_c: f64§tap: f64

Tap ratio, MATPOWER convention: 0 means “no tap” (a line), treated as 1.

§shift: f64

Phase shift (degrees).

§in_service: bool§angmin: f64§angmax: f64§extras: BTreeMap<String, Value>

Implementations§

Source§

impl Branch

Source

pub fn effective_tap(&self) -> f64

Effective tap ratio (0 ⇒ 1).

Source

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.

Source

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 Clone for Branch

Source§

fn clone(&self) -> Branch

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 Branch

Source§

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

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

impl<'de> Deserialize<'de> for Branch

Source§

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

Source§

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§

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, 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> Same for T

Source§

type Output = T

Should always be Self
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.
§

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

§

fn vzip(self) -> V

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

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