pub struct DistributedSlack { /* private fields */ }Expand description
Moves the slack’s deviation from its own schedule onto the participating generators, by normalized weight, until the deviation is inside tolerance.
Reports Invalidates::Nothing: only p_spec changes between passes, so
bus types, n_unknowns and the Jacobian’s sparsity pattern all hold and the
solver keeps its symbolic factorization across the whole loop. That is the
opposite of ReactiveLimits, which switches
PV → PQ and must reset each time it does.
§What it mutates
buses[i].p_spec ends up holding the dispatched value rather than the
schedule it went in with, for every participating bus. That is the answer —
who ended up producing what — and SlackDistributionReport::shift records
how far each moved, so the original is recoverable.
Implementations§
Source§impl DistributedSlack
impl DistributedSlack
pub fn new(distribution: SlackDistribution) -> Self
Sourcepub fn report(&self) -> &SlackDistributionReport
pub fn report(&self) -> &SlackDistributionReport
What it did, readable after the solve.
Sourcepub fn into_report(self) -> SlackDistributionReport
pub fn into_report(self) -> SlackDistributionReport
Consumes the loop for its report, for callers that do not need it back.
Trait Implementations§
Source§impl Clone for DistributedSlack
impl Clone for DistributedSlack
Source§impl Debug for DistributedSlack
impl Debug for DistributedSlack
Source§impl OuterLoop for DistributedSlack
impl OuterLoop for DistributedSlack
fn name(&self) -> &'static str
Source§fn invalidates(&self) -> Invalidates
fn invalidates(&self) -> Invalidates
OuterLoopStatus::Unstable. Read by the driver, which then resets
or restamps as required. See the module docs.Source§fn initialize(&mut self, ctx: &mut OuterLoopContext<'_, '_>)
fn initialize(&mut self, ctx: &mut OuterLoopContext<'_, '_>)
Source§fn check(&mut self, ctx: &mut OuterLoopContext<'_, '_>) -> OuterLoopStatus
fn check(&mut self, ctx: &mut OuterLoopContext<'_, '_>) -> OuterLoopStatus
Auto Trait Implementations§
impl Freeze for DistributedSlack
impl RefUnwindSafe for DistributedSlack
impl Send for DistributedSlack
impl Sync for DistributedSlack
impl Unpin for DistributedSlack
impl UnsafeUnpin for DistributedSlack
impl UnwindSafe for DistributedSlack
Blanket Implementations§
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