EEG and EnFG
MiSpeL (BNetzA 618-25-02, in effect from 21.10.2026) for storage and charge points, the EEG § 51/§ 51a negative-price quarter-hours, and EnFG § 46 Zeitgleichheit.
| Module | Rule | What leaves it |
|---|---|---|
eeg::mispel | MiSpeL Tenor, Anlage 1 and 2 | from which day the Festlegung governs; the Abgrenzungs- and Pauschaloption quantities, formula by formula |
eeg::negative_prices | EEG § 51, § 51a | zero-value quarter-hours, the extension of the Vergütungszeitraum, the § 51 Abs. 3 energy |
eeg::zeitgleichheit | EnFG § 46 Abs. 3 and 5 | the per-interval coincident quantity, the worst-case estimate |
Quantities only. Where a rule turns on the sign of a price (AW¼ > 0, SP¼ ≥ 0, a negative spot price) you pass which quarter-hours pass, never the price. Inputs are quarter-hourly series on one grid; a mismatch is refused with the first instant where the grids part.
MiSpeL
Marktintegration von Speichern und Ladepunkten (BNetzA, Az. 618-25-02, in effect from 21.10.2026): a storage system or bidirectional charge point mixing grid and plant electricity keeps its Umlageprivilegien (§ 21 EnFG) and Marktprämie (§ 19 EEG) for the share these formulas attribute to it.
| Anlage | Module | Scope | Formulas | Period |
|---|---|---|---|---|
| 1, Abgrenzungsoption | mispel::abgrenzung | Z1 at the connection, Z2 before the storage or charge point; cases A1–A11 | (1)–(40) | calendar month: Abgrenzungsoption::monat; abgrenzung::jahr sums months |
| 2, Pauschaloption | mispel::pauschal | PV ≤ 30 kWp behind one meter; cases P1–P5; 500 kWh/kWp (P1) and P1 plus an Indifferenzbereich (P4) replace Z2 | (P1)–(P22) | calendar year or Rumpfjahr |
Per quarter-hour the Speichervorrang and gates, per month the sums, then every MIN/MAX clamp. Every numbered intermediate is in the result as fN.
use metering::eeg::mispel::pauschal::{Pauschalbasis, Pauschalgrenzen};
use metering::dec;
// Anlage 2, p. 13: 8 kWp of PV and a 10 kWh storage.
let g = Pauschalgrenzen::new(Pauschalbasis::Stromspeicher { kapazitaet_kwh: dec!(10) }, dec!(8)).unwrap();
assert_eq!((g.p1, g.p3, g.p4), (dec!(4000), dec!(320), dec!(4320)));
From which day it governs
mispel::geltung applies Tenorziffern 8 and 9 and names the rule that set the day:
| Rule | First day | Grund |
|---|---|---|
| 8 — effect with the Bekanntgabe (Amtsblatt of 07.10.2026 plus two weeks, § 73 Abs. 1a EnWG) | 21.10.2026 | Bekanntgabe |
| 9 a — until 30.09.2027 only with the operators' consent | without consent, 01.10.2027 | Einverstaendnis |
| 9 b — the Pauschaloption from the month after the EU state-aid approval | the first of the next month | Genehmigung |
use metering::eeg::mispel::geltung::{geltung, Grund, Optionsart, Umstaende};
use metering::eeg::mispel::pauschal::Zeitraum;
use jiff::civil::date;
let g = geltung(
Optionsart::Pauschal,
Umstaende { einverstaendnis: true, genehmigung: Some(date(2027, 1, 14)) },
)?;
assert_eq!((g.ab, g.grund), (date(2027, 2, 1), Grund::Genehmigung));
// The first Pauschaloption year is a Rumpfjahr.
assert_eq!(
Zeitraum::ab(2027, g.ab),
Some(Zeitraum::Rumpfjahr { erster_tag: date(2027, 2, 1), letzter_tag: date(2027, 12, 31) }),
);
# Ok::<(), metering::eeg::EegError>(())
Without an approval date the Pauschaloption is refused. The Zuordnung date is yours; take the later of the two. In a Rumpfjahr, Pauschaljahr::p1/p3/p4 hold the Rumpfjahr's limits, kalenderjahr the whole year's.
Your input: the Formelsatz (binding for a calendar year), the operators' consent and the state-aid approval date. Out: the money formulas (41)–(44) of case A9 and the § 22 EnFG heat-pump quantity of the A7 and P5 footnotes. No rounding — the Festlegung states none; its tables are rounded for display.
EEG § 51 and § 51a — negative prices
§ 51 Abs. 1: "Für Zeiträume, in denen der Spotmarktpreis negativ ist, verringert sich der anzulegende Wert auf null." § 51a extends the Vergütungszeitraum by those quarter-hours (year of commissioning plus 19), rounded up to whole days; for a Solaranlage halved and rounded up to Volllastviertelstunden, spent month by month against the statutory table.
use metering::eeg::negative_prices::{extension_days, solar_extension, volllastviertelstunden};
use jiff::civil::date;
assert_eq!(extension_days(97), 2); // up, never to nearest
assert_eq!(volllastviertelstunden(1001), 501);
// 500 Volllastviertelstunden from an end on 15 April: the rest of April's
// budget, then May's.
let e = solar_extension(date(2045, 4, 15), volllastviertelstunden(1000)).unwrap();
assert_eq!(e.end, date(2045, 5, 31));
negative_span_energy gives the § 51 Abs. 3 energy per uninterrupted span (the 5 % reduction is money). Whether § 51 applies to a plant is your fact.
EnFG § 46 — Zeitgleichheit
Abs. 5: "höchstens bis zu der Höhe der tatsächlichen Netzentnahme, bezogen auf jedes 15-Minuten-Intervall" — the minimum per quarter-hour, summed after: Σ min(a, b). MiSpeL's Speichervorrang is the same function.
use metering::eeg::zeitgleichheit::{worst_case_estimate, zeitgleichheit};
use metering::prelude::*;
let t: Timestamp = "2026-06-01T00:00Z".parse()?;
let series = |values: [Decimal; 2]| {
let slots = values
.into_iter()
.zip(0..)
.map(|(v, i)| MeterInterval::quarter_hour(t + SignedDuration::from_mins(15 * i), v, QualityFlag::Measured))
.collect::<Result<Vec<_>, _>>().unwrap();
Series::new(Resolution::QUARTER_HOUR, DayBoundary::Strom, slots).unwrap()
};
let z = zeitgleichheit(&series([dec!(5), dec!(1)]), &series([dec!(2), dec!(4)])).unwrap();
assert_eq!(z.total, dec!(3)); // min(5, 2) + min(1, 4), not min(6, 6)
// Abs. 3 Satz 4: maximum draw × the full hours of the Berlin calendar year.
let e = worst_case_estimate(dec!(2.5), 2028).unwrap();
assert_eq!(e.hours, 8_784);
# Ok::<(), Box<dyn std::error::Error>>(())