-
Notifications
You must be signed in to change notification settings - Fork 1
/
Snakefile
47 lines (41 loc) · 1.5 KB
/
Snakefile
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
configfile: "config.yaml"
wildcard_constraints:
policy="[\-a-zA-Z0-9\.]+",
parameter="[0-9]*"
rule plot_summary:
input:
summary=config['results_dir'] + "/" + config['run'] + "/csvs/summary.csv"
output: 'paper_graphics/' + config['run'] + "/pen-compare-" + config["run"] + ".pdf"
threads: 2
resources: mem_mb=2000
script:
'plot_summary.py'
rule solve_network:
input:
config=config['results_dir'] + '/' + config['run'] + '/configs/config.yaml'
output:
network=config['results_dir'] + "/" + config['run'] + "/networks/{policy}_{parameter}.nc"
log:
solver=config['results_dir'] + "/" + config['run'] + "/logs/{policy}_{parameter}_solver.log",
python=config['results_dir'] + "/" + config['run'] + "/logs/{policy}_{parameter}_python.log",
memory=config['results_dir'] + "/" + config['run'] + "/logs/{policy}_{parameter}_memory.log"
threads: 4
resources: mem=6000
script: "solve_network.py"
rule make_summary:
input:
expand(config['results_dir'] + "/" + config['run'] + "/networks/{policy}_{parameter}.nc",
**config['scenario'])
output:
summary=config['results_dir'] + "/" + config['run'] + "/csvs/summary.csv"
threads: 2
resources: mem_mb=2000
script: 'make_summary.py'
rule copy_config:
input:
output:
config=config['results_dir'] + '/' + config['run'] + '/configs/config.yaml'
threads: 1
resources: mem_mb=1000
script:
'copy_config.py'