From b479973b7e1172249b31640bcc5b1ac5a4e1c05c Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Sun, 2 Feb 2020 11:07:29 +0100 Subject: [PATCH] doc: fix tutorial notes to account for '_ec' in filenames [skip travis] * Adressing feedback from denyin: Private message regarding: [pypsa] MissingRuleException when using snakemake command --- .gitignore | 1 + doc/installation.rst | 2 ++ doc/tutorial.rst | 10 +++++----- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c5a0ce0d..99429eae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .snakemake* .ipynb_checkpoints __pycache__ +*dconf gurobi.log /bak diff --git a/doc/installation.rst b/doc/installation.rst index 4b54637e..5c28b749 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -77,12 +77,14 @@ For installation instructions of these solvers for your operating system, follow .. code:: bash + conda activate pypsa-eur conda install -c conda-forge ipopt coincbc and on Windows .. code:: bash + conda activate pypsa-eur conda install -c conda-forge ipopt glpk diff --git a/doc/tutorial.rst b/doc/tutorial.rst index aaa09e4a..4a41c7ab 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -103,9 +103,9 @@ clustered down to 6 buses and every 24 hours aggregated to one snapshot. The com .. code:: bash - .../pypsa-eur % snakemake results/networks/elec_s_6_lcopt_Co2L-24H.nc + .../pypsa-eur % snakemake results/networks/elec_s_6_ec_lcopt_Co2L-24H.nc -orders ``snakemake`` to run the script ``solve_network`` that produces the solved network and stores it in ``.../pypsa-eur/results/networks`` with the name ``elec_s_6_lcopt_Co2L-24H.nc``: +orders ``snakemake`` to run the script ``solve_network`` that produces the solved network and stores it in ``.../pypsa-eur/results/networks`` with the name ``elec_s_6_ec_lcopt_Co2L-24H.nc``: .. code:: @@ -234,7 +234,7 @@ Once the whole worktree is finished, it should show state so in the terminal: Finished job 0. 12 of 12 steps (100%) done Complete log: /home/XXXX/pypsa-eur/.snakemake/log/20XX-XX-XXTXX.snakemake.log - snakemake results/networks/elec_s_6_lcopt_Co2L-24H.nc 519,84s user 34,26s system 242% cpu 3:48,83 total + snakemake results/networks/elec_s_6_ec_lcopt_Co2L-24H.nc 519,84s user 34,26s system 242% cpu 3:48,83 total You will notice that many intermediate stages are saved, namely the outputs of each individual ``snakemake`` rule. @@ -250,7 +250,7 @@ For example, you can explore the evolution of the PyPSA networks by running #. ``.../pypsa-eur % snakemake networks/elec.nc`` #. ``.../pypsa-eur % snakemake networks/elec_s.nc`` #. ``.../pypsa-eur % snakemake networks/elec_s_6.nc`` -#. ``.../pypsa-eur % snakemake networks/elec_s_6_lcopt_Co2L-24H.nc`` +#. ``.../pypsa-eur % snakemake networks/elec_s_6_ec_lcopt_Co2L-24H.nc`` There's a special rule: If you simply run @@ -275,7 +275,7 @@ The solved networks can be analysed just like any other PyPSA network (e.g. in J import pypsa - network = pypsa.Network("results/networks/elec_s_6_lcopt_Co2L-24H.nc") + network = pypsa.Network("results/networks/elec_s_6_ec_lcopt_Co2L-24H.nc") ...