forked from open-energy-transition/pypsa-eur
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathsolve_electricity.smk
More file actions
76 lines (72 loc) · 2.77 KB
/
Copy pathsolve_electricity.smk
File metadata and controls
76 lines (72 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# SPDX-FileCopyrightText: Contributors to PyPSA-Eur <https://github.com/pypsa/pypsa-eur>
#
# SPDX-License-Identifier: MIT
rule solve_network:
params:
solving=config_provider("solving"),
foresight=config_provider("foresight"),
co2_sequestration_potential=config_provider(
"sector", "co2_sequestration_potential", default=200
),
custom_extra_functionality=input_custom_extra_functionality,
carriers_tyndp=config_provider("electricity", "tyndp_renewable_carriers"),
input:
network=resources("networks/base_s_{clusters}_elec_{opts}.nc"),
offshore_zone_trajectories=lambda w: (
resources("offshore_zone_trajectories.csv")
if config_provider("sector", "offshore_hubs_tyndp", "enable")(w)
else []
),
output:
network=RESULTS + "networks/base_s_{clusters}_elec_{opts}.nc",
config=RESULTS + "configs/config.base_s_{clusters}_elec_{opts}.yaml",
log:
solver=normpath(
RESULTS + "logs/solve_network/base_s_{clusters}_elec_{opts}_solver.log"
),
memory=RESULTS + "logs/solve_network/base_s_{clusters}_elec_{opts}_memory.log",
python=RESULTS + "logs/solve_network/base_s_{clusters}_elec_{opts}_python.log",
benchmark:
(RESULTS + "benchmarks/solve_network/base_s_{clusters}_elec_{opts}")
threads: solver_threads
resources:
mem_mb=memory,
runtime=config_provider("solving", "runtime", default="6h"),
shadow:
shadow_config
conda:
"../envs/environment.yaml"
script:
"../scripts/solve_network.py"
rule solve_operations_network:
params:
options=config_provider("solving", "options"),
solving=config_provider("solving"),
foresight=config_provider("foresight"),
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_{opts}.nc",
output:
network=RESULTS + "networks/base_s_{clusters}_elec_{opts}_op.nc",
log:
solver=normpath(
RESULTS
+ "logs/solve_operations_network/base_s_{clusters}_elec_{opts}_op_solver.log"
),
python=RESULTS
+ "logs/solve_operations_network/base_s_{clusters}_elec_{opts}_op_python.log",
benchmark:
(RESULTS + "benchmarks/solve_operations_network/base_s_{clusters}_elec_{opts}")
threads: 4
resources:
mem_mb=memory,
runtime=config_provider("solving", "runtime", default="6h"),
shadow:
shadow_config
conda:
"../envs/environment.yaml"
script:
"../scripts/solve_operations_network.py"