Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
4b612be
:construction: initialized bo bilanzierungs class
DeltaDaniel Aug 14, 2023
cff7eeb
Merge branch 'main' into DDB/issue-220_bilanzierung
DeltaDaniel Aug 14, 2023
047546b
:construction: added Lastprofil-Klasse and testing functions.
DeltaDaniel Aug 21, 2023
0dae7e2
Merge remote-tracking branch 'origin/DDB/issue-220_bilanzierung' into…
DeltaDaniel Aug 21, 2023
3a1c1dc
Merge branch 'main' into DDB/issue-220_bilanzierung
DeltaDaniel Aug 21, 2023
330f6f5
:construction: Update Formatierung
DeltaDaniel Aug 21, 2023
5cd5503
:construction: fixed isort
DeltaDaniel Aug 21, 2023
61d696c
:construction: added MaLo validator
DeltaDaniel Aug 21, 2023
004e9bd
:construction: fixed minor issue in field validator in bilanzierung.py
DeltaDaniel Aug 21, 2023
98d3692
:wastebasket: removed unused comment
DeltaDaniel Aug 23, 2023
1ccf381
:wastebasket: removed unused comments -> required/optional attributes
DeltaDaniel Aug 23, 2023
56cb779
:bulb: updated comments for field validators
DeltaDaniel Aug 23, 2023
2d7432d
:wastebasket: removed depracted comment in enum botyp
DeltaDaniel Aug 23, 2023
1bd5c00
:bulb: Updated description for enums.
DeltaDaniel Aug 23, 2023
4c3a73e
:bulb: updated formatting of comments
DeltaDaniel Aug 23, 2023
df48f3f
:white_check_mark: added testsvariables to bo bilanzierung
DeltaDaniel Aug 23, 2023
a3b63de
Minor corrections
DeltaDaniel Aug 23, 2023
ce483ae
:white_check_mark: Fixed tests in bo
DeltaDaniel Aug 23, 2023
636958b
Update src/bo4e/bo/bilanzierung.py
DeltaDaniel Aug 28, 2023
d9173a0
Update tests/test_bilanzierung.py
DeltaDaniel Aug 28, 2023
77bc400
typo/black/iso
DeltaDaniel Aug 28, 2023
e41bd3e
:memo: updated documentation
DeltaDaniel Aug 28, 2023
dfe3fcc
Merge branch 'main' into DDB/issue-220_bilanzierung
hf-fvesely Nov 24, 2023
fd4d6f4
Add new BO, COMs and ENUMs to init.py
hf-fvesely Nov 24, 2023
1b12ba8
Remove validation and adapt test
hf-fvesely Nov 24, 2023
09fc56f
Also adapt Lastprofil Test
hf-fvesely Nov 24, 2023
e20961e
And also Tagesparameter test
hf-fvesely Nov 24, 2023
f5ddd02
Merge remote-tracking branch 'origin/main' into DDB/issue-220_bilanzi…
hf-fvesely Nov 27, 2023
2e263e6
Merge branch 'main' into DDB/issue-220_bilanzierung
DeltaDaniel Jan 15, 2024
d77e029
changed type of "verbrauchsaufteilung": float -> decimal
DeltaDaniel Jan 15, 2024
a727ad7
added missing import to __init__.py
DeltaDaniel Jan 15, 2024
0df752b
Update src/bo4e/bo/bilanzierung.py
DeltaDaniel Apr 30, 2024
ebac708
Update src/bo4e/bo/bilanzierung.py
DeltaDaniel Apr 30, 2024
33e8d5a
Update src/bo4e/bo/bilanzierung.py
DeltaDaniel Apr 30, 2024
af0c214
Update src/bo4e/bo/bilanzierung.py
DeltaDaniel Apr 30, 2024
6ba7dba
Update src/bo4e/com/lastprofil.py
DeltaDaniel Apr 30, 2024
b9a380c
Update src/bo4e/com/tagesparameter.py
DeltaDaniel Apr 30, 2024
a41916b
changed docstrings
DeltaDaniel Apr 30, 2024
e51afb3
Merge remote-tracking branch 'origin/main' into DDB/issue-220_bilanzi…
DeltaDaniel Apr 30, 2024
da463d7
Merge branch 'main' into DDB/issue-220_bilanzierung
hf-kklein Sep 11, 2024
0168a4e
Add Abwicklungsmodell ENums to Bilanzierung
FreddyFox892 Sep 11, 2024
8bd851b
Update Profielart
FreddyFox892 Sep 11, 2024
bdb5e7b
black .
FreddyFox892 Sep 11, 2024
cc54dae
Merge remote-tracking branch 'origin/main' into DDB/issue-220_bilanzi…
hf-aschloegl Mar 20, 2025
b7d336d
Spell out Enums in Fallgruppenzuordnung
hf-aschloegl Mar 20, 2025
d448c8c
Adapt test data
hf-aschloegl Mar 20, 2025
1aea56d
Adapt boolean name
hf-aschloegl Mar 20, 2025
11ade49
Adapt tests for new boolean name
hf-aschloegl Mar 20, 2025
83a567e
Remove wrong info in docstring
hf-aschloegl Mar 20, 2025
519db12
Fix grammar
hf-aschloegl Mar 20, 2025
c301307
Adapt ENUM Abwicklungsmodell
hf-aschloegl Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/bo4e/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
"""

__all__ = [
"Abwicklungsmodell",
"Angebot",
"Ausschreibung",
"Bilanzierung",
"Buendelvertrag",
"Energiemenge",
"Fremdkosten",
Expand Down Expand Up @@ -68,6 +70,7 @@
"Kostenblock",
"Kostenposition",
"KriteriumWert",
"Lastprofil",
"MarktgebietInfo",
"Menge",
"PositionsAufAbschlag",
Expand All @@ -86,6 +89,7 @@
"StandorteigenschaftenGas",
"StandorteigenschaftenStrom",
"Steuerbetrag",
"Tagesparameter",
"Tarifberechnungsparameter",
"Tarifeinschraenkung",
"Tarifpreis",
Expand All @@ -103,6 +107,7 @@
"Zeitreihenwert",
"Zustaendigkeit",
"AbgabeArt",
"Aggregationsverantwortung",
"Angebotsstatus",
"Anrede",
"ArithmetischeOperation",
Expand All @@ -120,6 +125,7 @@
"EMobilitaetsart",
"Energierichtung",
"Erzeugungsart",
"Fallgruppenzuordnung",
"Gasqualitaet",
"Gebiettyp",
"Geraeteklasse",
Expand Down Expand Up @@ -156,6 +162,10 @@
"Preismodell",
"Preisstatus",
"Preistyp",
"Profilart",
"Profiltyp",
"Profilverfahren",
"Prognosegrundlage",
"Rechnungslegung",
"Rechnungsstatus",
"Rechnungstyp",
Expand Down Expand Up @@ -183,6 +193,7 @@
"Vertragsstatus",
"Verwendungszweck",
"Voraussetzungen",
"WahlrechtPrognosegrundlage",
"Waehrungscode",
"Waehrungseinheit",
"Waermenutzung",
Expand All @@ -191,6 +202,7 @@
"Zaehlergroesse",
"Zaehlertyp",
"ZaehlertypSpezifikation",
"Zeitreihentyp",
"ZusatzAttribut",
"__version__",
"__gh_version__",
Expand All @@ -201,6 +213,7 @@
# Import BOs
from .bo.angebot import Angebot
from .bo.ausschreibung import Ausschreibung
from .bo.bilanzierung import Bilanzierung
from .bo.buendelvertrag import Buendelvertrag
from .bo.energiemenge import Energiemenge
from .bo.fremdkosten import Fremdkosten
Expand Down Expand Up @@ -261,6 +274,7 @@
from .com.kostenblock import Kostenblock
from .com.kostenposition import Kostenposition
from .com.kriteriumwert import KriteriumWert
from .com.lastprofil import Lastprofil
from .com.marktgebietinfo import MarktgebietInfo
from .com.menge import Menge
from .com.positionsaufabschlag import PositionsAufAbschlag
Expand All @@ -279,6 +293,7 @@
from .com.standorteigenschaftengas import StandorteigenschaftenGas
from .com.standorteigenschaftenstrom import StandorteigenschaftenStrom
from .com.steuerbetrag import Steuerbetrag
from .com.tagesparameter import Tagesparameter
from .com.tarifberechnungsparameter import Tarifberechnungsparameter
from .com.tarifeinschraenkung import Tarifeinschraenkung
from .com.tarifpreis import Tarifpreis
Expand All @@ -298,6 +313,8 @@

# Import Enums
from .enum.abgabeart import AbgabeArt
from .enum.abwicklungsmodell import Abwicklungsmodell
from .enum.aggregationsverantwortung import Aggregationsverantwortung
from .enum.angebotsstatus import Angebotsstatus
from .enum.anrede import Anrede
from .enum.arithmetische_operation import ArithmetischeOperation
Expand All @@ -315,6 +332,7 @@
from .enum.emobilitaetsart import EMobilitaetsart
from .enum.energierichtung import Energierichtung
from .enum.erzeugungsart import Erzeugungsart
from .enum.fallgruppenzuordnung import Fallgruppenzuordnung
from .enum.gasqualitaet import Gasqualitaet
from .enum.gebiettyp import Gebiettyp
from .enum.geraeteklasse import Geraeteklasse
Expand Down Expand Up @@ -350,6 +368,10 @@
from .enum.preismodell import Preismodell
from .enum.preisstatus import Preisstatus
from .enum.preistyp import Preistyp
from .enum.profilart import Profilart
from .enum.profiltyp import Profiltyp
from .enum.profilverfahren import Profilverfahren
from .enum.prognosegrundlage import Prognosegrundlage
from .enum.rechnungslegung import Rechnungslegung
from .enum.rechnungsstatus import Rechnungsstatus
from .enum.rechnungstyp import Rechnungstyp
Expand Down Expand Up @@ -380,11 +402,13 @@
from .enum.waehrungscode import Waehrungscode
from .enum.waehrungseinheit import Waehrungseinheit
from .enum.waermenutzung import Waermenutzung
from .enum.wahlrechtprognosegrundlage import WahlrechtPrognosegrundlage
from .enum.wertermittlungsverfahren import Wertermittlungsverfahren
from .enum.zaehlerauspraegung import Zaehlerauspraegung
from .enum.zaehlergroesse import Zaehlergroesse
from .enum.zaehlertyp import Zaehlertyp
from .enum.zaehlertypspezifikation import ZaehlertypSpezifikation
from .enum.zeitreihentyp import Zeitreihentyp
from .version import __gh_version__, __version__
from .zusatzattribut import ZusatzAttribut

Expand Down
81 changes: 81 additions & 0 deletions src/bo4e/bo/bilanzierung.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
"""
Contains class Bilanzierung
"""

from datetime import datetime
from decimal import Decimal
from typing import Annotated, Optional

from pydantic import Field

from bo4e.bo.geschaeftsobjekt import Geschaeftsobjekt
from bo4e.com.lastprofil import Lastprofil
from bo4e.com.menge import Menge
from bo4e.enum.aggregationsverantwortung import Aggregationsverantwortung
from bo4e.enum.fallgruppenzuordnung import Fallgruppenzuordnung
from bo4e.enum.profiltyp import Profiltyp
from bo4e.enum.prognosegrundlage import Prognosegrundlage
from bo4e.enum.wahlrechtprognosegrundlage import WahlrechtPrognosegrundlage
from bo4e.enum.zeitreihentyp import Zeitreihentyp

from ..enum.abwicklungsmodell import Abwicklungsmodell
from ..enum.typ import Typ


class Bilanzierung(Geschaeftsobjekt):
"""
Das BO Bilanzierung erfasst alle relevanten Informationen zur Bilanzierung.

