#[non_exhaustive]pub enum DcConvention {
ReactanceOnly,
Matpower,
SeriesImpedance,
}Expand description
Rule for the DC branch susceptance b.
b is positive for an inductive branch, the DC model convention MATPOWER
makeBdc uses. It is the edge weight of the bus susceptance matrix and the
coefficient in f = b (theta_from - theta_to). The AC series susceptance
Im(1/(r + jx)) is its negation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ReactanceOnly
b = 1/x, ignoring resistance, transformer taps, and phase shifts.
The textbook DC linearization, which a paper reproducing a published result needs exactly as written.
Matpower
b = 1/(x tau) with phase shift injections, matching MATPOWER
makeBdc.
SeriesImpedance
b = x/(r² + x²) with phase shift injections.
Reads the whole series impedance, so it describes a branch with a real
r/x ratio. A transformer tap does not
scale it, and it reduces to 1/x when the resistance is zero.
PowerModels’ DC formulation uses the same quantity.
Implementations§
Source§impl DcConvention
impl DcConvention
Sourcepub fn branch_susceptance(
self,
resistance: f64,
reactance: f64,
effective_tap: f64,
) -> f64
pub fn branch_susceptance( self, resistance: f64, reactance: f64, effective_tap: f64, ) -> f64
The branch susceptance from resistance, reactance, and effective tap.
Only Self::Matpower reads the tap, and only
Self::SeriesImpedance reads the resistance.
Sourcepub fn includes_phase_shifts(self) -> bool
pub fn includes_phase_shifts(self) -> bool
Whether phase shifts contribute to the nodal injection vector.
Trait Implementations§
Source§impl Clone for DcConvention
impl Clone for DcConvention
Source§fn clone(&self) -> DcConvention
fn clone(&self) -> DcConvention
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 DcConvention
impl Debug for DcConvention
Source§impl Default for DcConvention
impl Default for DcConvention
Source§fn default() -> DcConvention
fn default() -> DcConvention
Source§impl<'de> Deserialize<'de> for DcConvention
impl<'de> Deserialize<'de> for DcConvention
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for DcConvention
impl PartialEq for DcConvention
Source§fn eq(&self, other: &DcConvention) -> bool
fn eq(&self, other: &DcConvention) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DcConvention
impl Serialize for DcConvention
impl Copy for DcConvention
impl Eq for DcConvention
impl StructuralPartialEq for DcConvention
Auto Trait Implementations§
impl Freeze for DcConvention
impl RefUnwindSafe for DcConvention
impl Send for DcConvention
impl Sync for DcConvention
impl Unpin for DcConvention
impl UnsafeUnpin for DcConvention
impl UnwindSafe for DcConvention
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.