pub enum Target {
Bus(usize),
BranchTerminal {
branch: usize,
terminal: Terminal,
},
SourceInjection {
branch: usize,
},
ShuntInjection {
bus: usize,
},
NodeInjection(usize),
BranchTerminalCurrent {
branch: usize,
terminal: Terminal,
frame: AngleFrame,
},
}Expand description
What a Measurement is attached to.
Variants§
Bus(usize)
A bus: a voltage measurement, or the injection of the loads and generators attached to it.
This is not power-grid-model’s “node injection” — see
Target::NodeInjection. gridoxide models sources and shunts as part
of the network rather than as appliances, so they do not appear in this
quantity at all.
BranchTerminal
One terminal of one branch, indexed as in
branch_flow::branch_params.
SourceInjection
The power a source delivers into its node.
power-grid-model treats a source as an appliance at the node, but
gridoxide synthesizes a virtual slack bus behind a source-impedance
branch, so the source’s power is that branch’s flow rather than any bus
injection. branch is the synthesized branch, from
gridoxide’s PgmNetwork::source_branch_idx.
ShuntInjection
The injection of the shunts attached to a bus.
Shunts are stamped into the Y-bus diagonal, so like sources they are
structural here and absent from Target::Bus. Shunts on one bus share
a single Y-bus entry and cannot be told apart afterwards, so this is
their total.
NodeInjection(usize)
power-grid-model’s node injection: the sum of every appliance at the bus — loads, generators, sources and shunts alike.
Equals Target::Bus plus the source and shunt injections at the same
bus, which is what makes it a distinct measurement function rather than
a relabelling.
BranchTerminalCurrent
A current sensor on a branch terminal.
Separate from Target::BranchTerminal rather than a flag on it,
because the frame changes the measurement function and because
se::iterative keys its row builder on Target — which makes
power-grid-model’s “no mixing power and current on one terminal” rule
fall out of the type rather than needing to be enforced downstream.
Trait Implementations§
impl Copy for Target
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Target
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