From e31d6abf5cad25b946247f4e941c976a4294988e Mon Sep 17 00:00:00 2001 From: Sam Dotson Date: Tue, 10 Sep 2024 17:02:49 -0400 Subject: [PATCH 1/7] adds two articles to bib and reinstates the joss draft build step --- .github/workflows/CI.yml | 3 +++ paper/paper.bib | 41 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1358aa1..2afb551 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,3 +81,6 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + + - name: Open Journals PDF Generator + uses: openjournals/openjournals-draft-action@v.1.0 diff --git a/paper/paper.bib b/paper/paper.bib index db7c5b3..ff5a4ba 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -210,3 +210,44 @@ @article{zelt:2019 keywords = {electricity scenarios,energy modelling,Jordan,MCA,MENA,Morocco,multi-criteria,stakeholder participation,sustainability,Tunisia}, file = {/home/sam/snap/zotero-snap/common/Zotero/storage/S3QTXVF7/Zelt et al. - 2019 - Long-Term Electricity Scenarios for the MENA Regio.pdf} } + +@article{brown:2018, + title = {{PyPSA}: {Python} for {Power} {System} {Analysis}}, + volume = {6}, + copyright = {Authors who publish with this journal agree to the following terms: Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access ). All third-party images reproduced on this journal are shared under Educational Fair Use. For more information on Educational Fair Use , please see this useful checklist prepared by Columbia University Libraries . All copyright of third-party content posted here for research purposes belongs to its original owners. Unless otherwise stated all references to characters and comic art presented on this journal are ©, ® or ™ of their respective owners. No challenge to any owner’s rights is intended or should be inferred.}, + issn = {2049-9647}, + shorttitle = {{PyPSA}}, + url = {http://openresearchsoftware.metajnl.com/articles/10.5334/jors.188/}, + doi = {10.5334/jors.188}, + abstract = {Python for Power System Analysis (PyPSA) is a free software toolbox for simulating and optimising modern electrical power systems over multiple periods. PyPSA includes models for conventional generators with unit commitment, variable renewable generation, storage units, coupling to other energy sectors, and mixed alternating and direct current networks. It is designed to be easily extensible and to scale well with large networks and long time series. In this paper the basic functionality of PyPSA is described, including the formulation of the full power flow equations and the multi-period optimisation of operation and investment with linear power flow equations. PyPSA is positioned in the existing free software landscape as a bridge between traditional power flow analysis tools for steady-state analysis and full multi-period energy system models. The functionality is demonstrated on two open datasets of the transmission system in Germany (based on SciGRID) and Europe (based on GridKit).Funding statement: This research was conducted as part of the CoNDyNet project, which is supported by the German Federal Ministry of Education and Research under grant no. 03SF0472C. The responsibility for the contents lies solely with the authors}, + language = {en}, + number = {1}, + urldate = {2022-12-12}, + journal = {Journal of Open Research Software}, + author = {Brown, Thomas and Hörsch, Jonas and Schlachtberger, David}, + month = jan, + year = {2018}, + publisher = Ubiquity Press, + keywords = {energy system simulations, Load flow calculations, optimal power flow, Power system simulations, renewable energy, security-constrained optimal power flow, unit commitment}, + pages = {4}, + file = {Full Text PDF:/Users/samdotson/Zotero/storage/WXM33X5R/Brown et al. - 2018 - PyPSA Python for Power System Analysis.pdf:application/pdf}, +} + +@article{pfenninger:2018, + title = {Calliope: a multi-scale energy systems modelling framework}, + volume = {3}, + issn = {2475-9066}, + shorttitle = {Calliope}, + url = {https://joss.theoj.org/papers/10.21105/joss.00825}, + doi = {10.21105/joss.00825}, + abstract = {Pfenninger et al., (2018). Calliope: a multi-scale energy systems modelling framework. Journal of Open Source Software, 3(29), 825, https://doi.org/10.21105/joss.00825}, + language = {en}, + number = {29}, + urldate = {2022-12-12}, + journal = {Journal of Open Source Software}, + author = {Pfenninger, Stefan and Pickering, Bryn}, + month = sep, + year = {2018}, + pages = {825}, + file = {Full Text PDF:/Users/samdotson/Zotero/storage/7DVHTBE3/Pfenninger and Pickering - 2018 - Calliope a multi-scale energy systems modelling f.pdf:application/pdf}, +} From 615c9ddf212c42999928311ba5c6f1d29b9c477c Mon Sep 17 00:00:00 2001 From: Sam Dotson Date: Tue, 10 Sep 2024 17:27:39 -0400 Subject: [PATCH 2/7] adds a line about two related projects, calliope and pypsa --- paper/paper.md | 68 +++++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index e6013bb..749c1d7 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -31,7 +31,7 @@ have and express preferences over many dimensions simultaneously. Multi-objective optimization offers a method to help decision makers and stakeholders understand the problem and analyze tradeoffs among solutions [@liebman:1976]. Although, to date, no open-source multi-objective energy -modelling frameworks exist. Open-source multi-objective energy system framework +modeling frameworks exist. Open-source multi-objective energy system framework (`osier`) is a Python package for designing and optimizing energy systems across an arbitrary number of dimensions. `osier` was designed to help localized communities articulate their energy preferences in a technical manner without @@ -39,9 +39,9 @@ requiring extensive technical expertise. In order to facilitate more robust tradeoff analysis, `osier` generates a set of solutions, called a Pareto front, that are composed of a number of technology portfolios. The Pareto front is calculated using multi-objective optimization using evolutionary algorithms. -`osier` also extends the common modelling-to-generate-alternatives (MGA) +`osier` also extends the common modeling-to-generate-alternatives (MGA) algorithm into N-dimensional objective space, as opposed to the conventional -single-objective MGA. This allows users to investigate the near-optimal +single-objective MGA. This allows users to investigate the near-optimal space for appealing alternative solutions. In this way, `osier` may aid modelers in addressing procedural and recognition justice. @@ -49,28 +49,31 @@ addressing procedural and recognition justice. There are myriad open- and closed-source energy system optimization models (ESOMs) available [@pfenninger:2022]. ESOMs can be used for a variety of tasks but are most frequently used for prescriptive analyses meant to guide -decision-makers in planning processes. However, virtually all of these tools -share a fundamental characteristic: Optimization over -a single economic objective (e.g., total cost or social welfare). -Simultaneously, there is growing awareness of energy justice and calls for its -inclusion in energy models [@pfenninger:2014; @vagero:2023]. Some studies -incorporate local preferences into energy system design through -multi-criteria decision analysis (MCDA) and community focus groups -[@bertsch:2016; @mckenna:2018; @zelt:2019]. But these studies rely on tools with -pre-defined objectives which are difficult to modify. Without the ability to add -objectives that reflect the concerns of a community, the priorities of that -community will remain secondary to those of modellers and decision makers. A -flexible and extensible multi-objective framework that fulfills this need has -not yet been developed. The `osier` framework closes this gap. +decision-makers in planning processes. However, virtually all of these tools +share a fundamental characteristic: Optimization over a single economic +objective (e.g., total cost or social welfare). Simultaneously, there is growing +awareness of energy justice and calls for its inclusion in energy models +[@pfenninger:2014; @vagero:2023]. Two well known open-source ESOMs, Calliope +[@pfenninger:2018] and Python for Power Systems Analysis (PyPSA) [@brown:2018], +partially address equity issues by implementing MGA, but this does not resolve +the limitation of mono-objective optimization. Some studies incorporate local +preferences into energy system design through multi-criteria decision analysis +(MCDA) and community focus groups [@bertsch:2016; @mckenna:2018; @zelt:2019]. +But these studies rely on tools with pre-defined objectives which are difficult +to modify. Without the ability to add objectives that reflect the concerns of a +community, the priorities of that community will remain secondary to those of +modelers and decision makers. A flexible and extensible multi-objective +framework that fulfills this need has not yet been developed. The `osier` +framework closes this gap. # Design and Implementation -The fundamental object in `osier` is an `osier.Technology` object, which -contains all of the necessary cost and performance data for different technology -classes. `osier` comes pre-loaded with a variety of technologies described in -the National Renewable Energy Laboratory's (NREL) Annual Technology Baseline (ATB) -dataset[@nationalrenewableenergylaboratory:2023] but users are also able to -define their own. In order to run `osier`, users are required to supply an -energy demand time series and a list of `osier.Technology` objects. Users can +The fundamental object in `osier` is an `osier.Technology` object, which +contains all of the necessary cost and performance data for different technology +classes. `osier` comes pre-loaded with a variety of technologies described in +the National Renewable Energy Laboratory's (NREL) Annual Technology Baseline +(ATB) dataset[@nationalrenewableenergylaboratory:2023] but users are also able +to define their own. In order to run `osier`, users are required to supply an +energy demand time series and a list of `osier.Technology` objects. Users can optionally provide weather data to incorporate solar or wind energy. A set of `osier.Technology` objects, along with user-supplied demand data, can @@ -83,12 +86,13 @@ model in `osier`. The `osier.CapacityExpansion` model is implemented with the multi-objective optimization framework, `pymoo` [@blank:2020]. \autoref{fig:osier-flow} overviews the flow of data through `osier`. -![The flow of data into and within `osier`.\label{fig:osier-flow}](osier_flow.png) +![The flow of data into and within +`osier`.\label{fig:osier-flow}](osier_flow.png) ## Key Features In addition to being the first and only open-source multi-objective energy -modelling framework, `osier` has a few key features that further distinguishes -it from other modelling frameworks. First, since `osier.Technology` objects are +modeling framework, `osier` has a few key features that further distinguishes it +from other modeling frameworks. First, since `osier.Technology` objects are Python objects, users can modify values and assumptions, or assign new attributes to the tested technologies. Second, contrary to conventional energy system models, `osier` has no required objectives. While users may choose from a @@ -118,16 +122,18 @@ solutions rather than a global optimum, called a Pareto front. \autoref{fig:osier-results} shows a Pareto front from a problem that simultaneously minimizes total cost and lifecylce carbon emissions. -![A Pareto front generated by`osier`.\label{fig:osier-results}](images/osier-results.png) +![A Pareto front generated +by`osier`.\label{fig:osier-results}](images/osier-results.png) Each point on this Pareto front represents a different technology portfolio (i.e., different combination of wind, natural gas, and battery storage). -\autoref{fig:osier-tech-res} illustrates the variation in solutions from -the Pareto front in \autoref{fig:osier-results}. In this case, the range of -wind capacity is wider than the range of capacities for natural gas and battery +\autoref{fig:osier-tech-res} illustrates the variation in solutions from the +Pareto front in \autoref{fig:osier-results}. In this case, the range of wind +capacity is wider than the range of capacities for natural gas and battery storage. -![The variance in technology options along a Pareto front.\label{fig:osier-tech-res}](images/osier-tech-results.png) +![The variance in technology options along a Pareto +front.\label{fig:osier-tech-res}](images/osier-tech-results.png) ## Documentation From d91646bc63ed82c541c99bec3ed04aac5e81f9ec Mon Sep 17 00:00:00 2001 From: Sam Dotson Date: Sat, 14 Sep 2024 17:06:18 -0400 Subject: [PATCH 3/7] comments out openjournals hook in CI file --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2afb551..d228f4c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -82,5 +82,5 @@ jobs: # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Open Journals PDF Generator - uses: openjournals/openjournals-draft-action@v.1.0 + # - name: Open Journals PDF Generator + # uses: openjournals/openjournals-draft-action@v.1.0 From 3116516d3646492331684d0b687c5c0619e0cca7 Mon Sep 17 00:00:00 2001 From: Sam Dotson Date: Sat, 14 Sep 2024 17:17:59 -0400 Subject: [PATCH 4/7] adds pull_request to draft pdf workflow --- .github/workflows/draft-pdf.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index 51a805e..f34dfeb 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -1,4 +1,5 @@ -on: [push] +name: Draft PDF +on: [push, pull_request] jobs: paper: From 93dc1822fb0d36b96923d54cd880db15ae795d68 Mon Sep 17 00:00:00 2001 From: Sam Dotson Date: Sat, 14 Sep 2024 17:19:55 -0400 Subject: [PATCH 5/7] updates workflow --- .github/workflows/draft-pdf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index f34dfeb..d14665a 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -15,7 +15,7 @@ jobs: # This should be the path to the paper within your repo. paper-path: paper/paper.md - name: Upload - uses: actions/upload-artifact@v1 + uses: actions/download-artifact@v4 with: name: paper # This is the output path where Pandoc will write the compiled From 80c759857ff970afedfff304abd006031cd1b8b0 Mon Sep 17 00:00:00 2001 From: Sam Dotson Date: Sat, 14 Sep 2024 17:23:22 -0400 Subject: [PATCH 6/7] fixes paper.bib --- paper/paper.bib | 1 - 1 file changed, 1 deletion(-) diff --git a/paper/paper.bib b/paper/paper.bib index ff5a4ba..10cf556 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -227,7 +227,6 @@ @article{brown:2018 author = {Brown, Thomas and Hörsch, Jonas and Schlachtberger, David}, month = jan, year = {2018}, - publisher = Ubiquity Press, keywords = {energy system simulations, Load flow calculations, optimal power flow, Power system simulations, renewable energy, security-constrained optimal power flow, unit commitment}, pages = {4}, file = {Full Text PDF:/Users/samdotson/Zotero/storage/WXM33X5R/Brown et al. - 2018 - PyPSA Python for Power System Analysis.pdf:application/pdf}, From d7d12974194b9dbcf8dedf46a14b68a5526f319b Mon Sep 17 00:00:00 2001 From: Sam Dotson Date: Sat, 14 Sep 2024 17:25:09 -0400 Subject: [PATCH 7/7] fixes erroneous 'download' in the 'upload' rule --- .github/workflows/draft-pdf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index d14665a..4a982d0 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -15,7 +15,7 @@ jobs: # This should be the path to the paper within your repo. paper-path: paper/paper.md - name: Upload - uses: actions/download-artifact@v4 + uses: actions/upload-artifact@v4 with: name: paper # This is the output path where Pandoc will write the compiled