2024-02-19 15:21:48 +00:00
|
|
|
# SPDX-FileCopyrightText: : 2023-2024 The PyPSA-Eur Authors
|
2023-03-08 16:29:01 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2023-03-08 16:46:14 +00:00
|
|
|
|
2023-03-08 16:29:01 +00:00
|
|
|
rule solve_network:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-09-22 11:58:08 +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
|
2023-06-02 10:52:49 +00:00
|
|
|
),
|
2024-01-04 08:00:31 +00:00
|
|
|
custom_extra_functionality=input_custom_extra_functionality,
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2024-09-13 13:37:01 +00:00
|
|
|
network=resources("networks/base_s_{clusters}_elec_l{ll}_{opts}.nc"),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2024-09-13 13:37:01 +00:00
|
|
|
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}.nc",
|
|
|
|
config=RESULTS + "configs/config.base_s_{clusters}_elec_l{ll}_{opts}.yaml",
|
2023-03-08 16:29:01 +00:00
|
|
|
log:
|
|
|
|
solver=normpath(
|
2024-02-17 22:36:46 +00:00
|
|
|
RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ "logs/solve_network/base_s_{clusters}_elec_l{ll}_{opts}_solver.log"
|
2023-03-08 16:29:01 +00:00
|
|
|
),
|
2024-02-17 22:36:46 +00:00
|
|
|
python=RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ "logs/solve_network/base_s_{clusters}_elec_l{ll}_{opts}_python.log",
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2024-09-13 13:37:01 +00:00
|
|
|
(RESULTS + "benchmarks/solve_network/base_s_{clusters}_elec_l{ll}_{opts}")
|
2024-01-22 08:28:51 +00:00
|
|
|
threads: solver_threads
|
2023-03-08 16:29:01 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=memory,
|
2024-03-09 13:47:01 +00:00
|
|
|
runtime=config_provider("solving", "runtime", default="6h"),
|
2023-03-08 16:29:01 +00:00
|
|
|
shadow:
|
2024-03-19 07:28:27 +00:00
|
|
|
"shallow"
|
2023-03-08 16:46:14 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/solve_network.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule solve_operations_network:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-09-22 11:58:08 +00:00
|
|
|
options=config_provider("solving", "options"),
|
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,
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2024-09-13 13:37:01 +00:00
|
|
|
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}.nc",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2024-09-13 13:37:01 +00:00
|
|
|
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}_op.nc",
|
2023-03-08 16:29:01 +00:00
|
|
|
log:
|
|
|
|
solver=normpath(
|
2024-02-17 22:36:46 +00:00
|
|
|
RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ "logs/solve_operations_network/base_s_{clusters}_elec_l{ll}_{opts}_op_solver.log"
|
2023-03-08 16:29:01 +00:00
|
|
|
),
|
2024-02-17 22:36:46 +00:00
|
|
|
python=RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ "logs/solve_operations_network/base_s_{clusters}_elec_l{ll}_{opts}_op_python.log",
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
|
|
|
(
|
2024-02-17 22:36:46 +00:00
|
|
|
RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ "benchmarks/solve_operations_network/base_s_{clusters}_elec_l{ll}_{opts}"
|
2023-03-08 16:29:01 +00:00
|
|
|
)
|
|
|
|
threads: 4
|
|
|
|
resources:
|
2023-07-05 09:07:36 +00:00
|
|
|
mem_mb=(lambda w: 10000 + 372 * int(w.clusters)),
|
2024-03-09 13:47:01 +00:00
|
|
|
runtime=config_provider("solving", "runtime", default="6h"),
|
2023-03-08 16:29:01 +00:00
|
|
|
shadow:
|
2024-03-19 07:28:27 +00:00
|
|
|
"shallow"
|
2023-03-08 16:46:14 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:46:14 +00:00
|
|
|
"../scripts/solve_operations_network.py"
|