pub struct SharedPsseEquipmentIndex { /* private fields */ }Expand description
A PsseEquipmentIndex that owns its network through an Arc, so it
can be built once and kept: in a struct beside the network, in a
OnceLock, or across threads.
SharedPsseEquipmentIndex::index hands out the borrowed index without
rebuilding anything, and every entry point that takes a
PsseEquipmentIndex (ContingencySet::resolve_with,
ContingencySet::expand_with,
MonitoredSet::resolve_with)
takes it, with the same result as an index built by
PsseEquipmentIndex::new on the same network.
Implementations§
Sourcepub fn new(net: impl Into<Arc<BalancedNetwork>>) -> Self
pub fn new(net: impl Into<Arc<BalancedNetwork>>) -> Self
Recompute every PSS/E id in net and index the rows by it, keeping the
network. Takes an Arc<BalancedNetwork> to share a network the caller
already holds, or a BalancedNetwork to own it.
Sourcepub fn network(&self) -> &Arc<BalancedNetwork> ⓘ
pub fn network(&self) -> &Arc<BalancedNetwork> ⓘ
The network the index was built from.
Sourcepub fn index(&self) -> PsseEquipmentIndex<'_>
pub fn index(&self) -> PsseEquipmentIndex<'_>
The index as a PsseEquipmentIndex, borrowing the network and the
tables held here. Nothing is recomputed or copied.
Trait Implementations§
Source§fn clone(&self) -> SharedPsseEquipmentIndex
fn clone(&self) -> SharedPsseEquipmentIndex
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more