Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:openego/eDisGo into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
khelfen committed Oct 14, 2022
2 parents 078da78 + 4089360 commit b83d6be
Show file tree
Hide file tree
Showing 15 changed files with 1,836 additions and 160 deletions.
8 changes: 8 additions & 0 deletions doc/api/edisgo.flex_opt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ edisgo.flex\_opt.exceptions module
:undoc-members:
:show-inheritance:

edisgo.flex\_opt.heat_pump_operation module
---------------------------------------------

.. automodule:: edisgo.flex_opt.heat_pump_operation
:members:
:undoc-members:
:show-inheritance:

edisgo.flex\_opt.q\_control module
-----------------------------------

Expand Down
8 changes: 8 additions & 0 deletions doc/api/edisgo.network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ edisgo.network.grids module
:undoc-members:
:show-inheritance:

edisgo.network.heat module
---------------------------

.. automodule:: edisgo.network.heat
:members:
:undoc-members:
:show-inheritance:

edisgo.network.results module
-----------------------------

Expand Down
2 changes: 1 addition & 1 deletion doc/dev_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Activate the newly created environment and install the pre-commit hooks with:
conda activate eDisGo_env_dev
pre-commit install # install pre-commit hooks
This will install eDisGo with all it's dependencies.
This will install eDisGo with all its dependencies.

Installation using MacOS
~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
85 changes: 84 additions & 1 deletion doc/usage_details.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ The class :class:`~.network.electromobility.Electromobility` holds data on charg
processes (how long cars are parking at a charging station, how much they need to charge,
etc.) necessary to apply different charging strategies, as well as information on
potential charging sites and integrated charging parks.
The class :class:`~.network.heat.HeatPump` holds data on
heat pump COP, heat demand to be served by the heat pumps and thermal storage units, which is
necessary to determine flexibility potential of heat pumps.
Results data holding results e.g. from the power flow analysis and grid
expansion is stored in the :class:`~.network.results.Results` class.
Configuration data from the config files (see :ref:`default_configs`) is stored
Expand All @@ -44,6 +47,9 @@ code examples `edisgo` constitues an :class:`~.EDisGo` object.
# Access Electromobility data container object
edisgo.electromobility
# Access HeatPump data container object
edisgo.heat_pump
# Access Results data container object
edisgo.results
Expand Down Expand Up @@ -251,7 +257,8 @@ by using the function :attr:`~.edisgo.EDisGo.set_timeindex`.
Optimised
..........

Use this mode to optimise flexibilities, e.g. charging of electric vehicles.
Use this mode to optimise flexibilities, e.g. charging of electric vehicles or
dispatch of heat pumps with thermal storage units.

.. todo:: Add more details once the optimisation is merged.

Expand All @@ -269,6 +276,18 @@ The charging strategies can be invoked as follows:
See function docstring of :attr:`~.edisgo.EDisGo.apply_charging_strategy` or
documentation section :ref:`charging_strategies-label` for more information.

Further, there is currently one operating strategy for heat pumps implemented where
the heat demand is directly served by the heat pump without buffering heat using a
thermal storage.
The operating strategy can be invoked as follows:

.. code-block:: python
edisgo.apply_heat_pump_operating_strategy()
See function docstring of :attr:`~.edisgo.EDisGo.apply_heat_pump_operating_strategy`
for more information.

Reactive power time series
^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -430,6 +449,70 @@ the example jupyter notebook
Further information on the electromobility integration methodology and the charging
strategies can be found in section :ref:`electromobility-integration-label`.

Heat pumps
-----------------

Heat pump data including the heat pump's time variant COP, heat demand to be served
as well as thermal storage capacities are stored in the
:class:`~.network.heat.HeatPump` object.

You can access these data as follows:

.. code-block:: python
# Access DataFrame with COP time series
edisgo.heat_pump.cop_df
# Access DataFrame with heat demand time series
edisgo.heat_pump.heat_demand_df
# Access DataFrame with information on thermal storage capacities
edisgo.heat_pump.thermal_storage_units_df
The heat pumps themselves are also stored in the :class:`~.network.topology.Topology`
object and can be accessed as follows:

.. code-block:: python
# Access DataFrame with all integrated heat pumps
edisgo.topology.loads_df[edisgo.topology.loads_df.type == "heat_pump"]
Here is a small example on how to integrate a heat pump and apply an
operating strategy.

.. code-block:: python
import pandas as pd
from edisgo import EDisGo
# Set up the EDisGo object
timeindex = pd.date_range("1/1/2011", periods=4, freq="H")
edisgo = EDisGo(
ding0_grid=dingo_grid_path,
timeindex=timeindex
)
# Set up dummy heat pump data
bus = edisgo.topology.loads_df[
edisgo.topology.loads_df.sector == "residential"].bus[0]
heat_pump_params = {"bus": bus, "p_set": 0.015, "type": "heat_pump"}
cop = pd.Series([1.0, 2.0, 1.5, 3.4], index=timeindex)
heat_demand = pd.Series([0.01, 0.03, 0.015, 0.0], index=timeindex)
# Add heat pump to grid topology
hp_name = edisgo.add_component("load", **heat_pump_params)
# Add heat pump COP and heat demand to be served
edisgo.heat_pump.set_cop(edisgo, cop.to_frame(name=hp_name))
edisgo.heat_pump.set_heat_demand(edisgo, heat_demand.to_frame(name=hp_name))
# Apply operating strategy - this sets the heat pump's dispatch time series
# in timeseries.loads_active_power
edisgo.apply_heat_pump_operating_strategy()
hp_dispatch = edisgo.timeseries.loads_active_power.loc[:, hp_name]
hp_dispatch.plot()
Battery storage systems
------------------------
Expand Down

0 comments on commit b83d6be

Please sign in to comment.