From 917870a5d7ac110f30aee198e8e3bde9a0dc703f Mon Sep 17 00:00:00 2001 From: yerbol-akhmetov Date: Mon, 8 Jul 2024 23:58:44 +0500 Subject: [PATCH] fix sink_T calculation for flexible-moderate --- scripts/run.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/run.py b/scripts/run.py index 0b9e7c9..3d3ac6f 100644 --- a/scripts/run.py +++ b/scripts/run.py @@ -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)