pub enum ArbeitspreisModell {
Einheitlich(MengePreis),
Modul1Pauschal {
basis: MengePreis,
pauschale_eur_pro_jahr: Decimal,
jahresanteil: Decimal,
},
Modul2ProzentualeReduzierung {
basis: MengePreis,
reduktion: Reduktionsfaktor,
},
Modul3ZeitVariabel {
ht: MengePreis,
st: MengePreis,
nt: MengePreis,
},
SpotpreisNetzentgelt {
intervalle: Vec<SpotpreisInterval>,
},
}Expand description
How the Arbeitspreis is structured, and whether §14a applies.
One enum rather than three independent field groups. The four variants are mutually exclusive by construction, which removes a whole class of defect:
- The four HT/NT fields were 2⁴ states of which two were valid. Setting three of them fell through to flat billing with no error — the invoice looked right and was billed on the wrong basis.
- Modul 1 and Modul 3 could both be set. The engine applied the flat reduction and the per-interval rates, double-billing the same energy.
- Modul 1 and Modul 2 could both be set; the engine silently preferred Modul 2 rather than rejecting the conflict.
Those were runtime warnings in a validator the engine never called. They are now unrepresentable.
Variants§
Einheitlich(MengePreis)
A single rate for all metered energy.
Modul1Pauschal
§14a Modul 1 — pauschale Reduzierung des Netzentgelts.
A flat annual amount the Netzbetreiber publishes, credited pro rata
for the settlement period. It does not scale with consumption — that is
what makes it pauschal, and what distinguishes it from
Self::Modul2ProzentualeReduzierung, which reduces the Arbeitspreis by
a percentage. The two were structurally identical here once; a factor on
the Arbeitspreis is Modul 2’s mechanism wearing Modul 1’s name.
Needs no additional metering, which is why it is the default where the connection holder makes no choice.
Fields
basis: MengePreisThe energy delivered in the period, at its published rate. Billed in full — Modul 1 does not touch the Arbeitspreis.
Modul2ProzentualeReduzierung
§14a Modul 2 — the Arbeitspreis reduced by a percentage.
The reduction attaches to the controllable device’s own metered energy,
so basis carries that device’s consumption rather than the whole
connection’s.
Fields
basis: MengePreisThe device’s metered energy and its published rate, before reduction.
reduktion: ReduktionsfaktorThe fraction of that rate actually paid.
Modul3ZeitVariabel
§14a Modul 3 — zeitvariable Netzentgelte in three Tarifstufen.
All three bands are required: BK6-22-300 defines Hochtarif, Standardtarif
and Niedertarif, and permitting a subset would reintroduce the partial
state this type exists to prevent. A band with no energy carries
menge_kwh = 0 rather than being omitted.
Fields
ht: MengePreisHochtarif band.
st: MengePreisStandardtarif band.
nt: MengePreisNiedertarif band.
SpotpreisNetzentgelt
A spot-derived NNE rate per dispatch interval.
Not a §14a module. BK6-22-300 defines exactly three, none of which is
spot-linked; this models a Netzentgelt whose rate follows the spot price
under the NB’s own PreisblattNetznutzung formula. The rates arrive
already derived — this crate never queries a spot market.
Fields
intervalle: Vec<SpotpreisInterval>The dispatch intervals, each with its own rate.
Implementations§
Source§impl ArbeitspreisModell
impl ArbeitspreisModell
Sourcepub fn menge_kwh(&self) -> Decimal
pub fn menge_kwh(&self) -> Decimal
Total metered energy across the model, in kWh.
This is the base the Konzessionsabgabe and the network levies are charged on, so it is derived here once rather than recomputed per levy.
Sourcepub const fn sect14a_modul(&self) -> Option<Sect14aModule>
pub const fn sect14a_modul(&self) -> Option<Sect14aModule>
The §14a module in play, if any.
Trait Implementations§
Source§impl Clone for ArbeitspreisModell
impl Clone for ArbeitspreisModell
Source§fn clone(&self) -> ArbeitspreisModell
fn clone(&self) -> ArbeitspreisModell
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more