From d7881b067ca75127829c321c1e7f7a28f5251172 Mon Sep 17 00:00:00 2001 From: "adnan.alakori@rl-institut.de" Date: Thu, 7 Apr 2022 13:37:03 +0200 Subject: [PATCH] Add results plotting --- src/G0_oemof_simulate.py | 12 ++++++++++++ src/G1_oemof_create_model.py | 1 + 2 files changed, 13 insertions(+) diff --git a/src/G0_oemof_simulate.py b/src/G0_oemof_simulate.py index 870f9b0..de3b191 100644 --- a/src/G0_oemof_simulate.py +++ b/src/G0_oemof_simulate.py @@ -48,6 +48,7 @@ SHARE_BACKUP, SHARE_USAGE, SHARE_HYBRID, + CRITICAL, EVALUATION_TIME, LCOE, CASE_NAME, @@ -138,6 +139,8 @@ def run(experiment, case_dict): electricity_bus_dc = solph.views.node(results, BUS_ELECTRICITY_DC) + critical = solph.views.node(results, CRITICAL) + try: e_flows_df = timeseries.get_demand( @@ -147,6 +150,14 @@ def run(experiment, case_dict): electricity_bus_dc, experiment, ) + e_flows_df = timeseries.get_demand( + case_dict, + oemof_results, + electricity_bus_ac, + electricity_bus_dc, + critical, + experiment, + ) e_flows_df = timeseries.get_shortage( case_dict, oemof_results, @@ -156,6 +167,7 @@ def run(experiment, case_dict): e_flows_df, ) # TODO maybe separate critical and non critical here for results plotting + ## ADDED in line #135 oemof_results.update( { SUPPLY_RELIABILITY_KWH: oemof_results[TOTAL_DEMAND_SUPPLIED_ANNUAL_KWH] diff --git a/src/G1_oemof_create_model.py b/src/G1_oemof_create_model.py index f5afe62..99dd452 100644 --- a/src/G1_oemof_create_model.py +++ b/src/G1_oemof_create_model.py @@ -542,6 +542,7 @@ def build(experiment, case_dict): ) # TODO maybe important for critical + # AD: We might leave this certain of shortage to assign to the non critical demand? """ # ------------Allow shortage only for certain percentage of demand in a timestep------------# if case_dict['allow_shortage'] is True: