Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
47b7175
Add new methods
uvchik Dec 9, 2021
b9d0c0b
Add usage for electrical profiles in the docs
uvchik Dec 9, 2021
1e81fa2
Ignore long line with url in pep checker
uvchik Dec 9, 2021
919beb0
Fix pandas FutureWarning
uvchik Dec 9, 2021
d2fc030
Revise methods of electrical profile to make usage clearer
uvchik Dec 9, 2021
b7fa53f
Update tox checks using twine
uvchik Dec 9, 2021
0dc2fad
Add tests for tools and elecrical profiles
uvchik Dec 9, 2021
b4bcd92
Fix isort issue
uvchik Dec 9, 2021
59f1839
Add holidays as list
uvchik Dec 9, 2021
ee2691d
Make attributes protected
uvchik Dec 10, 2021
fa80ab9
Update seasons instead of replacing them
uvchik Dec 10, 2021
2eb671c
Add test for changed season periods
uvchik Dec 10, 2021
9ff40fd
Add warning in docstring
uvchik Dec 10, 2021
a4ca949
Change equation to latex and add axis
uvchik Dec 10, 2021
734b3dd
Add sources to docs
uvchik Dec 15, 2021
def0e86
Merge pull request #45 from oemof/features/revise-methods-for-elec-slp
uvchik Apr 5, 2022
c088f14
Merge branch 'dev' of github.com:oemof/demandlib into v0.2dev
uvchik Apr 5, 2022
477c92e
Add lpagg code to demanlib
uvchik Apr 6, 2022
4c63562
Add example for VDI profiles
uvchik Apr 11, 2022
73480cd
Fix grammar
uvchik Apr 11, 2022
6109b41
Add extra requirements for examples
uvchik Apr 11, 2022
d512612
Use black style
uvchik Apr 11, 2022
ea24008
Revise region module
uvchik Apr 11, 2022
7b258b8
Make it possible to import Region from demandlib.vdi
uvchik Apr 11, 2022
ab21b5b
Add function to find TRY region by coordinates
uvchik Apr 11, 2022
33a5964
Add geometry as extra requirements
uvchik Apr 11, 2022
4160146
Add docstrings
uvchik Apr 11, 2022
a3660ae
Remove binary file from repository
uvchik Apr 12, 2022
3785bc9
Do not read unused columns
uvchik Apr 12, 2022
b11468e
Fix style issues
uvchik Apr 12, 2022
4eeed80
Fix style issues
uvchik Apr 12, 2022
ac2eb6c
Use new black style
uvchik Apr 12, 2022
d9e0d8d
Use temperature limits from config file
uvchik Apr 13, 2022
31640f7
Add missing config import
uvchik Apr 13, 2022
00e1114
Fix time stamp to left index
uvchik Apr 13, 2022
2e205c9
Fix filepath for TRY data
uvchik Apr 13, 2022
f5a6e78
Remove blank line
uvchik Apr 13, 2022
5d75001
Make VDI header clearer
uvchik May 6, 2022
7cccf52
Temperature limit is part of the house data
uvchik Jun 21, 2022
a54ca63
Update src/demandlib/vdi/regions.py
uvchik Jul 12, 2022
652ef05
Fix deprecated warning
Sep 6, 2022
b3fd0c4
Make it possible to fetch weather data by knowing the TRY region
Sep 6, 2022
149dafd
Merge branch 'dev' of https://github.com/oemof/demandlib into feature…
uvchik Jul 30, 2024
9b28071
Develop towards 0.2.2
p-snft Aug 6, 2024
a68d124
Allow retrieving only warm water profile
jnettels Feb 3, 2025
2cd4c50
Fix 'incompatible dtype' FutureWarning in pandas 2.2.1
jnettels Feb 3, 2025
4649681
Fix code style in elec_slp.py
jnettels Feb 3, 2025
1d12c19
Fix code style in tools.py
jnettels Feb 3, 2025
5871813
Include test for new attribute ww_only
jnettels Feb 4, 2025
61a222c
Fix code style issues
jnettels Feb 4, 2025
b4f7e53
Fix code style issues
jnettels Feb 4, 2025
d85bdcf
Merge pull request #72 from oemof/fix/pandas_future_warning
p-snft Feb 14, 2025
4672b19
Merge branch 'dev' into features/ww_only_from_bdew
jnettels Feb 19, 2025
bbc3a0b
Convert ww_only test class to function
jnettels Feb 19, 2025
5ed40cd
Add lpagg code to demanlib
uvchik Apr 6, 2022
96f031c
Add example for VDI profiles
uvchik Apr 11, 2022
d44f5f4
Use black style
uvchik Apr 11, 2022
c604294
Revise region module
uvchik Apr 11, 2022
a82e402
Make it possible to import Region from demandlib.vdi
uvchik Apr 11, 2022
b48bf79
Add function to find TRY region by coordinates
uvchik Apr 11, 2022
0e5a28d
Add geometry as extra requirements
jnettels Feb 5, 2025
606c3de
Add docstrings
uvchik Apr 11, 2022
7372086
Remove binary file from repository
uvchik Apr 12, 2022
aee15dd
Do not read unused columns
uvchik Apr 12, 2022
4350a56
Fix style issues
uvchik Apr 12, 2022
e787169
Fix style issues
uvchik Apr 12, 2022
a604b30
Use temperature limits from config file
uvchik Apr 13, 2022
c966852
Add missing config import
uvchik Apr 13, 2022
a65a6f1
Fix time stamp to left index
uvchik Apr 13, 2022
1de89e4
Fix filepath for TRY data
uvchik Apr 13, 2022
7be063d
Remove blank line
uvchik Apr 13, 2022
8146b2d
Make VDI header clearer
uvchik May 6, 2022
ed37770
Temperature limit is part of the house data
uvchik Jun 21, 2022
058520d
Update src/demandlib/vdi/regions.py
uvchik Jul 12, 2022
23c7376
Make it possible to fetch weather data by knowing the TRY region
Sep 6, 2022
dc7bf27
Remove unused files
jnettels Feb 5, 2025
a1f247f
Allow usage of custom weather file paths
jnettels Jun 7, 2023
afa4003
Allow house name to be other type than a string
jnettels Jun 13, 2023
eb28cc9
Fix several deprecation and future warnings from pandas 2.2
jnettels Mar 7, 2024
4869afe
Add option 'zero_summer_heat_demand'
jnettels Jan 15, 2025
e203fa4
Clean code with flake8 and Black, fix deprecations
jnettels Feb 6, 2025
5914b5f
Improve handling of ImportError
jnettels Feb 12, 2025
d21539c
Allow usage of fixed season time intervals
jnettels Feb 12, 2025
6212a2f
Allow if-else to be covered by test
jnettels Feb 12, 2025
5c5194d
Add new test file for VDI4655 profile generation
jnettels Feb 12, 2025
804cf47
Improve docstrings for vdi script files
jnettels Feb 13, 2025
ebbe8b0
Add new page for VDI4655 to docs
jnettels Feb 13, 2025
472063e
Apply black code formatting
jnettels Feb 19, 2025
afe1729
Merge pull request #74 from oemof/features/ww_only_from_bdew
p-snft Feb 24, 2025
3f29495
Fix small issues
uvchik Feb 25, 2025
0216661
Merge branch 'dev' of https://github.com/oemof/demandlib into feature…
uvchik Feb 25, 2025
15262e8
Add manifest
uvchik Feb 25, 2025
98206f6
Fix manifest
uvchik Feb 25, 2025
bb6aff4
Fix manifest
uvchik Feb 25, 2025
68cae41
Fix pytest warnings
uvchik Feb 25, 2025
f9dacec
Fix black issues
uvchik Feb 25, 2025
118381f
Fix manifest
uvchik Feb 25, 2025
ec1fb2a
Remove Python 3.9 and add 3.12 for tests
uvchik Feb 25, 2025
166a4af
Fix github actions
uvchik Feb 25, 2025
2288c1f
Extract weather from class
uvchik Feb 26, 2025
aba3ef8
Add config tests
uvchik Feb 26, 2025
6ba1252
Automatically get weather data if no data is given
uvchik Feb 26, 2025
6a3e41a
Fix black issues
uvchik Feb 27, 2025
80082aa
Merge branch 'features/add-vdi-from-lpagg-2' of https://github.com/oe…
uvchik Feb 27, 2025
2482d88
Add test for custom weather
uvchik Feb 27, 2025
8625ad1
Introduce climate object
uvchik Feb 27, 2025
d692423
Fix black issue
uvchik Feb 27, 2025
96214a5
Merge pull request #50 from oemof/features/add-vdi-from-lpagg
uvchik Mar 3, 2025
db058d4
Add raw BDEW profiles
p-snft Apr 4, 2025
ce389f5
Update shapely impors
p-snft Apr 4, 2025
7d154b6
Split dynamisation_function function from ElecSlp class
p-snft Apr 4, 2025
da3139e
Set bdew datapath outside ElecSlp class
p-snft Apr 4, 2025
1c2e3cb
Merge branch 'revision/individual_eslp_classes' into feature/bdew-loa…
p-snft Apr 5, 2025
1aa34c3
Add stub for BDEW25 profiles
p-snft Apr 7, 2025
f77f7f0
Update pyroject.toml
p-snft Apr 7, 2025
c00d630
Delete setup.py
p-snft Apr 7, 2025
971f0b4
Fix intent
p-snft Apr 7, 2025
ea4bbda
Merge branch 'dev' into feature/bdew-load-profiles-2025
p-snft Apr 7, 2025
65c203d
Start structuring SLP25 generation along SLP00 generation
p-snft Apr 7, 2025
dc97710
Finish static versions of SLP25
p-snft Apr 7, 2025
b5f5372
Improve imports
p-snft Apr 7, 2025
4581830
Add dynamic BDEW25 profiles
p-snft Apr 7, 2025
6258eb0
Fix PV25 file naming
p-snft Apr 7, 2025
ce065cf
Define BDEW25Profile init before other class members
p-snft Apr 7, 2025
69f767b
Fix BDEW25 scaling
p-snft Apr 7, 2025
cb68b4d
Add short BDEW25 example
p-snft Apr 7, 2025
f986772
Test resolution of BDEW25Profile index
p-snft Apr 7, 2025
605f9fb
Adhere to Black
p-snft Apr 7, 2025
f4f65bf
Add Holiday handling to SLP25
p-snft Apr 8, 2025
c34bd67
Add docstrings for and allow resampling of SLP25
p-snft Apr 8, 2025
d0737a6
Show different resolutions in SLP25 example
p-snft Apr 8, 2025
9f3e06b
Update to stable Pandas API
p-snft Apr 8, 2025
056724e
Fix typo in docstring
p-snft Apr 8, 2025
a742657
Add tests for 2025 BDEW SLPs
p-snft Apr 8, 2025
0ae7e22
Adhere to Black
p-snft Apr 8, 2025
1b036fb
Test abstract BDEW25 profiles cannot be instanciated
p-snft Apr 8, 2025
6c42552
Do not resample SLP25 if resolution is correct
p-snft Apr 8, 2025
3af49cd
Merge pull request #78 from oemof/feature/bdew-load-profiles-2025
p-snft Apr 9, 2025
98dffc7
Add SLP25 to changelog
p-snft Apr 9, 2025
b60561c
Update Python version for RTD
p-snft Apr 9, 2025
2a16cdc
Improve SLP25 docstring
p-snft Apr 9, 2025
b0d2a3a
Change version to 0.2.2
p-snft Apr 9, 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
2 changes: 1 addition & 1 deletion .github/workflows/tox_pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.10"
sphinx:
configuration: docs/conf.py
formats: all
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
Changelog
=========

