Skip to main content

SourceFormat

Enum SourceFormat 

Source
#[non_exhaustive]
pub enum SourceFormat {
Show 15 variants Matpower, PowerModelsJson, EgretJson, Psse, PowerWorld, PandapowerJson, Pslf, PowerWorldBinary, InMemory, Normalized, Gridfm, PypsaCsv, Goc3Json, SurgeJson, DeepMindOpfDataJson,
}
Expand description

Which format a Network was read from. Drives the same format byte exact echo on write.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Matpower

§

PowerModelsJson

§

EgretJson

§

Psse

§

PowerWorld

§

PandapowerJson

§

Pslf

Read from a GE PSLF .epc case. Same source text is retained, so a same-format write echoes it byte-for-byte; a cross-format or source-dropped write goes through the .epc serializer (write_pslf).

§

PowerWorldBinary

Read from a PowerWorld .pwb binary case. Read only: there is no .pwb writer and no retained source text, so writing goes through another format’s writer.

§

InMemory

Built in memory, for example from synth or an edited case; no source text.

§

Normalized

A normalized derived form (Network::to_normalized): per unit, radians, filtered, source bus ids preserved. Distinct from InMemory so consumers can tell a per unit product from a raw in memory network; it has no source text and a different unit basis than a parsed network.

§

Gridfm

Read back from a gridfm-datakit Parquet dataset (the ML→classical bridge, powerio-matrix’s read_gridfm_dataset). A lossy, power flow complete reconstruction with no retained source text: original bus ids are synthesized 1..n, per element load/shunt granularity is folded to one synthetic element per bus, and HVDC/storage/piecewise costs are absent.

§

PypsaCsv

Read from a PyPSA CSV folder. This is a folder format rather than a single retained text document, so same-format writes are canonicalized.

§

Goc3Json

Read from an ARPA-E GO Challenge 3 JSON input document. The source is a unit commitment data set; the neutral transmission model keeps a static first interval network and retains the source text for the full data.

§

SurgeJson

Read from a Surge native JSON document.

§

DeepMindOpfDataJson

Read from one raw JSON document in a DeepMind OPFData release. The source carries both solver initial values and a solution. The balanced model represents the solved snapshot and retains the source for an exact write back to the same format.

Implementations§

Source§

impl SourceFormat

Source

pub fn name(self) -> &'static str

Stable lowercase token for provenance and reporting (package origin, CLI summaries, Python bindings). The match is exhaustive here so a new variant fails compilation at the one mapping instead of silently reporting “unknown” from a downstream wildcard copy.

Trait Implementations§

Source§

impl Clone for SourceFormat

Source§

fn clone(&self) -> SourceFormat

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 Copy for SourceFormat

Source§

impl Debug for SourceFormat

Source§

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

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

impl<'de> Deserialize<'de> for SourceFormat

Source§

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

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

impl Eq for SourceFormat

Source§

impl PartialEq for SourceFormat

Source§

fn eq(&self, other: &SourceFormat) -> 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 SourceFormat

Source§

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

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

impl StructuralPartialEq for SourceFormat

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V