.. raw:: html

<object data="../_static/images/bo4e/bo/Bilanzierung.svg" type="image/svg+xml"></object>

.. HINT::
`Lastprofil JSON Schema <https://json-schema.app/view/%23?url=https://raw.githubusercontent.com/Hochfrequenz/BO4E-Schemas/{__gh_version__}/src/bo4e_schemas/bo/Bilanzierung.json>`_

"""

typ: Annotated[Optional[Typ], Field(alias="_typ")] = Typ.BILANZIERUNG

marktlokations_id: Optional[str] = None #: ID der Marktlokation
lastprofil: Optional[list[Lastprofil]] = None #: Eine Liste der verwendeten Lastprofile (SLP, SLP/TLP, ALP etc.)
bilanzierungsbeginn: Optional[datetime] = None #: Inklusiver Start der Bilanzierung
bilanzierungsende: Optional[datetime] = None #: Exklusives Ende der Bilanzierung
bilanzkreis: Optional[str] = None #: Bilanzkreis
jahresverbrauchsprognose: Optional[Menge] = None #: Jahresverbrauchsprognose
temperatur_arbeit: Optional[Menge] = None #: Temperatur Arbeit
kundenwert: Optional[Menge] = None #: Kundenwert
verbrauchsaufteilung: Optional[Decimal] = None
"""
Verbrauchsaufteilung in % zwischen SLP und TLP-Profil.

