Skip to main content

Hvdc

Struct Hvdc 

Source
#[non_exhaustive]
pub struct Hvdc {
Show 25 fields pub from: BusId, pub to: BusId, pub in_service: bool, pub pf: f64, pub pt: f64, pub qf: f64, pub qt: f64, pub vf: f64, pub vt: f64, pub pmin: f64, pub pmax: f64, pub qminf: f64, pub qmaxf: f64, pub qmint: f64, pub qmaxt: f64, pub loss0: f64, pub loss1: f64, pub resistance_ohm: Option<f64>, pub nominal_voltage_kv: Option<f64>, pub converters_mode: Option<HvdcConvertersMode>, pub converter1: Option<HvdcConverter>, pub converter2: Option<HvdcConverter>, pub cost: Option<GenCost>, pub uid: Option<String>, pub extras: Extras,
}

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: BusId§to: BusId§in_service: bool§pf: f64§pt: f64§qf: f64§qt: f64§vf: f64§vt: f64§pmin: f64§pmax: f64§qminf: f64§qmaxf: f64§qmint: f64§qmaxt: f64§loss0: f64§loss1: f64§resistance_ohm: Option<f64>

Physical line resistance and nominal DC voltage when the source states an explicit converter station model.

§nominal_voltage_kv: Option<f64>§converters_mode: Option<HvdcConvertersMode>§converter1: Option<HvdcConverter>§converter2: Option<HvdcConverter>§cost: Option<GenCost>§uid: Option<String>

Stable row identity; see Bus::uid.

§extras: Extras

Implementations§

Source§

impl Hvdc

Source

pub fn calc_bus_to_device_powers(&self) -> HvdcTerminalPowers

The line’s stated operating point as bus-to-device terminal powers, the convention the module states. The stored fields keep MATPOWER’s dcline signs in 0.11.x, so this is the one place they convert: p_from = pf, q_from = -qf, p_to = -pt, q_to = -qt. The in service flag is not consulted.

A line sending 100 MW from its from end and delivering 97 MW at its to end, with converters absorbing 30 and 25 MVAr, stores pf = 100, pt = 97, qf = -30, qt = -25 and has terminal powers (p_from, q_from) = (100, 30) and (p_to, q_to) = (-97, 25), a 3 MW loss.

Source

pub fn calc_terminal_injections(&self) -> [(BusId, f64, f64); 2]

The fixed injections this line’s stated operating point makes, [from end, to end] as (bus, p, q): at each end the negative of the bus-to-device terminal powers. In the stored MATPOWER signs the from converter withdraws pf and injects qf, and the to converter injects pt and qt. The in service flag is not consulted.

Source§

impl Hvdc

Source

pub fn has_lcc_converter_record(&self) -> bool

Whether the line carries a PSS/E two-terminal converter record that states a converter: a rectifier or inverter tail the reader retained because it differs from the default fields. A line from another format, or a record left at the defaults, has none, and calc_lcc_operating_point has nothing to model for it.

Source

pub fn calc_lcc_operating_point( &self, vm_rectifier: f64, vm_inverter: f64, ) -> Option<LccOperatingPoint>

The LCC operating point of a line read from a PSS/E two-terminal DC record, at AC voltage magnitudes vm_rectifier (the from bus) and vm_inverter (the to bus), per unit: the DC current, and each converter’s DC voltage, angle, overlap, and reactive demand. See the module for the equations.

None when the line carries no PSS/E converter record with an AC base (a line from another format, or a record left at the default converter fields), states no scheduled voltage, uses capacitor commutation, or schedules a point no firing or extinction angle reaches at these voltages, or one where a converter’s power factor is at or below zero (an angle of 90 degrees or more, or a DC voltage that is not positive). The in service flag is not consulted.

The DC current follows PSS/E’s schedule semantics, which differ from how the two-terminal reader prices pf and pt; the module states the difference.

Source§

impl Hvdc

Source

pub fn calc_delivered_power(pf: f64, loss0: f64, loss1: f64) -> f64

The power arriving at the to end for a sending end setpoint, under the MATPOWER dcline loss model Pt = Pf - loss0 - loss1·Pf.

pf, pt, and loss0 are one relation, not three independent fields, and a format that states only the sending end reconstructs the far end from it. Stated here so every reader spells the same rule: loss0 and pf scale together, so this holds in per unit as in MW.

Source

pub fn pt_matches_loss_model(&self, tol: f64) -> bool

Whether pt agrees with this line’s own loss model to tol. A writer whose format states no received power reports the lines that fail this, because those are the ones it cannot reproduce.

Source

pub fn new(from: BusId, to: BusId) -> Self

Trait Implementations§

Source§

impl Clone for Hvdc

Source§

fn clone(&self) -> Hvdc

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 Hvdc

Source§

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

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

impl<'de> Deserialize<'de> for Hvdc

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 JsonSchema for Hvdc

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for Hvdc

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for Hvdc

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 StructuralPartialEq for Hvdc

Auto Trait Implementations§

§

impl Freeze for Hvdc

§

impl RefUnwindSafe for Hvdc

§

impl Send for Hvdc

§

impl Sync for Hvdc

§

impl Unpin for Hvdc

§

impl UnsafeUnpin for Hvdc

§

impl UnwindSafe for Hvdc

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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