pub enum PowerFlowInit {
Flat,
LinearImpedance,
Dc,
}Expand description
Where PowerFlowMethod::NewtonRaphson starts from. Ignored by the
direct methods, which have no starting point.
Variants§
Flat
|V| = 1, θ = 0, untouched.
LinearImpedance
One constant-admittance solve, via network::linear_initial_guess.
The default because it is what this crate has always done — see
crate::run_power_flow_analysis_from_ybus, which calls it
unconditionally — and because it is power-grid-model’s only
robustness mechanism, needed where weak sources meet large transformer
phase shifts and flat-start Newton diverges.
Dc
One DC solve, seeding angles and only angles — bus types,
injections and magnitudes are all restored afterwards, since
linear::btheta::dc_power_flow is a solver rather than an
initializer and would otherwise pre-empt Newton’s own classification
pass. DC has no magnitude information to offer in any case, beyond the
flat |V| = 1 it assumes. This is powsybl’s
DcValueVoltageInitializer.
Opt-in rather than default only because LinearImpedance is the
long-standing behavior, not because it is weaker. Measured on the
committed PGM fixtures
(tests/power_flow_methods_test.rs::both_warm_starts_rescue_a_case_flat_start_cannot_solve):
on distribution-case, where a flat start does not converge inside
20 iterations, DC init converges in 5 against LinearImpedance’s 4.
Both rescue the case; neither dominates.
The one thing DC init cannot do is supply voltage magnitudes — it has
none to give beyond the flat 1 p.u. it assumes — so on networks whose
magnitudes stray far from nominal, LinearImpedance starts with
strictly more information.
Trait Implementations§
Source§impl Clone for PowerFlowInit
impl Clone for PowerFlowInit
impl Copy for PowerFlowInit
Source§impl Debug for PowerFlowInit
impl Debug for PowerFlowInit
Source§impl Default for PowerFlowInit
impl Default for PowerFlowInit
impl Eq for PowerFlowInit
Source§impl PartialEq for PowerFlowInit
impl PartialEq for PowerFlowInit
impl StructuralPartialEq for PowerFlowInit
Auto Trait Implementations§
impl Freeze for PowerFlowInit
impl RefUnwindSafe for PowerFlowInit
impl Send for PowerFlowInit
impl Sync for PowerFlowInit
impl Unpin for PowerFlowInit
impl UnsafeUnpin for PowerFlowInit
impl UnwindSafe for PowerFlowInit
Blanket Implementations§
impl<T> Boilerplate for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more