1. [Gemessene Energiemenge der OBIS "nicht Schwachlast"] * [Verbrauchsaufteilung in % / 100%]
= [zu verlagernde Energiemenge]
2. [Gemessene Energiemenge der OBIS "Schwachlast"] - [zu verlagernde Energiemenge]
= [Ermittelte Energiemenge für Schwachlast]
3. [Gemessene Energiemenge der OBIS "nicht Schwachlast"] + [zu verlagernde Energiemenge]
= [Ermittelte Energiemenge für nicht Schwachlast]
"""
zeitreihentyp: Optional[Zeitreihentyp] = None #: Zeitreihentyp (SLS, TLS, etc.)
aggregationsverantwortung: Optional[Aggregationsverantwortung] = None #: Aggregationsverantwortung
prognosegrundlage: Optional[Prognosegrundlage] = None #: Prognosegrundlage
details_prognosegrundlage: Optional[list[Profiltyp]] = None
"""
Prognosegrundlage.

Besteht der Bedarf ein tagesparameteräbhängiges Lastprofil mit gemeinsamer Messung anzugeben,
so ist dies über die 2 -malige Wiederholung des CAV Segments mit der Angabe der Codes E02 und E14 möglich.
"""
wahlrecht_prognosegrundlage: Optional[WahlrechtPrognosegrundlage] = None
"""
Wahlrecht der Prognosegrundlage.
"""
fallgruppenzuordnung: Optional[Fallgruppenzuordnung] = None #: Fallgruppenzuordnung (für gas RLM)
prioritaet: Optional[int] = None #: Priorität des Bilanzkreises (für Gas)
grund_wahlrecht_prognosegrundlage: Optional[WahlrechtPrognosegrundlage] = None
"""
Grund Wahlrecht der Prognosegrundlage.

