pub struct AreaDefinition {
pub of_bus: Vec<Option<usize>>,
pub targets: Vec<f64>,
pub factors: Vec<f64>,
pub tolerance: f64,
pub max_outer_iter: usize,
}Expand description
Which buses belong to which control area, what each area is scheduled to export, and who adjusts to get there.
Fields§
§of_bus: Vec<Option<usize>>Area index per bus, indexed by Bus::idx. None means the bus is in
no area — its injections are nobody’s to schedule, and any branch it
shares with an area counts as that area’s boundary.
targets: Vec<f64>Scheduled net export per area, per-unit. Positive is exporting, the sign convention ENTSO-E net positions use.
factors: Vec<f64>Participation weight per bus. Normalized within each area, so only relative magnitudes matter and raw megawatt headroom can be passed.
tolerance: f64Convergence tolerance on an area’s remaining mismatch, per-unit.
max_outer_iter: usizeCap on outer passes.
Implementations§
Source§impl AreaDefinition
impl AreaDefinition
Sourcepub fn uniform(
buses: &[Bus],
of_bus: Vec<Option<usize>>,
n_areas: usize,
) -> Self
pub fn uniform( buses: &[Bus], of_bus: Vec<Option<usize>>, n_areas: usize, ) -> Self
Every generator bus — Slack and PV — participates equally within its
own area, with every area scheduled for zero net export.
A zero target is rarely what a real schedule says, but it is the meaningful default: it asks each area to serve its own load, which is the reading of “no interchange agreed”.
Sourcepub fn by_generation(
buses: &[Bus],
of_bus: Vec<Option<usize>>,
n_areas: usize,
) -> Self
pub fn by_generation( buses: &[Bus], of_bus: Vec<Option<usize>>, n_areas: usize, ) -> Self
Weighted by each bus’s own scheduled generation, whatever its bus type.
§Why this differs from uniform, and from distributed slack
SlackDistribution::uniform
participates Slack and PV buses only, on the grounds that a positive
injection at a PQ bus is a fixed schedule rather than a machine under
governor control. That reasoning is about frequency response, and it
is right: a machine not on governor control does not pick up imbalance.
A net position is not frequency response. It is met by redispatch —
a scheduling action over the hour — and a generator held at a fixed
active set-point is precisely the machine an operator redispatches.
Excluding it makes whole areas uncontrollable: in
two_area_case.xiidm, both of AREA2’s generators are
voltageRegulatorOn="false" and so arrive as PQ buses, leaving that
area with no participant at all under uniform and its −400 MW
schedule unreachable.
So this weights by p_spec.max(0.0) at every bus. An area whose
generation is all at fixed set-points is dispatchable; a load bus, with
no positive injection, still is not.
Trait Implementations§
Source§impl Clone for AreaDefinition
impl Clone for AreaDefinition
Auto Trait Implementations§
impl Freeze for AreaDefinition
impl RefUnwindSafe for AreaDefinition
impl Send for AreaDefinition
impl Sync for AreaDefinition
impl Unpin for AreaDefinition
impl UnsafeUnpin for AreaDefinition
impl UnwindSafe for AreaDefinition
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