pub enum SwitchTreatment {
Merge,
Regularize,
Constrain,
}Expand description
What a retained switch becomes in the solver’s equations.
Variants§
Merge
Not represented at all. Only valid when nothing was retained — a
retained switch under Merge would be silently dropped, which is worse
than refusing.
Regularize
A stiff branch, at the same magnitude
topology::IDEAL_CONNECTION_Y
gives a merged zero-impedance connection.
Constrain
An exact equality: θ_i = θ_j, V_i = V_j, with the switch’s flow as an
unknown. No admittance, and no constant to choose.
Solved by constrained::solve_constrained
rather than by the ordinary Newton loop, since the system it builds is a
KKT system rather than a power-flow Jacobian. A network built under this
treatment therefore carries no switch branches at all — see
NodeBreakerNetwork::constrained_switches.
Trait Implementations§
Source§impl Clone for SwitchTreatment
impl Clone for SwitchTreatment
impl Copy for SwitchTreatment
Source§impl Debug for SwitchTreatment
impl Debug for SwitchTreatment
Source§impl Default for SwitchTreatment
impl Default for SwitchTreatment
impl Eq for SwitchTreatment
Source§impl PartialEq for SwitchTreatment
impl PartialEq for SwitchTreatment
impl StructuralPartialEq for SwitchTreatment
Auto Trait Implementations§
impl Freeze for SwitchTreatment
impl RefUnwindSafe for SwitchTreatment
impl Send for SwitchTreatment
impl Sync for SwitchTreatment
impl Unpin for SwitchTreatment
impl UnsafeUnpin for SwitchTreatment
impl UnwindSafe for SwitchTreatment
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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