Skip to main content

Module types

Module types 

Source
Expand description

Input/output types for the settlement calculation engine.

§Architecture

The preferred calculation flow is:

Input → Validation → Settlement Engine → SettlementResult → InvoiceDocument → BO4E → EDIFACT

SettlementResult is the canonical output. It carries every position alongside its CalculationTrace, applicable LegalReferences, the TariffSource that justified each rate, and any SettlementWarnings.

The service layer (netzbilanzd, invoicd) adapts SettlementResult into rubo4e::current::Rechnung via a local into_rechnung() helper — keeping BO4E as a purely rendering concern outside this crate.

§No float money

All monetary amounts use rust_decimal::Decimal. The crate::EuroAmount newtype provides overflow-safe EUR arithmetic. No f32/f64 appears anywhere in settlement calculations.

Structs§

AbschlagInput
Input for an Abschlagsrechnung Netznutzung (PID 31001).
Abschlagsverrechnung
An Abschlagsrechnung a later invoice deducts.
AwhPositionInput
One AWH action line item for GasAwhInput.
Blindarbeit
Reactive energy and the terms on which its excess is charged.
CalculationTrace
Full audit record for how one SettlementPosition was computed.
GasAwhInput
Input for GeLi Gas AWH Sperrprozesse settlement (PID 31011).
Grundpreis
A Gas NNE Grundpreis — monthly rate and the months billed.
InvoiceDocument
A settlement presented as an invoice.
Konzessionsabgabe
A Konzessionsabgabe — the rate together with the customer group it applies to.
Leistungspreis
An RLM demand charge — peak demand and its rate.
MengePreis
A metered quantity priced at a rate.
MmmInput
Input for Mehr-/Mindermengen (MMM) settlement invoice calculation.
MsbInput
Input for MSB (Messstellenbetreiber) invoice calculation.
MsbRechnungsempfaenger
Recipient of a MSB-Rechnung (PID 31009).
NneInput
Input for NNE (Netznutzungsentgelt) invoice calculation.
PriceStep
One step of a rate schedule.
Reduktionsfaktor
A §14a Modul 2 reduction factor — the fraction of the published Arbeitspreis actually paid.
SettlementPeriod
The delivery period a settlement covers.
SettlementPosition
One line of a settlement.
SettlementResult
What a settlement calculation produced.
SettlementWarning
A non-blocking validation issue found during settlement calculation.
SpotPriceFormula
One line item in a grid settlement.
SpotpreisInterval
One dispatch interval for a spot-linked Netzentgelt (not a §14a module).
ValidationResult
Result of pre-calculation input validation.

Enums§

AbschlagGrundlage
How an Abschlag’s amount was arrived at.
ArbeitspreisModell
How the Arbeitspreis is structured, and whether §14a applies.
BillingPositionKind
Semantic kind of a billing position — used by the service layer to derive the correct BdewArtikelnummer for the BO4E Rechnungsposition.
GemeindeGroesse
Municipality size band for Konzessionsabgabe, per KAV §2 Abs. 2.
KaKundengruppe
Konzessionsabgabe customer group per KAV §2.
KorrekturGrund
Why a settlement was recalculated.
LegalReference
Regulatory citation that justifies a billing position or rate.
MsbEmpfaengerRolle
Market role a MSB-Rechnung (PID 31009) may be addressed to.
PriceReference
What a price refers to.
QuantityUnit
Unit of measure for a settlement position quantity.
Rechnungscharakter
The billing cadence of a Netznutzungsrechnung — IMD+7081.
Sect14aModule
§14a EnWG module for steuerbare Verbrauchseinrichtungen (controllable loads).
SettlementStatus
Lifecycle status of a settlement result.
SettlementType
Which regulated settlement process produced this result.
Sparte
Commodity — Strom (electricity) or Gas.
TariffCalculationMethod
How a rate was derived.
TariffSource
Origin of the tariff rate applied in a settlement position.
WarningSeverity
Severity level for SettlementWarning.

Functions§

validate_gas_awh_input
Validate a GasAwhInput before calling crate::settle_gas_awh.
validate_mmm_input
Validate a MmmInput before calling crate::settle_mmm.
validate_msb_input
Validate a MsbInput before calling crate::settle_msb.