redispatch_xml/lib.rs
1//! `redispatch-xml` — Redispatch 2.0 XML/XSD format parsing and validation
2//! for the German electricity grid (§§ 13, 13a, 14 EnWG).
3//!
4//! # Domain background
5//!
6//! **Redispatch 2.0** entered into force on **1 October 2021** via the
7//! Netzausbaubeschleunigungsgesetz (NABEG) and requires all German grid
8//! operators to coordinate congestion management across transmission and
9//! distribution networks. It covers:
10//!
11//! - All renewable-energy (EE) and combined heat-and-power (KWK) plants
12//! with ≥ 100 kW installed capacity
13//! - All installations permanently remote-controllable by a grid operator
14//! (e.g. via Smart-Meter-Gateway)
15//!
16//! # Format family
17//!
18//! Redispatch 2.0 uses CIM/IEC 62325-based XML documents for the primary data
19//! exchange between TSOs, DSOs, and balance responsible parties. Documents are
20//! validated against BDEW-published XSD schemas (topicGroupId 25 in the BDEW
21//! MaKo document API).
22//!
23//! | Document type | Current version | Valid from |
24//! |---|---|---|
25//! | `ActivationDocument` | XSD 1.1d | 2025-10-01 |
26//! | `PlannedResourceScheduleDocument` | XSD 1.0f | 2025-10-01 |
27//! | `AcknowledgementDocument` | 1.0f | 2025-10-01 |
28//! | `Stammdaten` | XSD 1.4b | 2025-10-01 |
29//! | `StatusRequest_MarketDocument` | XSD 1.1 | 2025-10-01 |
30//! | `Unavailability_MarketDocument` | XSD 1.1b | 2025-10-01 |
31//! | `Beschaffungsanforderung_energetischerAusgleich` | XSD | 2025-10-01 |
32//! | `Beschaffungsvorbehalt` | XSD | 2025-10-01 |
33//! | `Kostenblatt` | XSD | 2025-10-01 |
34//!
35//! These are **not** EDIFACT. IFTSTA status messages for the Redispatch 2.0
36//! workflow are handled separately by the `edi-energy` crate.
37//!
38//! # Market roles
39//!
40//! | Role | Abbrev. | Description |
41//! |------|---------|-------------|
42//! | Übertragungsnetzbetreiber | ÜNB | Transmission system operator |
43//! | Verteilnetzbetreiber | VNB | Distribution system operator |
44//! | Anlagenbetreiber | ANB | Generation asset operator |
45//! | Direktvermarkter | DV | Direct marketer of renewable energy |
46//! | Bilanzkreisverantwortlicher | BKV | Balance responsible party |
47//!
48//! # Regulatory references
49//!
50//! - **§§ 13, 13a, 14 EnWG** — statutory basis for grid congestion management
51//! - **NABEG 2019** — introduced Redispatch 2.0, effective 1 October 2021
52//! - **BNetzA BK6-20-059/060/061** — three BNetzA rulings governing billing
53//! balance, grid operator coordination, and information provision
54//! - **BDEW XML-Datenformate Redispatch 2.0** — XSD schemas and application
55//! guidelines published on [bdew-mako.de](https://www.bdew-mako.de)
56//!
57//! This crate is a name reservation. Implementation is coming soon.