pypsa-eur/rules/solve_electricity.smk

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
2.1 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_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:
network=RESOURCES + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc",
output:
network=RESULTS + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc",
log:
solver=normpath(
LOGS + "solve_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_solver.log"
),
python=LOGS
+ "solve_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_python.log",
benchmark:
BENCHMARKS + "solve_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}"
threads: 4
resources:
mem_mb=memory,
shadow:
"minimal"
2023-03-08 16:46:14 +00:00
conda:
"../envs/environment.yaml"
script:
"../scripts/solve_network.py"
rule solve_operations_network:
params:
solving=config["solving"],
input:
network=RESULTS + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc",
output:
network=RESULTS + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_op.nc",
log:
solver=normpath(
LOGS
+ "solve_operations_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_op_solver.log"
),
python=LOGS
+ "solve_operations_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_op_python.log",
benchmark:
(
BENCHMARKS
+ "solve_operations_network/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}"
)
threads: 4
resources:
mem_mb=(lambda w: 5000 + 372 * int(w.clusters)),
shadow:
"minimal"
2023-03-08 16:46:14 +00:00
conda:
"../envs/environment.yaml"
script:
2023-03-08 16:46:14 +00:00
"../scripts/solve_operations_network.py"