Skip to content

Optional snakemake workflow #184

Answered by FabianHofmann
pz-max asked this question in Q&A
Discussion options

You must be logged in to vote

mmh, hard to say what is the best option. An alternative approach could be to carry the augmentation flag within the clusters wildcard and add the augmentation code to cluster_network.py. So for example the clusters wildcard could be something like "120aug" and the cluster code follow the idea of

n_clusters, augmented = re.match(r"([0-9]+)($|[a-zA-Z]+)", wildcards.clusters).groups()
n_clusters = int(n_clusters)

if augmented.endswith('m')
    aggregate_carriers = pd.Index(n.generators.carrier.unique()).difference(renewable_carriers)
    augmented = augmented[:-1]
else:
    aggregate_carriers = None # All

....normal main code...

if augmented == "aug":
    ... run augmentation code...
eli…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pz-max
Comment options

pz-max
Dec 17, 2021
Maintainer Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants