pub struct ProsumerMeterInput {
pub grid_consumption_kwh: Decimal,
pub self_consumption_kwh: Decimal,
pub export_kwh: Option<Decimal>,
}Expand description
Prosumer meter data — combines grid consumption with PV self-consumption.
A prosumer simultaneously consumes electricity (partly from the grid, partly from their own PV plant) and may export surplus generation to the grid.
§LF billing scope (energy-billing)
The Lieferant bills grid consumption only. Self-consumption billing and
EEG feed-in remuneration (Einspeisevergütung) are handled by eeg-billing.
§Stromsteuer exemption
§ 9 Abs. 1 Nr. 3 StromStG exempts self-consumed electricity from plants up to 2 MW
from Stromsteuer. This is applied automatically when self_consumption_kwh > 0.
§Network charge exemption
Netzentgelte are charged for Netznutzung — the § 17 StromNEV Arbeits- and
Leistungspreis are levied on what is taken from the grid at the
Entnahmestelle. Self-consumed electricity never enters it, so it is outside
that base and no NNE applies to self_consumption_kwh. This is not the
§ 14a EnWG reduction, which is a reduced Netzentgelt for a controllable
load that does draw from the grid.
§Example
use energy_billing::ProsumerMeterInput;
use rust_decimal::dec;
let m = ProsumerMeterInput {
grid_consumption_kwh: dec!(250), // drawn from grid → full tariff
self_consumption_kwh: dec!(150), // from own PV → Stromsteuer-exempt, no Netznutzung
export_kwh: Some(dec!(100)), // fed back to grid (via eeg-billing)
};
assert_eq!(m.total_consumption_kwh(), dec!(400));Fields§
§grid_consumption_kwh: DecimalElectricity drawn from the public grid (kWh).
Full tariff applies: Arbeitspreis + NNE + Stromsteuer.
self_consumption_kwh: DecimalElectricity generated by the customer’s PV plant and consumed on-site (kWh).
- No NNE (does not transit the grid)
- No Stromsteuer on the self-consumed part (§ 9 Abs. 1 Nr. 3 StromStG)
- Appears as an informational invoice line showing the self-supply ratio
export_kwh: Option<Decimal>Electricity exported to the grid (kWh). Informational only.
This quantity is handled by eeg-billing (EEG Einspeisevergütung),
not by energy-billing. Included here so the retail invoice can show
the complete energy balance to the customer (§41 EnWG transparency).
Implementations§
Source§impl ProsumerMeterInput
impl ProsumerMeterInput
Sourcepub fn total_consumption_kwh(&self) -> Decimal
pub fn total_consumption_kwh(&self) -> Decimal
Total electricity consumption (grid + self, kWh).
Sourcepub fn self_supply_ratio(&self) -> Decimal
pub fn self_supply_ratio(&self) -> Decimal
Self-supply ratio (0.0–1.0): share of total consumption from own PV.
Trait Implementations§
Source§impl Clone for ProsumerMeterInput
impl Clone for ProsumerMeterInput
Source§fn clone(&self) -> ProsumerMeterInput
fn clone(&self) -> ProsumerMeterInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more