Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heat pump active power was determined regardless its maximum power. N… #428

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

MoritzSchloesser
Copy link
Collaborator

@MoritzSchloesser MoritzSchloesser commented Jan 23, 2025

…ow it is limited to the max active power and a warning given if done so.

Description

Heat pump active power was determined regardless its maximum power. Now it is limited to the max active power and a warning given if done so.

Fixes #383 (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • New and adjusted code is formatted using the pre-commit hooks
  • New and adjusted code includes type hinting now
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The Read the Docs documentation is compiling correctly
  • If new packages are needed, I added them the setup.py, and if needed the rtd_requirements.txt, the eDisGo_env.yml and the eDisGo_env_dev.yml.
  • I have added new features to the corresponding whatsnew file

…ow it is limited to the max active power and a warning given if done so.
edisgo/edisgo.py Outdated
@@ -55,6 +55,7 @@
from edisgo.tools.geo import find_nearest_bus
from edisgo.tools.spatial_complexity_reduction import spatial_complexity_reduction
from edisgo.tools.tools import determine_grid_integration_voltage_level
from edisgo.io.db import engine as toep_engine
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove second import

missing = set(heat_pump_names) - set(edisgo_obj.topology.loads_df.index)
if missing:
logger.warning(
f"The following heat pumps are are in the heat pump class but not yet "
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove double "are"

@@ -28,3 +28,4 @@ Changes
* Move function to assign feeder to Topology class and add methods to the Grid class to get information on the feeders `#360 <https://github.com/openego/eDisGo/pull/360>`_
* Added a storage operation strategy where the storage is charged when PV feed-in is higher than electricity demand of the household and discharged when electricity demand exceeds PV generation `#386 <https://github.com/openego/eDisGo/pull/386>`_
* Added an estimation of the voltage deviation over a cable when selecting a suitable cable to connect a new component `#411 <https://github.com/openego/eDisGo/pull/411>`_
* Added clipping of heat pump electrical power at its maximum value #428 <https://github.com/openego/eDisGo/pull/428>
Copy link
Collaborator

Choose a reason for hiding this comment

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

this needs to be correctly formatted

logger.warning(
f"The following heat pumps are are in the heat pump class but not yet "
f"integrated into the topology class. Therefore, their maximum capacity "
f"cannot be considered in the operating strategies. {missing=}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a note similar to "For better results, please integrate these heat pumps into the topology before running this function.".

)
ts[in_topology] = ts_clipped[in_topology]

clipped = ts.eq(ts_prev).all()[lambda x: ~x].index
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be more readable py using pandas.series.ne

@@ -149,6 +149,7 @@ def _get_central_heat_pump_or_resistive_heaters(carrier):
<= edisgo_object.config["grid_connection"]["upper_limit_voltage_level_4"],
)
df = pd.read_sql(query.statement, engine, index_col=None)
# Alternativ Code einfügen, falls Tabelle leer ist
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this temp comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Uncontrolled heat pump operation strategy does not consider installed heat pump capacity
2 participants