#[non_exhaustive]pub enum EmobError {
NotFirstOfMonth {
was: &'static str,
date: Date,
},
DoppeltesBilanzierungsgebiet {
regelzone: String,
},
AnmeldungVorBgBeginn {
anmeldung: Date,
bg_start: Date,
},
AnmeldungNachBgEnde {
anmeldung: Date,
bg_ende: Date,
},
EegAnlageAusserhalbDesBeschlusses,
KeineViertelstundenmessung,
ErhaltungVerletzt {
slot: String,
ngz: Decimal,
summe: Decimal,
delta: Decimal,
},
VersionIstFinal {
erstellungszeitpunkt: String,
},
KorrekturfristAbgelaufen {
monat: String,
frist: Date,
eingang: Date,
},
DoppelterAnspruch {
malo: String,
},
LadevorgangZuLang {
id: String,
slots: u64,
max: u64,
},
Allocation(String),
}Expand description
An invariant of Anlage 6 / the AWH „Zum Modell 2“ that the caller’s data breaks.
Every variant names the clause it enforces. None of them is a wire error: this crate does no I/O, so all of these are statements about the operator’s own records.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFirstOfMonth
A Bilanzierungsgebiet may begin, change or end only on the first of a month (AWH Kap. 5.3.1.3: „Die Bildung und Änderung von einem BG erfolgt nur zum Ersten eines Monats“).
DoppeltesBilanzierungsgebiet
A Ladepunktbetreiber holds at most one Bilanzierungsgebiet per Regelzone (AWH Kap. 5.3).
AnmeldungVorBgBeginn
The Übergabestelle’s Anmeldedatum precedes the BG’s Gültigkeitsbeginn (AWH Kap. 2.1.2 Nr. 1: „Das Anmeldedatum darf nicht vor dem Gültigkeitsbeginn des BG liegen“).
AnmeldungNachBgEnde
The Anmeldedatum falls on or after the day the BG stops being valid.
The AWH states only the lower bound, because a BG that has been beendet is not a BG one can register against at all: a Marktlokation balanced into an expired Bilanzierungsgebiet has no Bilanzkreis- Zuordnung on the day it takes effect, and the BIKO has nothing to settle it against (AWH Kap. 5.3.1.3, Anlage 6 §II).
Fields
EegAnlageAusserhalbDesBeschlusses
A Kundenanlage carrying an EEG-geförderte Anlage was onboarded on the BK6-24-267 path.
The Beschluss is explicit that its scope excludes „Kundenanlagen mit EEG-geförderten Anlagen oder anderweitig komplexen Strukturen“ (S. 28). It does not decide the case either way, so the model cannot be applied to it without a bilateral agreement — and applying it anyway would balance an EEG-vergütete Einspeisung into the LPB’s BG.
KeineViertelstundenmessung
The Übergabestelle is not quarter-hour metered.
Anlage 6 §III.1 makes ¼-h measurement — a Zählerstandsgang or registrierende Leistungsmessung — a precondition of the model. Without it there is nothing to allocate against.
ErhaltungVerletzt
The conservation identity of Anlage 6 §IV.1 does not hold.
Raised only where it is a bug — a caller that assembled a version by hand and got the arithmetic wrong. The ordinary shortfall is not this: it is the Deltamenge, which is a quantity with a Bilanzkreis of its own.
Fields
VersionIstFinal
A version already sealed as Final was edited.
MaBiS Kap. 3.8.2 versions by Erstellungszeitpunkt; once a version has settled it is immutable and a correction is a new version.
KorrekturfristAbgelaufen
A correction arrived after the MaBiS Korrekturfrist.
MaBiS Kap. 3.10 closes the window at the end of month M+7 relative to the Bilanzierungsmonat.
Fields
DoppelterAnspruch
Two claims in one quarter hour name the same virtual Marktlokation.
Refused rather than summed. A MaLo appearing twice produces two
crate::allocation::Zuordnung rows for one Bilanzkreis-Zuordnung,
and every downstream consumer that keys by MaLo — the BK-SZR
aggregation above all — silently keeps one of them. Merge the claims
upstream, where the reason they are two is still known.
LadevorgangZuLang
A Ladevorgang spans more quarter hours than a session can.
Not a regulatory bound but a corruption guard: the split walks one
slot at a time, so an ende that a backend got wrong by a factor of a
thousand would otherwise allocate until the process dies. A year of
quarter hours is already three orders of magnitude past the longest
real charging session.
Fields
Allocation(String)
The allocation could not be formed at all.
Trait Implementations§
impl Eq for EmobError
Source§impl Error for EmobError
impl Error for EmobError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<AllocationError> for EmobError
impl From<AllocationError> for EmobError
Source§fn from(e: AllocationError) -> Self
fn from(e: AllocationError) -> Self
impl StructuralPartialEq for EmobError
Auto Trait Implementations§
impl Freeze for EmobError
impl RefUnwindSafe for EmobError
impl Send for EmobError
impl Sync for EmobError
impl Unpin for EmobError
impl UnsafeUnpin for EmobError
impl UnwindSafe for EmobError
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,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T, O> Matches<O> for Twhere
T: PartialEq<O>,
impl<T, O> Matches<O> for Twhere
T: PartialEq<O>,
fn validate_matches(&self, other: &O) -> bool
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more