pypsa-eur/rules/solve_electricity.smk

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

77 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

2024-02-19 15:21:48 +00:00
# SPDX-FileCopyrightText: : 2023-2024 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: MIT
2023-03-08 16:46:14 +00:00
rule solve_network:
params:
solving=config_provider("solving"),
foresight=config_provider("foresight"),
planning_horizons=config_provider("scenario", "planning_horizons"),
co2_sequestration_potential=config_provider(
"sector", "co2_sequestration_potential", default=200
2023-06-02 10:52:49 +00:00
),
custom_extra_functionality=input_custom_extra_functionality,
input:
network=resources("networks/base_s_{clusters}_elec_l{ll}_{opts}.nc"),
output:
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}.nc",
config=RESULTS + "configs/config.base_s_{clusters}_elec_l{ll}_{opts}.yaml",
log:
solver=normpath(
RESULTS
+ "logs/solve_network/base_s_{clusters}_elec_l{ll}_{opts}_solver.log"
),
python=RESULTS
+ "logs/solve_network/base_s_{clusters}_elec_l{ll}_{opts}_python.log",
benchmark:
(RESULTS + "benchmarks/solve_network/base_s_{clusters}_elec_l{ll}_{opts}")
threads: solver_threads
resources:
mem_mb=memory,
runtime=config_provider("solving", "runtime", default="6h"),
shadow:
"shallow"
2023-03-08 16:46:14 +00:00
conda:
"../envs/environment.yaml"
script:
"../scripts/solve_network.py"
rule solve_operations_network:
params:
options=config_provider("solving", "options"),
Squashed commit of the following: commit a2b82195b872bae11a9e247c53756ca3ae512362 Author: Fabian Neumann <fabian.neumann@outlook.de> Date: Fri Aug 30 16:13:36 2024 +0200 minor adjustments commit 4f9eb04fec4534abbef10fedd4d9b5c34f064670 Merge: 7b525a51 bf2d82a3 Author: Fabian Neumann <fabian.neumann@outlook.de> Date: Fri Aug 30 16:08:58 2024 +0200 Merge branch 'master' into master commit 7b525a515a36a4ebb248280546583ac843f6b277 Merge: d9033374 a357ba11 Author: danielelerede-oet <daniele.lerede@openenergytransition.org> Date: Mon Aug 26 13:21:06 2024 +0200 Merge branch 'master' into master commit d9033374e4bf0bb70df0828743b9aab69c0cbb27 Author: danielelerede-oet <daniele.lerede@openenergytransition.org> Date: Mon Aug 26 10:34:27 2024 +0200 Update scripts/solve_network.py Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de> commit 98e6c5b0f152ca7e064b3c80be26f50040628388 Author: danielelerede-oet <daniele.lerede@openenergytransition.org> Date: Mon Aug 26 10:34:21 2024 +0200 Update scripts/solve_network.py Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de> commit be19a2ba2401a2815c09e74d2add24461b3fe2aa Author: danielelerede-oet <daniele.lerede@openenergytransition.org> Date: Mon Aug 26 10:34:15 2024 +0200 Update scripts/solve_operations_network.py Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de> commit 8093eaa399cfea62d1ef93ec4ed5ed46bf5dcc6d Author: danielelerede-oet <daniele.lerede@openenergytransition.org> Date: Mon Aug 26 10:34:08 2024 +0200 Update scripts/solve_network.py Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de> commit 746d1761accbe44d3a851430b94844fe3ab43d72 Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed Aug 21 15:29:12 2024 +0000 [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci commit f46fdee7f7ceeb9040ee73123fa4a3bd1aa14a56 Author: Daniele Lerede <daniele.lerede@openenergytransition.org> Date: Wed Aug 21 17:11:32 2024 +0200 fix solve_operations_network
2024-08-30 14:15:34 +00:00
solving=config_provider("solving"),
foresight=config_provider("foresight"),
planning_horizons=config_provider("scenario", "planning_horizons"),
co2_sequestration_potential=config_provider(
"sector", "co2_sequestration_potential", default=200
),
custom_extra_functionality=input_custom_extra_functionality,
input:
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}.nc",
output:
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}_op.nc",
log:
solver=normpath(
RESULTS
+ "logs/solve_operations_network/base_s_{clusters}_elec_l{ll}_{opts}_op_solver.log"
),
python=RESULTS
+ "logs/solve_operations_network/base_s_{clusters}_elec_l{ll}_{opts}_op_python.log",
benchmark:
(
RESULTS
+ "benchmarks/solve_operations_network/base_s_{clusters}_elec_l{ll}_{opts}"
)
threads: 4
resources:
mem_mb=(lambda w: 10000 + 372 * int(w.clusters)),
runtime=config_provider("solving", "runtime", default="6h"),
shadow:
"shallow"
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"