2023-03-08 16:29:01 +00:00
|
|
|
# SPDX-FileCopyrightText: : 2023 The PyPSA-Eur Authors
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2023-03-08 16:46:14 +00:00
|
|
|
|
2023-03-08 16:29:01 +00:00
|
|
|
rule solve_sector_network:
|
|
|
|
input:
|
|
|
|
overrides="data/override_component_attrs",
|
|
|
|
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-03-08 16:29:01 +00:00
|
|
|
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',
|
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:
|
|
|
|
solver=LOGS
|
2023-04-29 16:49:49 +00:00
|
|
|
+ "elec{weather_year}_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_solver.log",
|
2023-03-08 16:29:01 +00:00
|
|
|
python=LOGS
|
2023-04-29 16:49:49 +00:00
|
|
|
+ "elec{weather_year}_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_python.log",
|
2023-03-08 16:29:01 +00:00
|
|
|
memory=LOGS
|
2023-04-29 16:49:49 +00:00
|
|
|
+ "elec{weather_year}_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}_memory.log",
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: config["solving"]["solver"].get("threads", 4)
|
|
|
|
resources:
|
|
|
|
mem_mb=config["solving"]["mem"],
|
|
|
|
benchmark:
|
|
|
|
(
|
|
|
|
RESULTS
|
2023-03-08 18:22:29 +00:00
|
|
|
+ BENCHMARKS
|
2023-04-29 16:49:49 +00:00
|
|
|
+ "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:
|
|
|
|
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",
|
|
|
|
output: RDIR + "/operations/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}.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/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}"
|
|
|
|
script: "../scripts/solve_operations_network_other_year.py"
|
|
|
|
|
|
|
|
|
|
|
|
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"
|