Bus

Struct Bus 

Source
pub struct Bus {
Show 17 fields pub bus_i: usize, pub bus_type: usize, pub pd: f64, pub qd: f64, pub gs: f64, pub bs: f64, pub bus_area: usize, pub vm: f64, pub va: f64, pub base_kv: f64, pub zone: usize, pub vmax: f64, pub vmin: f64, pub lam_p: Option<f64>, pub lam_q: Option<f64>, pub mu_vmax: Option<f64>, pub mu_vmin: Option<f64>,
}

Fields§

§bus_i: usize

Bus number.

§bus_type: usize

Bus type.

§pd: f64

Real power demand (MW).

§qd: f64

Reactive power demand (MVAr).

§gs: f64

Shunt conductance (MW at V = 1.0 p.u.).

§bs: f64

Shunt susceptance (MVAr at V = 1.0 p.u.).

§bus_area: usize

Area number, 1-100.

§vm: f64

Voltage magnitude (p.u.).

§va: f64

Voltage angle (degrees).

§base_kv: f64

Base voltage (kV).

§zone: usize

Loss zone.

§vmax: f64

Maximum voltage magnitude (p.u.).

§vmin: f64

Minimum voltage magnitude (p.u.).

§lam_p: Option<f64>

Lagrange multiplier on real power mismatch (u/MW).

§lam_q: Option<f64>

Lagrange multiplier on reactive power mismatch (u/MVAr).

§mu_vmax: Option<f64>

Kuhn-Tucker multiplier on upper voltage limit (u/p.u.).

§mu_vmin: Option<f64>

Kuhn-Tucker multiplier on lower voltage limit (u/p.u.).

Implementations§

Source§

impl Bus

Source

pub fn new(bus_i: usize) -> BusBuilder

Build a new Bus.

Source§

impl Bus

Source

pub fn is_pq(&self) -> bool

Fixed active and reactive power.

Source

pub fn is_pv(&self) -> bool

Fixed voltage magnitude and active power.

Source

pub fn is_ref(&self) -> bool

Voltage angle reference. Slack active and reactive power.

Source

pub fn is_isolated(&self) -> bool

Isolated bus.

Source

pub fn is_opf(&self) -> bool

Is OPF result.

Trait Implementations§

Source§

impl Clone for Bus

Source§

fn clone(&self) -> Bus

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 Bus

Source§

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

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

impl<'de> Deserialize<'de> for Bus

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Bus

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Bus

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Validate for Bus

Source§

impl<'v_a> ValidateArgs<'v_a> for Bus

Source§

impl StructuralPartialEq for Bus

Auto Trait Implementations§

§

impl Freeze for Bus

§

impl RefUnwindSafe for Bus

§

impl Send for Bus

§

impl Sync for Bus

§

impl Unpin for Bus

§

impl UnwindSafe for Bus

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> 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.
Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,