Skip to main content

MulticonductorNetwork

Struct MulticonductorNetwork 

Source
pub struct MulticonductorNetwork { /* private fields */ }
Expand description

A multiconductor distribution network: an immutable cheap to clone owning handle over private shared tables.

Cloning the handle bumps one reference count and clones no table allocation. Reads go through the per field accessors; the *_mut accessors copy the shared tables once on first write to a shared handle (copy on write), so no other handle ever observes a mutation. Per element ("class.name" key), the tables also record which fields the reader materialized from a format default rather than the source text. The original source text for the byte exact echo tier is not carried here; it lives on the PioModule a parse returns, alongside this network.

Implementations§

Source§

impl MulticonductorNetwork

Source

pub fn validate_component_locations(&self) -> Result<(), Error>

Check point ranges, exact attachment identities and duplicate attachments. This validates metadata only; it never changes electrical topology.

Source§

impl MulticonductorNetwork

Source

pub fn to_graph(&self) -> DistGraph

Transform this network into a render ready bus and terminal graph.

Source§

impl MulticonductorNetwork

Source

pub fn name(&self) -> &Option<String>

Source

pub fn name_mut(&mut self) -> &mut Option<String>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn geo(&self) -> &Option<DistGeoMeta>

Source

pub fn geo_mut(&mut self) -> &mut Option<DistGeoMeta>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn component_locations(&self) -> &Vec<DistComponentLocation>

Source

pub fn component_locations_mut(&mut self) -> &mut Vec<DistComponentLocation>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn buses(&self) -> &Vec<DistBus>

Source

pub fn buses_mut(&mut self) -> &mut Vec<DistBus>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn line_codes(&self) -> &Vec<DistLineCode>

Source

pub fn line_codes_mut(&mut self) -> &mut Vec<DistLineCode>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn lines(&self) -> &Vec<DistLine>

Source

pub fn lines_mut(&mut self) -> &mut Vec<DistLine>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn switches(&self) -> &Vec<DistSwitch>

Source

pub fn switches_mut(&mut self) -> &mut Vec<DistSwitch>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn transformers(&self) -> &Vec<DistTransformer>

Source

pub fn transformers_mut(&mut self) -> &mut Vec<DistTransformer>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn loads(&self) -> &Vec<DistLoad>

Source

pub fn loads_mut(&mut self) -> &mut Vec<DistLoad>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn generators(&self) -> &Vec<DistGenerator>

Source

pub fn generators_mut(&mut self) -> &mut Vec<DistGenerator>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn ibrs(&self) -> &Vec<DistIbr>

Source

pub fn ibrs_mut(&mut self) -> &mut Vec<DistIbr>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn control_profiles(&self) -> &Vec<DistControlProfile>

Source

pub fn control_profiles_mut(&mut self) -> &mut Vec<DistControlProfile>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn shunts(&self) -> &Vec<DistShunt>

Source

pub fn shunts_mut(&mut self) -> &mut Vec<DistShunt>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn capacitors(&self) -> &Vec<DistCapacitor>

Source

pub fn capacitors_mut(&mut self) -> &mut Vec<DistCapacitor>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn sources(&self) -> &Vec<VoltageSource>

Source

pub fn sources_mut(&mut self) -> &mut Vec<VoltageSource>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn untyped_objects(&self) -> &Vec<UntypedObject>

Source

pub fn untyped_objects_mut(&mut self) -> &mut Vec<UntypedObject>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn commands(&self) -> &Vec<(String, String)>

Source

pub fn commands_mut(&mut self) -> &mut Vec<(String, String)>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn options(&self) -> &Vec<(String, String)>

Source

pub fn options_mut(&mut self) -> &mut Vec<(String, String)>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn defaulted(&self) -> &BTreeMap<String, Vec<&'static str>>

Source

pub fn defaulted_mut(&mut self) -> &mut BTreeMap<String, Vec<&'static str>>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn source_format(&self) -> &Option<DistSourceFormat>

Source

pub fn source_format_mut(&mut self) -> &mut Option<DistSourceFormat>

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source

pub fn extras(&self) -> &Extras

Source

pub fn extras_mut(&mut self) -> &mut Extras

Mutable access to the same table; a shared handle copies its tables once here, so no other handle observes the change.

Source§

impl MulticonductorNetwork

Source

pub fn terminal_conventions(&self) -> Option<&Value>

The network’s terminal conventions, which calc_terminal_role reads: the BMOPF terminal_conventions its source stated (the bmopf_terminal_conventions extra), else, for a network read from distribution CIM or MG-RAVENS, the CIM wire convention those readers state (4, n or N is the neutral on every bus, so a single phase bus [1, 4] has a neutral); None otherwise.

Source

pub fn base_frequency(&self) -> f64

Hz.

Source

pub fn base_frequency_mut(&mut self) -> &mut f64

Source

pub fn identifier_key(&self, name: &str) -> String

The key under which this network’s source identifies an element by name: ASCII lowercase for an OpenDSS source, whose names are case insensitive, the name itself otherwise. Readiness and every name lookup over the tables (a line’s linecode, say) compare these keys.

Source§

impl MulticonductorNetwork

Source

pub fn new() -> Self

Source

pub fn named(name: impl Into<String>) -> Self

Source

pub fn bus(&self, id: &str) -> Option<&DistBus>

Case insensitive, matching the source formats’ name semantics.

Source

pub fn linecode(&self, name: &str) -> Option<&DistLineCode>

Case insensitive, matching the source formats’ name semantics.

Trait Implementations§

Source§

impl Clone for MulticonductorNetwork

Source§

fn clone(&self) -> Self

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 MulticonductorNetwork

Source§

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

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

impl Default for MulticonductorNetwork

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MulticonductorNetwork

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

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

impl JsonSchema for MulticonductorNetwork

Available on crate feature schema only.
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
§

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 Serialize for MulticonductorNetwork

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

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

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.