Skip to content

Commit

Permalink
Merge pull request #853 from openego/fixes/#852-batteries-at-substations
Browse files Browse the repository at this point in the history
Add extendable battries only to buses representing a substation
  • Loading branch information
ClaraBuettner committed Aug 10, 2022
2 parents 3d83ed4 + 38f6942 commit ad7fe55
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,8 @@ Bug Fixes
`#849 <https://github.com/openego/eGon-data/issues/849>`_
* Fix final demand of heat demand timeseries
`#781 <https://github.com/openego/eGon-data/issues/781>`_
* Add extendable batteries only to buses at substations
`#852 <https://github.com/openego/eGon-data/issues/852>`_

.. _PR #692: https://github.com/openego/eGon-data/pull/692
.. _#343: https://github.com/openego/eGon-data/issues/343
Expand Down
6 changes: 6 additions & 0 deletions src/egon/data/datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,12 @@ storage_etrago:
bus:
table: 'egon_etrago_bus'
schema: 'grid'
ehv-substation:
table: 'egon_ehv_substation'
schema: 'grid'
hv-substation:
table: 'egon_hvmv_substation'
schema: 'grid'
targets:
storage:
schema: 'grid'
Expand Down
11 changes: 6 additions & 5 deletions src/egon/data/datasets/storages_etrago/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class StorageEtrago(Dataset):
def __init__(self, dependencies):
super().__init__(
name="StorageEtrago",
version="0.0.6",
version="0.0.7",
dependencies=dependencies,
tasks=(insert_PHES, extendable_batteries),
)
Expand Down Expand Up @@ -104,10 +104,11 @@ def extendable_batteries_per_scenario(scenario):
{sources['bus']['table']}
WHERE carrier = 'AC'
AND scn_name = '{scenario}'
AND bus_id IN (SELECT bus_id
FROM {sources['bus']['schema']}.{sources['bus']['table']}
WHERE scn_name = '{scenario}'
AND country = 'DE')
AND (bus_id IN (SELECT bus_id
FROM {sources['ehv-substation']['schema']}.{sources['ehv-substation']['table']})
OR bus_id IN (SELECT bus_id
FROM {sources['hv-substation']['schema']}.{sources['hv-substation']['table']}
))
"""
)

Expand Down

0 comments on commit ad7fe55

Please sign in to comment.