Skip to content

Commit

Permalink
fix sink_T calculation for flexible-moderate
Browse files Browse the repository at this point in the history
  • Loading branch information
yerbol-akhmetov committed Jul 8, 2024
1 parent 675e589 commit 917870a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,13 @@ def run_workflow(scenario, horizon, improved_cop=False):
# run model for given horizon
for horizon in horizons:
for scenario in scenarios:
# ensure heat_pump_sink_T: 55.0 at the beginning of first run
# calculate heat_pump_sink_T for flexible-moderate, set to 55.0 at the beginning of first run for other scenarios
if scenario == "flexible-moderate" and improved_cop:
# read sink_T from flexible scenario for improved COP runs
sink_T = read_sink_T("flexible", horizon)
# read heat saved from flexible scenario
heat_saved_ratio = get_heat_saved("flexible", horizon)
# calculate sink_T for half of heat saved
sink_T = calculate_sink_T(heat_saved_ratio/2)
# update sink_T
update_sink_T(scenario, horizon, sink_T)
elif scenario in ["flexible", "flexible-moderate", "retro_tes"]:
update_sink_T(scenario, horizon, 55.0)
Expand Down

0 comments on commit 917870a

Please sign in to comment.