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_sector_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:53:09 +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:
|
|
|
|
network=RESULTS
|
2023-04-29 16:49:49 +00:00
|
|
|
+ "prenetworks/elec{weather_year}_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
2023-08-02 12:31:08 +00:00
|
|
|
config=RESULTS + "config.yaml",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
|
|
|
RESULTS
|
2023-04-29 16:49:49 +00:00
|
|
|
+ "postnetworks/elec{weather_year}_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
2023-03-08 16:29:01 +00:00
|
|
|
shadow:
|
|
|
|
"shallow"
|
|
|
|
log:
|
2024-01-19 15:58:05 +00:00
|
|
|
solver=RESULTS
|
2024-03-01 09:10:26 +00:00
|
|
|
+ "logs/elec{weather_year}_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_solver.log",
|
2024-01-19 15:58:05 +00:00
|
|
|
memory=RESULTS
|
2024-03-01 09:10:26 +00:00
|
|
|
+ "logs/elec{weather_year}_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_memory.log",
|
2024-01-19 15:58:05 +00:00
|
|
|
python=RESULTS
|
2024-03-01 09:10:26 +00:00
|
|
|
+ "logs/elec{weather_year}_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_python.log",
|
2024-01-22 08:28:51 +00:00
|
|
|
threads: solver_threads
|
2023-03-08 16:29:01 +00:00
|
|
|
resources:
|
2023-09-22 11:58:08 +00:00
|
|
|
mem_mb=config_provider("solving", "mem"),
|
|
|
|
walltime=config_provider("solving", "walltime", default="12:00:00"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
|
|
|
(
|
|
|
|
RESULTS
|
2024-03-01 09:10:26 +00:00
|
|
|
+ "benchmarks/solve_sector_network/elec{weather_year}_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
2023-03-08 16:29:01 +00:00
|
|
|
)
|
2023-03-08 16:46:14 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-09 21:51:56 +00:00
|
|
|
"../scripts/solve_network.py"
|
2023-04-29 16:49:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule solve_operations_network_other_year:
|
|
|
|
input:
|
2023-04-30 08:54:48 +00:00
|
|
|
pre=RDIR
|
|
|
|
+ "/prenetworks/elec{weather_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
post=RDIR
|
|
|
|
+ "/postnetworks/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
output:
|
|
|
|
RDIR
|
|
|
|
+ "/operations/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}.nc",
|
|
|
|
shadow:
|
|
|
|
"shallow"
|
2023-04-29 16:49:49 +00:00
|
|
|
log:
|
2023-04-30 08:54:48 +00:00
|
|
|
solver=RDIR
|
|
|
|
+ "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_solver.log",
|
|
|
|
python=RDIR
|
|
|
|
+ "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_python.log",
|
2023-04-29 16:49:49 +00:00
|
|
|
threads: 4
|
2023-04-30 08:54:48 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=10000,
|
|
|
|
benchmark:
|
|
|
|
(
|
|
|
|
RDIR
|
|
|
|
+ "/benchmarks/solve_operations_network/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}"
|
|
|
|
)
|
|
|
|
script:
|
|
|
|
"../scripts/solve_operations_network_other_year.py"
|
2023-04-29 16:49:49 +00:00
|
|
|
|
|
|
|
|
2023-07-26 08:52:58 +00:00
|
|
|
# rule solve_operations_network_other_year_myopic:
|
|
|
|
# input:
|
|
|
|
# overrides="data/override_component_attrs",
|
|
|
|
# pre=RDIR
|
|
|
|
# + "/prenetworks/elec{weather_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
# post=RDIR
|
|
|
|
# + "/postnetworks/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
# previous=solved_previous_year,
|
|
|
|
# output:
|
|
|
|
# RDIR
|
|
|
|
# + "/operations/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_myopic.nc",
|
|
|
|
# shadow:
|
|
|
|
# "shallow"
|
|
|
|
# log:
|
|
|
|
# solver=RDIR
|
|
|
|
# + "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_solver.log",
|
|
|
|
# python=RDIR
|
|
|
|
# + "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_python.log",
|
|
|
|
# threads: 4
|
|
|
|
# resources:
|
|
|
|
# mem_mb=10000,
|
|
|
|
# benchmark:
|
|
|
|
# (
|
|
|
|
# RDIR
|
|
|
|
# + "/benchmarks/solve_operations_network_myopic/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}"
|
|
|
|
# )
|
|
|
|
# script:
|
|
|
|
# "../scripts/solve_operations_network_other_year_myopic.py"
|