pub struct QuarterHourAllocation {
pub slot: Viertelstunde,
pub richtung: Richtung,
pub ngz_kwh: Decimal,
pub zuordnungen: Vec<Zuordnung>,
pub delta_kwh: Decimal,
pub ueberdeckung: Option<Ueberdeckung>,
pub proof: ConservationProof,
}Expand description
One quarter hour of one Übergabestelle, allocated.
Fields§
§slot: ViertelstundeThe quarter hour.
richtung: RichtungWhich direction this row settles.
ngz_kwh: DecimalThe Netzgangzeitreihe value the VNB measured.
zuordnungen: Vec<Zuordnung>Every virtual Marktlokation’s share, in input order.
delta_kwh: DecimalThe Deltamenge — what no Marktlokation claimed.
ueberdeckung: Option<Ueberdeckung>Present only when the quarter hour was over-claimed.
proof: ConservationProofThe conservation identity, ready to file.
Implementations§
Source§impl QuarterHourAllocation
impl QuarterHourAllocation
Sourcepub fn allocate(
slot: Viertelstunde,
richtung: Richtung,
ngz_kwh: Decimal,
ansprueche: &[Anspruch],
) -> Result<Self, EmobError>
pub fn allocate( slot: Viertelstunde, richtung: Richtung, ngz_kwh: Decimal, ansprueche: &[Anspruch], ) -> Result<Self, EmobError>
Allocate one quarter hour.
§Errors
EmobError::Allocation when ngz_kwh or any claim is negative — a
reverse flow is Richtung::Einspeisung, not a negative Bezug;
EmobError::DoppelterAnspruch when one virtual Marktlokation claims
the same quarter hour twice; and EmobError::ErhaltungVerletzt if the
identity somehow fails, which is a bug in this crate rather than a
caller condition.
Sourcepub fn kwh_of_kind(&self, kind: MaloKind) -> Decimal
pub fn kwh_of_kind(&self, kind: MaloKind) -> Decimal
The share that reached a given kind of Marktlokation.
Trait Implementations§
Source§impl Clone for QuarterHourAllocation
impl Clone for QuarterHourAllocation
Source§fn clone(&self) -> QuarterHourAllocation
fn clone(&self) -> QuarterHourAllocation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QuarterHourAllocation
impl Debug for QuarterHourAllocation
Source§impl<'de> Deserialize<'de> for QuarterHourAllocation
impl<'de> Deserialize<'de> for QuarterHourAllocation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for QuarterHourAllocation
Source§impl PartialEq for QuarterHourAllocation
impl PartialEq for QuarterHourAllocation
Source§impl Serialize for QuarterHourAllocation
impl Serialize for QuarterHourAllocation
impl StructuralPartialEq for QuarterHourAllocation
Auto Trait Implementations§
impl Freeze for QuarterHourAllocation
impl RefUnwindSafe for QuarterHourAllocation
impl Send for QuarterHourAllocation
impl Sync for QuarterHourAllocation
impl Unpin for QuarterHourAllocation
impl UnsafeUnpin for QuarterHourAllocation
impl UnwindSafe for QuarterHourAllocation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.