pypsa-eur/rules/solve_overnight.smk

49 lines
1.7 KiB
Plaintext
Raw Normal View History

# SPDX-FileCopyrightText: : 2023 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: MIT
2023-03-08 16:46:14 +00:00
rule solve_sector_network:
params:
solving=config["solving"],
2023-05-27 10:22:53 +00:00
config_parts={
"foresight": config["foresight"],
"planning_horizons": config["scenario"]["planning_horizons"],
"co2_sequestration_potential": config["sector"].get(
"co2_sequestration_potential", 200
),
"H2_retrofit_capacity_per_CH4": config["sector"][
"H2_retrofit_capacity_per_CH4"
],
},
input:
overrides="data/override_component_attrs",
network=RESULTS
+ "prenetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
costs="data/costs_{}.csv".format(config["costs"]["year"]),
2023-04-21 09:05:18 +00:00
config=RESULTS + "config/config.yaml",
#env=RDIR + 'config/environment.yaml',
output:
RESULTS
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
shadow:
"shallow"
log:
solver=LOGS
+ "elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_solver.log",
python=LOGS
+ "elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_python.log",
threads: config["solving"]["solver"].get("threads", 4)
resources:
mem_mb=config["solving"]["mem"],
benchmark:
(
RESULTS
2023-03-08 18:22:29 +00:00
+ BENCHMARKS
+ "solve_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
)
2023-03-08 16:46:14 +00:00
conda:
"../envs/environment.yaml"
script:
"../scripts/solve_network.py"