Skip to content

Commit

Permalink
Merge pull request #188 from rl-institut/features/#181_#184_update_sl…
Browse files Browse the repository at this point in the history
…iders_app_settings

Features/#181 #184 update sliders app settings
  • Loading branch information
nesnoj authored Aug 31, 2023
2 parents 21a9e1b + 52cf649 commit c310e39
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 38 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ and the versioning aim to respect [Semantic Versioning](http://semver.org/spec/v
- Fix clean rule
- Update raw datapackage URL
- Restrict snakemake version to v7.32.0
- Add central heat pump targets to slider
- Restrict heat pump sliders to not move under 50%

### Removed

Expand Down
7 changes: 6 additions & 1 deletion digipipe/store/datasets/app_settings/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,32 +160,37 @@ panel_settings_templates:
w_d_wp_1:
max: none
min: none
from-min: none
start: none
step: none
status_quo: none
future_scenario: none
w_d_wp_3:
max: none
min: none
from-min: none
start: none
step: none
w_d_wp_4:
max: none
min: none
from-min: none
start: none
step: none
w_d_wp_5:
max: none
min: none
from-min: none
start: none
step: none
w_z_wp_1:
max: none
min: none
from-min: none
start: none
step: none
status_quo: none
# future_scenario: none
future_scenario: none
w_v_1:
max: none
min: none
Expand Down
2 changes: 2 additions & 0 deletions digipipe/store/datasets/app_settings/create.smk
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ rule create_panel_settings:
storage_pv_roof=rules.datasets_bnetza_mastr_storage_region_create_storage_pv_roof_stats.output,

heating_structure_decentral=rules.datasets_demand_heat_region_heating_structure_hh_cts.output.heating_structure_esys_dec,
heating_structure_central=rules.datasets_demand_heat_region_heating_structure_hh_cts.output.heating_structure_esys_cen,
demand_hh_heat=get_abs_dataset_path("datasets", "demand_heat_region") / "data" / "demand_hh_heat_demand.csv",
demand_cts_heat=get_abs_dataset_path("datasets", "demand_heat_region") / "data" / "demand_cts_heat_demand.csv",
demand_ind_heat=get_abs_dataset_path("datasets", "demand_heat_region") / "data" / "demand_ind_heat_demand.csv",
Expand Down Expand Up @@ -103,6 +104,7 @@ rule create_panel_settings:
panel_settings_heat = add_heat_panel_settings(
panel_settings_heat,
heating_structure_decentral=pd.read_csv(input.heating_structure_decentral, index_col="year"),
heating_structure_central=pd.read_csv(input.heating_structure_central, index_col="year"),
demand_hh_heat=pd.read_csv(input.demand_hh_heat, index_col="municipality_id"),
demand_cts_heat=pd.read_csv(input.demand_cts_heat, index_col="municipality_id"),
demand_ind_heat=pd.read_csv(input.demand_ind_heat, index_col="municipality_id"),
Expand Down
81 changes: 45 additions & 36 deletions digipipe/store/datasets/app_settings/scripts/panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,52 +323,61 @@ def add_electricity_panel_settings(
def add_heat_panel_settings(
panel_settings: PanelSettings,
heating_structure_decentral: pd.DataFrame,
heating_structure_central: pd.DataFrame,
demand_hh_heat: pd.DataFrame,
demand_cts_heat: pd.DataFrame,
demand_ind_heat: pd.DataFrame,
) -> PanelSettings:

# Supply
heat_pump_share = heating_structure_decentral.loc[
heat_pump_share_dec = heating_structure_decentral.loc[
heating_structure_decentral.carrier == "heat_pump"
].demand_rel
heat_pump_share_cen = heating_structure_central.loc[
heating_structure_central.carrier == "heat_pump"
].demand_rel

panel_settings.update(
**dict(
w_d_wp_1=dict(
max=100,
min=0,
start=round(heat_pump_share.loc[2022] * 100),
step=5,
status_quo=round(heat_pump_share.loc[2022] * 100),
future_scenario=round(heat_pump_share.loc[2045] * 100),
),
w_d_wp_3=dict(
max=100,
min=0,
start=round(heat_pump_share.loc[2022] * 100),
step=5,
),
w_d_wp_4=dict(
max=100,
min=0,
start=round(heat_pump_share.loc[2022] * 100),
step=5,
),
w_d_wp_5=dict(
max=100,
min=0,
start=round(heat_pump_share.loc[2022] * 100),
step=5,
),
w_z_wp_1=dict(
max=100,
min=0,
start=round(heat_pump_share.loc[2022] * 100),
step=5,
status_quo=round(heat_pump_share.loc[2022] * 100),
# TODO: Insert cen heating structure targets
# future_scenario=0,
),
w_d_wp_1={
"max": 100,
"min": 0,
"from-min": 50,
"start": round(heat_pump_share_dec.loc[2022] * 100),
"step": 5,
"status_quo": round(heat_pump_share_dec.loc[2022] * 100),
"future_scenario": round(heat_pump_share_dec.loc[2045] * 100),
},
w_d_wp_3={
"max": 100,
"min": 0,
"from-min": 50,
"start": round(heat_pump_share_dec.loc[2022] * 100),
"step": 5,
},
w_d_wp_4={
"max": 100,
"min": 0,
"from-min": 50,
"start": round(heat_pump_share_dec.loc[2022] * 100),
"step": 5,
},
w_d_wp_5={
"max": 100,
"min": 0,
"from-min": 50,
"start": round(heat_pump_share_dec.loc[2022] * 100),
"step": 5,
},
w_z_wp_1={
"max": 100,
"min": 0,
"from-min": 50,
"start": round(heat_pump_share_cen.loc[2022] * 100),
"step": 5,
"status_quo": round(heat_pump_share_cen.loc[2022] * 100),
"future_scenario": round(heat_pump_share_cen.loc[2045] * 100),
},
)
)

Expand Down
2 changes: 1 addition & 1 deletion docs/sections/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ To trigger a check manually, execute:
## Runtime and resources

**Warning:** Conversion and extraction process needs ~50 GB disk space and may
take a lot of time!
take a couple of hours to finish!

0 comments on commit c310e39

Please sign in to comment.