Skip to content

Commit

Permalink
Merge pull request #1061 from openego/features/#822-low-flex-scenario
Browse files Browse the repository at this point in the history
Features/#822 low flex scenario
  • Loading branch information
ClaraBuettner committed Feb 2, 2023
2 parents 7584924 + 5338c72 commit fa5ee58
Show file tree
Hide file tree
Showing 4 changed files with 454 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ Added
`#1051 <https://github.com/openego/eGon-data/issues/1051>`_
* Heat pump desaggregation to buildings
`PR #903 <https://github.com/openego/eGon-data/pull/903>`_
* Add low flex scenario 'eGon2035_lowflex'
`#822 <https://github.com/openego/eGon-data/issues/822>`_

.. _PR #159: https://github.com/openego/eGon-data/pull/159
.. _PR #703: https://github.com/openego/eGon-data/pull/703
Expand Down
14 changes: 14 additions & 0 deletions src/egon/data/airflow/dags/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
from egon.data.datasets.industrial_sites import MergeIndustrialSites
from egon.data.datasets.industry import IndustrialDemandCurves
from egon.data.datasets.loadarea import LoadArea, OsmLanduse
from egon.data.datasets.low_flex_scenario import LowFlexScenario
from egon.data.datasets.mastr import mastr_data_setup
from egon.data.datasets.mv_grid_districts import mv_grid_districts_setup
from egon.data.datasets.osm import OpenStreetMap
Expand Down Expand Up @@ -662,6 +663,18 @@
]
)

# Include low flex scenario(s)
low_flex_scenario = LowFlexScenario(
dependencies=[
storage_etrago,
hts_etrago_table,
fill_etrago_generators,
household_electricity_demand_annual,
cts_demand_buildings,
emobility_mit,
]
)

# ########## Keep this dataset at the end
# Sanity Checks
sanity_checks = SanityChecks(
Expand All @@ -672,5 +685,6 @@
household_electricity_demand_annual,
cts_demand_buildings,
emobility_mit,
low_flex_scenario,
]
)
32 changes: 32 additions & 0 deletions src/egon/data/datasets/low_flex_scenario/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""The central module to create low flex scenarios
"""
from airflow.operators.postgres_operator import PostgresOperator
from sqlalchemy.ext.declarative import declarative_base
import importlib_resources as resources

from egon.data.datasets import Dataset


Base = declarative_base()


class LowFlexScenario(Dataset):
def __init__(self, dependencies):
super().__init__(
name="low_flex_scenario",
version="0.0.0",
dependencies=dependencies,
tasks=(
{
PostgresOperator(
task_id="low_flex_eGon2035",
sql=resources.read_text(
__name__, "low_flex_eGon2035.sql"
),
postgres_conn_id="egon_data",
autocommit=True,
),
},
),
)

0 comments on commit fa5ee58

Please sign in to comment.