forked from rl-institut/oemof-B3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Snakefile
42 lines (34 loc) · 1.15 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
rule setup_model_structure:
input:
"scenarios/{scenario}.yml"
output:
directory("results/{scenario}/preprocessed/data")
shell:
"python scripts/setup_model_structure.py scenarios/{wildcards.scenario}.yml results/{wildcards.scenario}/preprocessed"
rule infer:
input:
"scenarios/{scenario}.yml"
output:
"results/{scenario}/preprocessed/datapackage.json"
shell:
"python scripts/infer.py scenarios/{wildcards.scenario}.yml results/{wildcards.scenario}/preprocessed"
rule prepare_example:
input:
directory("examples/{scenario}")
output:
directory("results/{scenario}/preprocessed")
shell:
"cp -r examples/{wildcards.scenario}/preprocessed results/{wildcards.scenario}/preprocessed"
rule optimize:
input:
directory("results/{scenario}/preprocessed/")
output:
directory("results/{scenario}/optimized/")
shell:
"python scripts/optimize.py results/{wildcards.scenario}/preprocessed results/{wildcards.scenario}/optimized"
rule clean:
shell:
"""
rm -r ./results/*
echo "Removed all results."
"""