true=Wahlrecht beim Lieferanten vorhanden
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

achtung kein bool

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"""
abwicklungsmodell: Optional[Abwicklungsmodell] = None #: Abwicklungsmodell
1 change: 0 additions & 1 deletion src/bo4e/bo/energiemenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class Energiemenge(Geschaeftsobjekt):
typ: Annotated[Literal[Typ.ENERGIEMENGE], Field(alias="_typ")] = Typ.ENERGIEMENGE
lokations_id: Optional[str] = None
"""Eindeutige Nummer der Marktlokation bzw. der Messlokation, zu der die Energiemenge gehört"""
# todo: add validator such that only mess- or marktlokations IDs are accepted + cross check with lokationstyp
lokationstyp: Optional["Lokationstyp"] = None
"""Gibt an, ob es sich um eine Markt- oder Messlokation handelt"""

Expand Down
34 changes: 34 additions & 0 deletions src/bo4e/com/lastprofil.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
Contains class Lastprofil
"""

from typing import Optional

from bo4e.com.com import COM
from bo4e.com.tagesparameter import Tagesparameter
from bo4e.enum.profilart import Profilart
from bo4e.enum.profilverfahren import Profilverfahren


class Lastprofil(COM):
"""
Informationen zum Lastprofil.

.. raw:: html

<object data="../_static/images/bo4e/com/Lastprofil.svg" type="image/svg+xml"></object>

.. HINT::
`Lastprofil JSON Schema <https://json-schema.app/view/%23?url=https://raw.githubusercontent.com/Hochfrequenz/BO4E-Schemas/{__gh_version__}/src/bo4e_schemas/com/Lastprofil.json>`_

"""

