diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b662..3042569cb1 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,6 +4,22 @@ on: types: - created workflow_dispatch: + inputs: + lookback: + default: 3 +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' @@ -12,4 +28,6 @@ jobs: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + # Edit the following line to reflect the actual name of the GitHub Secret containing your private key ssh: ${{ secrets.DOCUMENTER_KEY }} + # ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }} \ No newline at end of file diff --git a/.github/workflows/test_examples.yml b/.github/workflows/test_examples.yml index d0f4b37755..da58eb3aa5 100644 --- a/.github/workflows/test_examples.yml +++ b/.github/workflows/test_examples.yml @@ -2,6 +2,8 @@ name: Test-examples on: push: + branches: [main, develop] + tags: ['*'] schedule: - cron: 21 4 * * * # Run at 12:21am US Eastern time @@ -43,4 +45,4 @@ jobs: @test isnothing(run_genx_case!(example_dir)) end end - end \ No newline at end of file + end diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c52d9c6dfa..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -# Documentation: http://docs.travis-ci.com/user/languages/julia -language: julia -notifications: - email: false -julia: - - 1.6 - - 1.7 - - 1.8 - - 1.9 -branches: - only: - - main - - gh-pages -os: - - linux -arch: - - x64 -cache: - directories: - - ~/.julia/artifacts -jobs: - fast_finish: true - include: - - stage: Documentation - julia: 1.6 - script: | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate() - using Documenter: DocMeta, doctest - using GenX - DocMeta.setdocmeta!(GenX, :DocTestSetup, :(using GenX); recursive=true) - doctest(GenX) - include("docs/make.jl")' - after_success: skip diff --git a/CHANGELOG.md b/CHANGELOG.md index fb13b09e2b..b0fdf495d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated README with new instructions for running GenX through Julia REPL terminal (#492) - Fix factor of 0.5 when writing out transmission losses. (#480) - Fix summation error when a set of hours is empty (in thermal_commit.jl). +- Fix access to eELOSSByZone expr before initialization (#541) +- Fix modeling of hydro reservoir with long duration storage (#572). +- Fix computation of cumulative minimum capacity retirements in multistage GenX (#514) +- Fix update of starting transmission capacity in multistage GenX ### Changed diff --git a/Project.toml b/Project.toml index 796ca22b28..9694c26432 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GenX" uuid = "5d317b1e-30ec-4ed6-a8ce-8d2d88d7cfac" -authors = ["Jesse Jenkins", "Nestor Sepulveda", "Dharik Mallapragada", "Aaron Schwartz", "Neha Patankar", "Qingyu Xu", "Jack Morris", "Sambuddha Chakrabarti"] -version = "0.4" +authors = ["Bonaldo, Luca", "Chakrabarti, Sambuddha", "Cheng, Fangwei", "Ding, Yifu", "Jenkins, Jesse D.", "Luo, Qian", "Macdonald, Ruaridh", "Mallapragada, Dharik", "Manocha, Aneesha", "Mantegna, Gabe ", "Morris, Jack", "Patankar, Neha", "Pecci, Filippo", "Schwartz, Aaron", "Schwartz, Jacob", "Schivley, Greg", "Sepulveda, Nestor", "Xu, Qingyu"] +version = "0.4.0" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" @@ -27,9 +27,11 @@ Clustering = "0.14.2, 0.15" Combinatorics = "1.0.2" DataFrames = "1.3.4" DataStructures = "0.18.13" +Dates = "1" Distances = "0.10.7" HiGHS = "1.1.4" JuMP = "1.1.1" +LinearAlgebra = "1" MathOptInterface = "1.6.1" RecursiveArrayTools = "2.31.2, 3" Statistics = "1.4.0" diff --git a/README.md b/README.md index ad26a8dde7..bc22585e8b 100644 --- a/README.md +++ b/README.md @@ -88,4 +88,5 @@ Key contributors include [Nestor A. Sepulveda](https://energy.mit.edu/profile/ne [Sambuddha Chakrabarti](https://www.linkedin.com/in/sambuddha-chakrabarti-ph-d-84157318). ## Acknowledgement -The GenX team expresses deep gratitude to Laura Zwanziger and Jacob Schwartz for designing the Julia-themed GenX logo and to [Maya Mutic](https://github.com/mmutic) for developing the tutorials along with Filippo Pecci and Luca Bonaldo. \ No newline at end of file +The GenX team expresses deep gratitude to [Maya Mutic](https://github.com/mmutic) for developing the tutorials along with Filippo Pecci and Luca Bonaldo. +The Julia-themed GenX logo was designed by Laura Zwanziger and Jacob Schwartz. \ No newline at end of file diff --git a/docs/src/index.md b/docs/src/index.md index 92364fc792..3a87b5b5fb 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -55,7 +55,8 @@ We recommend users of GenX to cite it in their academic publications and patent `MIT Energy Initiative and Princeton University ZERO lab. [GenX](https://github.com/GenXProject/GenX): a configurable power system capacity expansion model for studying low-carbon energy futures n.d. https://github.com/GenXProject/GenX`. ## Acknowledgement -The GenX team expresses deep gratitude to Laura Zwanziger and Jacob Schwartz for designing the Julia-themed GenX logo and to [Maya Mutic](https://github.com/mmutic) for developing the tutorials along with Filippo Pecci and Luca Bonaldo. +The GenX team expresses deep gratitude to [Maya Mutic](https://github.com/mmutic) for developing the tutorials along with Filippo Pecci and Luca Bonaldo. +The Julia-themed GenX logo was designed by Laura Zwanziger and Jacob Schwartz. ## License diff --git a/src/case_runners/case_runner.jl b/src/case_runners/case_runner.jl index 018a9b451e..bbdaae4f53 100644 --- a/src/case_runners/case_runner.jl +++ b/src/case_runners/case_runner.jl @@ -150,7 +150,6 @@ function run_genx_case_multistage!(case::AbstractString, mysetup::Dict, optimize inputs_dict[t] = configure_multi_stage_inputs(inputs_dict[t],mysetup["MultiStageSettingsDict"],mysetup["NetworkExpansion"]) compute_cumulative_min_retirements!(inputs_dict,t) - # Step 2) Generate model model_dict[t] = generate_model(mysetup, inputs_dict[t], OPTIMIZER) end diff --git a/src/model/resources/storage/storage_all.jl b/src/model/resources/storage/storage_all.jl index f2dae280e5..13c433235c 100644 --- a/src/model/resources/storage/storage_all.jl +++ b/src/model/resources/storage/storage_all.jl @@ -153,12 +153,12 @@ end function storage_all_operational_reserves!(EP::Model, inputs::Dict, setup::Dict) - gen = inputs["RESOURCES"] - T = inputs["T"] - p = inputs["hours_per_subperiod"] - CapacityReserveMargin = setup["CapacityReserveMargin"] > 1 + gen = inputs["RESOURCES"] + T = inputs["T"] + p = inputs["hours_per_subperiod"] + CapacityReserveMargin = setup["CapacityReserveMargin"] > 1 - STOR_ALL = inputs["STOR_ALL"] + STOR_ALL = inputs["STOR_ALL"] STOR_REG = intersect(STOR_ALL, inputs["REG"]) # Set of storage resources with REG reserves STOR_RSV = intersect(STOR_ALL, inputs["RSV"]) # Set of storage resources with RSV reserves diff --git a/src/multi_stage/endogenous_retirement.jl b/src/multi_stage/endogenous_retirement.jl index 2d16b115fe..fca0ebb0bf 100644 --- a/src/multi_stage/endogenous_retirement.jl +++ b/src/multi_stage/endogenous_retirement.jl @@ -128,7 +128,7 @@ This function models the following constraint ```math \begin{aligned} -& RETCAP_{y,p} \geq \sum^p_{t=1} MINRET_{y,t} + \sum^r_{t=1}CAP_{y,t} - \sum^p_{t=1}RETCAP_{y,p} +& RETCAP_{y,p} \geq \sum^p_{t=1} MINRET_{y,t} + \sum^r_{t=1}CAP_{y,t} - \sum^{(p-1)}_{t=1}RETCAP_{y,t} \end{aligned} ``` where $r \in \{1, ..., (p-1)\}$ is defined as the last stage such that if we built $y$ at the end of stage $r$, it would reach its end of life before the end of stage $p$.