Skip to main content

DcNetworkData

Struct DcNetworkData 

Source
#[non_exhaustive]
pub struct DcNetworkData { pub from_indices: Vec<usize>, pub to_indices: Vec<usize>, pub susceptance: Vec<f64>, pub shift: Vec<f64>, pub shift_injection: Vec<f64>, pub row_ids: Vec<String>, pub bus_ids: Vec<String>, pub omitted: Vec<(String, String)>, pub formula: &'static str, }
Expand description

The DC branch data of one balanced network under one susceptance formula, with the stable element mappings that interpret every row: the one assembly Rust, C, Python, and Julia all read, so names, element order, and omission reasons agree across languages by construction.

Rows follow A[e, from] = +1, A[e, to] = -1 (PowerModels orientation); susceptance carries the PowerModels sign for the selected formula; the phase shift injection is p_shift = A' * (b .* shift) per bus (with the negative b, the same fixed term MATPOWER’s makeBdc builds), and the complete affine branch flow is p_branch = -b .* (va_from - va_to) + b .* shift, so A' * p_branch equals the angle terms plus shift_injection. Rows and columns describe the analysis network after three winding transformer expansion.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§from_indices: Vec<usize>

From bus column per included row.

§to_indices: Vec<usize>

To bus column per included row.

§susceptance: Vec<f64>

Branch susceptance per included row.

§shift: Vec<f64>

Phase shift angle per included row, radians; 0 for an unshifted branch or a formula that excludes shifts.

§shift_injection: Vec<f64>

Phase shift bus injection, one entry per bus.

§row_ids: Vec<String>

Stable module element ID per included row.

§bus_ids: Vec<String>

Stable bus element ID per incidence column.

§omitted: Vec<(String, String)>

Branches the selected formula cannot represent: stable element ID and the diagnostic reason. Zero impedance branches land here by default; nothing removes them silently.

§formula: &'static str

The selected formula’s stable cross language name.

Trait Implementations§

Source§

impl Clone for DcNetworkData

Source§

fn clone(&self) -> DcNetworkData

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for DcNetworkData

Source§

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

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

impl PartialEq for DcNetworkData

Source§

fn eq(&self, other: &DcNetworkData) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DcNetworkData

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> 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 = !

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.