bezeichnung: Optional[str] = None #: Bezeichnung des Profils, durch DVGW bzw. den Netzbetreiber vergeben (z.B. H0)
profilschar: Optional[str] = (
None #: Bezeichnung der Profilschar, durch DVGW bzw. den Netzbetreiber vergeben (z.B. H0)
)
verfahren: Optional[Profilverfahren] = None #: Verfahren des Profils (analytisch oder synthetisch)
ist_einspeisung: Optional[bool] = None #: Einspeiseprofil: True/False
tagesparameter: Optional[Tagesparameter] = None #: Klimazone / Temperaturmessstelle
profilart: Optional[Profilart] = None #: Profilart des Lastprofils, e.g. ART_STANDARDLASTPROFIL
herausgeber: Optional[str] = None #: Herausgeber des Lastprofil-Codes, e.g. BDEW
19 changes: 19 additions & 0 deletions src/bo4e/com/tagesparameter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
Contains tagesparameter class
"""

from typing import Optional

from bo4e.com.com import COM


class Tagesparameter(COM):
"""
Speichert Informationen zu einer tagesparameter abhängigen Messstelle. z.B. den Namen einer Klimazone oder die ID
der Wetterstation für die Temperaturmessstelle
"""

klimazone: Optional[str] = None #: Qualifier der Klimazone, e.g. 7624q
temperaturmessstelle: Optional[str] = None #: Qualifier der Temperaturmessstelle, e.g. 1234x
dienstanbieter: Optional[str] = None #: Dienstanbieter (bei Temperaturmessstellen), e.g. ZT1
herausgeber: Optional[str] = None #: Herausgeber des Lastprofil-Codes, e.g. BDEW
11 changes: 11 additions & 0 deletions src/bo4e/enum/abwicklungsmodell.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum


class Abwicklungsmodell(StrEnum):
"""
Art des Abwicklungsmodell (E-Mob)
"""

MODELL_1 = "MODELL_1" #: Modell 1 "Bilanzierung an der Marktlokation"
MODELL_2 = "MODELL_2" #: Modell 2 "Bilanzierung im Bilanzierungsgebiet (BG) des LPB
14 changes: 14 additions & 0 deletions src/bo4e/enum/aggregationsverantwortung.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Contains class Aggregationsverantwortungs
"""

from bo4e.enum.strenum import StrEnum


class Aggregationsverantwortung(StrEnum):
"""
Mögliche Qualifier für die Aggregationsverantwortung
"""

