@@ -24,6 +24,7 @@ copy_default_files(workflow)
2424
2525
2626configfile : "config/config.default.yaml"
27+ configfile : "config/plotting.default.yaml"
2728configfile : "config/config.yaml"
2829configfile : "config/config.personal.yaml"
2930
@@ -53,7 +54,6 @@ localrules:
5354
5455wildcard_constraints :
5556 clusters = "[0-9]+(m|c)?|all|adm" ,
56- ll = r"(v|c)([0-9\.]+|opt)" ,
5757 opts = r"[-+a-zA-Z0-9\.]*" ,
5858 sector_opts = r"[-+a-zA-Z0-9\.\s]*" ,
5959 planning_horizons = r"[0-9]{4}" ,
@@ -66,7 +66,6 @@ include: "rules/build_electricity.smk"
6666include : "rules/build_sector.smk"
6767include : "rules/solve_electricity.smk"
6868include : "rules/postprocess.smk"
69- include : "rules/validate.smk"
7069include : "rules/development.smk"
7170
7271
@@ -88,6 +87,70 @@ if config["foresight"] == "perfect":
8887rule all :
8988 input :
9089 expand (RESULTS + "graphs/costs.svg" , run = config ["run" ]["name" ]),
90+ expand (
91+ resources ("maps/power-network-s-{clusters}.pdf" ),
92+ run = config ["run" ]["name" ],
93+ ** config ["scenario" ],
94+ ),
95+ expand (
96+ RESULTS
97+ + "maps/base_s_{clusters}_{opts}_{sector_opts}-costs-all_{planning_horizons}.pdf" ,
98+ run = config ["run" ]["name" ],
99+ ** config ["scenario" ],
100+ ),
101+ lambda w : expand (
102+ (
103+ RESULTS
104+ + "maps/base_s_{clusters}_{opts}_{sector_opts}-h2_network_{planning_horizons}.pdf"
105+ if config_provider ("sector" , "H2_network" )(w )
106+ else []
107+ ),
108+ run = config ["run" ]["name" ],
109+ ** config ["scenario" ],
110+ ),
111+ lambda w : expand (
112+ (
113+ RESULTS
114+ + "maps/base_s_{clusters}_{opts}_{sector_opts}-ch4_network_{planning_horizons}.pdf"
115+ if config_provider ("sector" , "gas_network" )(w )
116+ else []
117+ ),
118+ run = config ["run" ]["name" ],
119+ ** config ["scenario" ],
120+ ),
121+ lambda w : expand (
122+ (
123+ RESULTS + "csvs/cumulative_costs.csv"
124+ if config_provider ("foresight" )(w ) == "myopic"
125+ else []
126+ ),
127+ run = config ["run" ]["name" ],
128+ ),
129+ lambda w : expand (
130+ (
131+ RESULTS
132+ + "maps/base_s_{clusters}_{opts}_{sector_opts}_{planning_horizons}-balance_map_{carrier}.pdf"
133+ ),
134+ ** config ["scenario" ],
135+ run = config ["run" ]["name" ],
136+ carrier = config_provider ("plotting" , "balance_map" , "bus_carriers" )(w ),
137+ ),
138+ directory (
139+ expand (
140+ RESULTS
141+ + "graphics/balance_timeseries/s_{clusters}_{opts}_{sector_opts}_{planning_horizons}" ,
142+ run = config ["run" ]["name" ],
143+ ** config ["scenario" ],
144+ ),
145+ ),
146+ directory (
147+ expand (
148+ RESULTS
149+ + "graphics/heatmap_timeseries/s_{clusters}_{opts}_{sector_opts}_{planning_horizons}" ,
150+ run = config ["run" ]["name" ],
151+ ** config ["scenario" ],
152+ ),
153+ ),
91154 default_target : True
92155
93156
@@ -116,13 +179,13 @@ rule purge:
116179 raise Exception (f"Input { do_purge } . Aborting purge." )
117180
118181
119- rule dag :
182+ rule rulegraph :
120183 message :
121- "Creating DAG of workflow."
184+ "Creating RULEGRAPH dag of workflow."
122185 output :
123- dot = resources ("dag .dot" ),
124- pdf = resources ("dag .pdf" ),
125- png = resources ("dag .png" ),
186+ dot = resources ("dag_rulegraph .dot" ),
187+ pdf = resources ("dag_rulegraph .pdf" ),
188+ png = resources ("dag_rulegraph .png" ),
126189 conda :
127190 "envs/environment.yaml"
128191 shell :
@@ -133,6 +196,23 @@ rule dag:
133196 """
134197
135198
199+ rule filegraph :
200+ message :
201+ "Creating FILEGRAPH dag of workflow."
202+ output :
203+ dot = resources ("dag_filegraph.dot" ),
204+ pdf = resources ("dag_filegraph.pdf" ),
205+ png = resources ("dag_filegraph.png" ),
206+ conda :
207+ "envs/environment.yaml"
208+ shell :
209+ r"""
210+ snakemake --filegraph all | sed -n "/digraph/,\$p" > {output.dot}
211+ dot -Tpdf -o {output.pdf} {output.dot}
212+ dot -Tpng -o {output.png} {output.dot}
213+ """
214+
215+
136216rule doc :
137217 message :
138218 "Build documentation."
0 commit comments