Skip to content

Commit

Permalink
Add results plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanalakori committed Apr 7, 2022
1 parent 3294692 commit d7881b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/G0_oemof_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
SHARE_BACKUP,
SHARE_USAGE,
SHARE_HYBRID,
CRITICAL,
EVALUATION_TIME,
LCOE,
CASE_NAME,
Expand Down Expand Up @@ -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(
Expand All @@ -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,
Expand All @@ -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]
Expand Down
1 change: 1 addition & 0 deletions src/G1_oemof_create_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d7881b0

Please sign in to comment.