pub struct DcPowerFlowSolver {
pub tolerance: f64,
}Expand description
DC Power Flow Solver
Uses B-matrix method for fast linear power flow solution.
Fields§
§tolerance: f64Tolerance for convergence check
Implementations§
Source§impl DcPowerFlowSolver
impl DcPowerFlowSolver
Sourcepub fn new() -> DcPowerFlowSolver
pub fn new() -> DcPowerFlowSolver
Create a new DC power flow solver
Sourcepub fn with_tolerance(tolerance: f64) -> DcPowerFlowSolver
pub fn with_tolerance(tolerance: f64) -> DcPowerFlowSolver
Create with custom tolerance
Sourcepub fn build_b_matrix(
&self,
_topology: &Topology,
state: &StateStore,
) -> Matrix<f64, Dyn, Dyn, VecStorage<f64, Dyn, Dyn>>
pub fn build_b_matrix( &self, _topology: &Topology, state: &StateStore, ) -> Matrix<f64, Dyn, Dyn, VecStorage<f64, Dyn, Dyn>>
Build the B matrix from topology
B[i][j] = -1/X[i][j] for connected buses B[i][i] = sum of 1/X for all branches connected to bus i
Trait Implementations§
Source§impl Clone for DcPowerFlowSolver
impl Clone for DcPowerFlowSolver
Source§fn clone(&self) -> DcPowerFlowSolver
fn clone(&self) -> DcPowerFlowSolver
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DcPowerFlowSolver
impl Debug for DcPowerFlowSolver
Source§impl Default for DcPowerFlowSolver
impl Default for DcPowerFlowSolver
Source§fn default() -> DcPowerFlowSolver
fn default() -> DcPowerFlowSolver
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DcPowerFlowSolver
impl RefUnwindSafe for DcPowerFlowSolver
impl Send for DcPowerFlowSolver
impl Sync for DcPowerFlowSolver
impl Unpin for DcPowerFlowSolver
impl UnwindSafe for DcPowerFlowSolver
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.