UENB = "UENB" #: Übertragungsnetzbetreiber
VNB = "VNB" #: Verteilnetzbetreiber
18 changes: 18 additions & 0 deletions src/bo4e/enum/fallgruppenzuordnung.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
Contains Enums for Fallgruppenzuordnung
"""

from bo4e.enum.strenum import StrEnum


class Fallgruppenzuordnung(StrEnum):
"""
Fallgruppenzuordnung nach edi@energy
"""

GABI_RLM_MIT_TAGESBAND = "GABI_RLM_MIT_TAGESBAND"
"""RLM mit Tagesband"""
GABI_RLM_OHNE_TAGESBAND = "GABI_RLM_OHNE_TAGESBAND"
"""RLM ohne Tagesband"""
GABI_RLM_IM_NOMINIERUNGSERSATZVERFAHREN = "GABI_RLM_IM_NOMINIERUNGSERSATZVERFAHREN"
"""RLM im Nominierungsersatzverfahren"""
19 changes: 19 additions & 0 deletions src/bo4e/enum/profilart.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
Contains Enums for Profilart.
"""

from bo4e.enum.strenum import StrEnum


class Profilart(StrEnum):
"""
Profilart: temperaturabh./Standardlastprofil.
"""

ART_STANDARDLASTPROFIL = "ART_STANDARDLASTPROFIL" #: ART_STANDARDLASTPROFIL, Z02
ART_TAGESPARAMETERABHAENGIGES_LASTPROFIL = "ART_TAGESPARAMETERABHAENGIGES_LASTPROFIL"
"""ART_TAGESPARAMETERABHAENGIGES_LASTPROFIL, Z03"""
ART_LASTPROFIL = "ART_LASTPROFIL" #: ART_LASTPROFIL, Z12
ART_STANDARDEINSPEISEPROFIL = "ART_STANDARDEINSPEISEPROFIL" #: ART_STANDARDEINSPEISEPROFIL, Z04
ART_TAGESPARAMETERABHAENGIGES_EINSPEISEPROFIL = "ART_TAGESPARAMETERABHAENGIGES_EINSPEISEPROFIL"
#: ART_TAGESPARAMETERABHAENGIGES_EINSPEISEPROFIL, Z05
14 changes: 14 additions & 0 deletions src/bo4e/enum/profiltyp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Contains Enums for Profiltyp.
"""

from bo4e.enum.strenum import StrEnum


class Profiltyp(StrEnum):
"""
Profiltyp (temperaturabhängig / Standardlastprofil).
"""

SLP_SEP = "SLP_SEP" #: SLP/SEP
TLP_TEP = "TLP_TEP" #: TLP/TEP
14 changes: 14 additions & 0 deletions src/bo4e/enum/profilverfahren.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Contains Enums for Profilverfahren.
"""

from bo4e.enum.strenum import StrEnum


class Profilverfahren(StrEnum):
"""
Profilverfahren: synthetisch/ analytisch.
"""

SYNTHETISCH = "SYNTHETISCH" #: SLP
ANALYTISCH = "ANALYTISCH" #: ALP
14 changes: 14 additions & 0 deletions src/bo4e/enum/prognosegrundlage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Contains Enums for Prognosegrundlage.
"""

from bo4e.enum.strenum import StrEnum


class Prognosegrundlage(StrEnum):
"""
Prognosegrundlage (WERTE, PROFILE).
"""

WERTE = "WERTE" #: Prognose auf Basis von Werten
PROFILE = "PROFILE" #: Prognose auf Basis von Profilen
1 change: 1 addition & 0 deletions src/bo4e/enum/typ.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Typ(StrEnum):

ANGEBOT = "ANGEBOT"
AUSSCHREIBUNG = "AUSSCHREIBUNG"
BILANZIERUNG = "BILANZIERUNG"
BUENDELVERTRAG = "BUENDELVERTRAG"
ENERGIEMENGE = "ENERGIEMENGE"
FREMDKOSTEN = "FREMDKOSTEN"
Expand Down
Loading
Loading