v0.2.2 (YYYY-MM-DD)
+++++++++++++++++++++++++

New features
############
* Added Electricity standard load profiles as released by the BDEW in 2025.

Bug fixes
#########

Other changes
#############


v0.2.1 (2024-08-06)
+++++++++++++++++++++++++

Expand Down
23 changes: 23 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
include setup.py

include *.txt
include *.yml
recursive-include executable *.ico
recursive-include executable *.py
requirements.txt
recursive-include executable *.spec

exclude tests/.coverage
global-exclude *.xml

global-exclude *.py[cod] __pycache__/* *.so *.dylib

# added by check-manifest
include *.py

exclude setup.py

# added by check-manifest
include *.in

exclude MANIFEST.in
34 changes: 32 additions & 2 deletions docs/bdew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ The parameter ``building_class`` (German: Baualtersklasse) can assume values in
Usage
+++++

.. code-block:: python

from demandlib import bdew

...

Electrical Profiles
~~~~~~~~~~~~~~~~~~~

Expand All @@ -74,7 +80,7 @@ Description
The electrical profiles are the standard load profiles from BDEW. All profiles
have a resolution of 15 minutes. They are based on measurements in the German
electricity sector. There is a dynamic function (h0_dyn) for the houshold (h0)
profile that better takes the seasonal variance into account.
profile that better takes the seasonal variance into account [`BDEW <https://www.bdew.de/energie/standardlastprofile-strom/>`_].

.. math::

Expand All @@ -85,7 +91,7 @@ With `t` the day of the year as a decimal number.
The following profile types are available.
Be aware that the types in Python code are strings in **lowercase**.

.. csv-table:: German (original)
.. csv-table:: German (original) [`Wikipedia <https://de.wikipedia.org/wiki/Standardlastprofil>`_]
:header: Typ,Beschreibung,Erläuterung
:widths: 10, 40, 50

Expand Down Expand Up @@ -130,3 +136,27 @@ Usage
.. code-block:: python

from demandlib import bdew
e_slp = bdew.ElecSlp(year=2020)

# get all available types
print(e_slp.get_profiles().columns)

# get the "h0" and "g0" profile
profiles = e_slp.get_profiles("h0", "g0")

# get scaled profiles
scaled_profiles = e_slp.get_scaled_profiles({"h0": 3000, "g0": 5000})

# get scaled profiles with power values instead of energy values
# a conversion_factor of 4 will convert Wh, kWh etc. to W, kW
e_slp.get_scaled_power_profiles({"h0": 3000, "g0": 5000}, conversion_factor=4)

# add holidays, holidays are treated as Sundays
holidays = {
datetime.date(2010, 1, 1): "New year",
datetime.date(2010, 10, 3): "Day of German Unity",
}
e_slp = bdew.ElecSlp(year=2010, holidays=holidays)

# holiday dictionaries can be created using workalendar
# https://github.com/workalendar/workalendar
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Contents
readme
installation
bdew
vdi4655
further_profiles
reference/index
contributing
Expand Down
12 changes: 10 additions & 2 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@ Reference
:undoc-members:
:show-inheritance:


.. automodule:: demandlib.bdew.heat_building
:members:
:undoc-members:
:show-inheritance:


.. automodule:: demandlib.particular_profiles
:members:
:undoc-members:
:show-inheritance:

.. automodule:: demandlib.vdi.regions
:members:
:undoc-members:
:show-inheritance:

.. automodule:: demandlib.vdi.dwd_try
:members:
:undoc-members:
:show-inheritance:
93 changes: 93 additions & 0 deletions docs/vdi4655.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
=====================
VDI4655 Load Profiles
=====================

Overview
--------

The VDI 4655 module implements load profile generation for residential buildings
according to the German engineering standard VDI 4655. Heat and power demand
profiles are generated based on typical days and building characteristics.

Key Features:

* Generates heating, hot water and power demand profiles for residential buildings
* Supports both single-family (EFH) and multi-family houses (MFH)
* Considers weather data, based on the building location in Germany
* Accounts for seasonal variations and holidays
* Customizable temperature limits for season definitions
* Adjustable temporal resolution (e.g., hourly, 15-minute intervals)


Example Usage
-------------

Here's a basic example of how to use the VDI 4655 module::

from demandlib import vdi

# Define houses
houses = [
{
"name": "EFH_1",
"house_type": "EFH",
"N_Pers": 3,
"N_WE": 1,
"Q_Heiz_a": 6000,
"Q_TWW_a": 1500,
"W_a": 5250,
}
]

# Create region
region = vdi.Region(
2017,
try_region=4,
houses=houses,
resample_rule="1h"
)

# Generate load curves
load_curves = region.get_load_curve_houses()

House Parameters
----------------

Required parameters for each house:

* ``name``: Unique identifier for the house
* ``house_type``: Either "EFH" (single-family) or "MFH" (multi-family)
* ``N_Pers``: Number of persons, up to 12 (relevant for EFH)
* ``N_WE``: Number of apartments, up to 40 (relevant for MFH)
* ``Q_Heiz_a``: Annual heating demand in kWh
* ``Q_TWW_a``: Annual hot water demand in kWh
* ``W_a``: Annual electricity demand in kWh

Optional parameters:

* ``summer_temperature_limit``: Temperature threshold for summer season (default: 15°C)
* ``winter_temperature_limit``: Temperature threshold for winter season (default: 5°C)

Weather Data
------------

The module uses German test reference year (TRY) weather data by 'Deutscher Wetterdienst' (DWD)
for determining the daily temperature and cloud coverage. You can:

* Use the weather data from one of the 15 TRY regions by DWD from 2010

* Specify a TRY region number (``try_region`` parameter), or

* Use geographical coordinates to determine the TRY region (requires geopandas)

* Provide your own weather file (``file_weather`` parameter), adhering to the standard
of the TRY weather data published in 2016 by DWD (available at https://kunden.dwd.de/obt/)

Further Reading
---------------

For more details about the VDI 4655 standard, refer to:

* VDI 4655: Reference load profiles of single-family and multi-family houses for the use of CHP systems
* May 2008 (ICS 91.140.01)
* Verein Deutscher Ingenieure e.V.
50 changes: 50 additions & 0 deletions examples/bdew_slp25.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
"""
SPDX-FileCopyrightText: Deutsches Zentrum für Luft- und Raumfahrt
SPDX-FileCopyrightText: Patrik Schönfeldt


SPDX-License-Identifier: MIT
"""

import datetime

import matplotlib.pyplot as plt
import pandas as pd


from demandlib import bdew

index15m = pd.date_range(
start="2020-01-01 00:00",
end="2020-01-31 23:45",
freq="15min",
)
index1m = pd.date_range(
start="2020-01-01 00:00",
end="2020-01-31 23:45",
freq="1min",
)
index3h = pd.date_range(
start="2020-01-01 00:00",
end="2020-01-31 23:45",
freq="3h",
)

holidays = [
datetime.date(2020, 1, 1),
datetime.date(2020, 1, 2),
datetime.date(2020, 1, 3),
datetime.date(2020, 1, 4),
datetime.date(2020, 1, 5),
]

h25_holidays = bdew.H25(index1m, holidays)
h25_std = bdew.H25(index15m)
h25_3h = bdew.H25(index3h)

plt.step(h25_holidays.index, h25_holidays, label="Holidays", where="post")
plt.step(h25_std.index, h25_std, label="Standard", where="post")
plt.step(h25_3h.index, h25_3h, label="Three hours", where="post")
plt.legend()

plt.show()
4 changes: 2 additions & 2 deletions examples/electricity_demand_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import demandlib.bdew as bdew
import demandlib.particular_profiles as profiles

# The following dictionary is create by "workalendar"
# The following dictionary has been created by "workalendar"
# pip3 install workalendar
# >>> from workalendar.europe import Germany
# >>> cal = Germany()
Expand Down Expand Up @@ -62,7 +62,7 @@
e_slp = bdew.ElecSlp(year, holidays=holidays)

# multiply given annual demand with timeseries
elec_demand = e_slp.get_profile(ann_el_demand_per_sector)
elec_demand = e_slp.get_scaled_power_profiles(ann_el_demand_per_sector)

# Add the slp for the industrial group
ilp = profiles.IndustrialLoadProfile(e_slp.date_time_index, holidays=holidays)
Expand Down
Loading