Skip to main content

ArbeitspreisModell

Enum ArbeitspreisModell 

Source
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: MengePreis

The energy delivered in the period, at its published rate. Billed in full — Modul 1 does not touch the Arbeitspreis.

§pauschale_eur_pro_jahr: Decimal

The Netzbetreiber’s published annual pauschale, in EUR per year.

§jahresanteil: Decimal

The fraction of a year this settlement period covers, so the annual pauschale is credited pro rata.

§

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: MengePreis

The device’s metered energy and its published rate, before reduction.

§reduktion: Reduktionsfaktor

The 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: MengePreis

Hochtarif band.

§st: MengePreis

Standardtarif band.

§nt: MengePreis

Niedertarif 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

Source

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.

Source

pub const fn sect14a_modul(&self) -> Option<Sect14aModule>

The §14a module in play, if any.

Trait Implementations§

Source§

impl Clone for ArbeitspreisModell

Source§

fn clone(&self) -> ArbeitspreisModell

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ArbeitspreisModell

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ArbeitspreisModell

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for ArbeitspreisModell

Source§

fn eq(&self, other: &ArbeitspreisModell) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ArbeitspreisModell

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ArbeitspreisModell

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.