From 36a57222f7f9626c831668ae019d996abf1c11b1 Mon Sep 17 00:00:00 2001 From: lisazeyen <35347358+lisazeyen@users.noreply.github.com> Date: Fri, 24 Jan 2020 15:31:17 +0100 Subject: [PATCH] Clip p min pu (#50) * changes for retrofitting * changed Snakefile to work with new pypsa-eur version, change solve_network.py to clip also n.generators_t.p_min_pu * removed retrofitting data files --- Snakefile | 2 +- scripts/solve_network.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Snakefile b/Snakefile index f400b794..0ab03d3f 100644 --- a/Snakefile +++ b/Snakefile @@ -172,7 +172,7 @@ rule build_industrial_demand: rule prepare_sector_network: input: - network=pypsaeur('networks/{network}_s{simpl}_{clusters}_lv{lv}_{opts}.nc'), + network=pypsaeur('networks/{network}_s{simpl}_{clusters}_ec_lv{lv}_{opts}.nc'), energy_totals_name='data/energy_totals.csv', co2_totals_name='data/co2_totals.csv', transport_name='data/transport_data.csv', diff --git a/scripts/solve_network.py b/scripts/solve_network.py index cf1a1b2b..0267fdfb 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -59,7 +59,7 @@ def prepare_network(n, solve_opts=None): solve_opts = snakemake.config['solving']['options'] if 'clip_p_max_pu' in solve_opts: - for df in (n.generators_t.p_max_pu, n.storage_units_t.inflow): + for df in (n.generators_t.p_max_pu, n.generators_t.p_min_pu, n.storage_units_t.inflow): df.where(df>solve_opts['clip_p_max_pu'], other=0., inplace=True) if solve_opts.get('load_shedding'):