Skip to content

Commit

Permalink
Merge pull request #675 from GenXProject/release/0.4.0
Browse files Browse the repository at this point in the history
Merge Release/0.4.0 to main for version release
  • Loading branch information
sambuddhac authored May 6, 2024
2 parents 5100d17 + 61b5abd commit 62c0c0c
Show file tree
Hide file tree
Showing 278 changed files with 16,963 additions and 8,856 deletions.
1 change: 1 addition & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
style = "sciml"
5 changes: 5 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# .git-blame-ignore-revs
# Standardize code formatting across project (#673)
ee3f08756584ba16a57bb701492270a7bf129b4d
# Update code formatting
730f91df23447e94177c3a9c3d4e553cb502e2bf
14 changes: 14 additions & 0 deletions .github/workflows/format_suggestions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Format suggestions
on:
pull_request:

jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/julia-format@v2
continue-on-error: true
- name: Check on failures
if: steps.julia-format.outcome != 'success'
run: echo "There are formatting errors. Please check the logs above."
shell: bash
7 changes: 6 additions & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
},
{
"name": "Morris, Jack",
"affiliation": "MITRE"
"affiliation": "MITRE",
"orcid": "0000-0002-1471-9708"
},
{
"name": "Patankar, Neha",
Expand Down Expand Up @@ -87,6 +88,10 @@
"name": "Xu, Qingyu",
"affiliation": "Tsinghua University",
"orcid": "0000-0003-2692-5135"
},
{
"name": "Zhou, Justin",
"affiliation": "Massachusetts Institute of Technology"
}
]
}
49 changes: 38 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Added
- Add objective scaler for addressing problem ill-conditioning (#667)

## [0.4.0] - 2024-03-18

### Added
- Feature CO2 and fuel module (#536)
Adds a fuel module which enables modeling of fuel usage via (1) a constant heat rate and (2)
piecewise-linear approximation of heat rate curves.
Adds a CO2 module that determines the CO2 emissions based on fuel consumption, CO2 capture
Adds a fuel module which enables modeling of fuel usage via (1) a constant heat rate and (2)
piecewise-linear approximation of heat rate curves.
Adds a CO2 module that determines the CO2 emissions based on fuel consumption, CO2 capture
fraction, and whether the feedstock is biomass.
- Enable thermal power plants to burn multiple fuels (#586)
- Enable thermal power plants to burn multiple fuels (#586)
- Feature electrolysis basic (#525)
Adds hydrogen electrolyzer model which enables the addition of hydrogen electrolyzer
demands along with optional clean supply constraints.
Expand All @@ -25,18 +28,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add PR template (#516)
- Validation ensures that resource flags (THERM, HYDRO, LDS etc) are self-consistent (#513).
- Maintenance formulation for thermal-commit plants (#556).
- Add new tests for GenX: three-zone, multi-stage, electrolyzer, VRE+storage,
- Add new tests for GenX: three-zone, multi-stage, electrolyzer, VRE+storage,
piecewise_fuel+CO2, and TDR (#563 and #578).
- Added a DC OPF method (#543) to calculate power flows across all lines
- Added write_operating_reserve_price_revenue.jl to compute annual operating reserve and regulation revenue.
Added the operating reserve and regulation revenue to net revenue (PR # 611)
- Add functions to compute conflicting constraints when model is infeasible if supported by the solver (#624).
- New settings parameter, VirtualChargeDischargeCost to test script and VREStor example case. The PR 608 attempts to
introduce this parameter as cost of virtual charging and discharging to avoid unusual results (#608).
- New settings parameter, VirtualChargeDischargeCost to test script and VREStor example case. The PR 608 attempts to
introduce this parameter as cost of virtual charging and discharging to avoid unusual results (#608).
- New settings parameter, StorageVirtualDischarge, to turn storage virtual charging and discharging off if desired by the user (#638).
- Add module to retrofit existing resources with new technologies (#600).
- Formatted the code and added a format check to the CI pipeline (#673).
- Add check when capital recovery period is zero and investment costs are
non-zero in multi-stage GenX (#666)
- Added condition number scaling added to objective function (#667)
- Added versioned doc-pages for v0.3.6 and v0.4.0

- Added a warning message in write_costs_multistage mentioning th approximate value of costs currently.

### Fixed
- Add constraint in mga to compute total capacity in each zone from a given technology type (#681)
- New settings parameter MGAAnnualGeneration to switch between different MGA formulations (#681)
- Add validation for `Can_Retire` column in multi-stage GenX since the current implementation
does not allow a resource to switch from can_retire = 0 to can_retire = 1 between stages. (#683)
- Add tutorials for running GenX (#637 and #685)
- Add writing of multistage stats during optimization with foresight (#687)
- Fix docstring in operational_reserves.jl (#690)
- Fix docstring in energy_share_requirement.jl (#692)
- Set MUST_RUN=1 for RealSystemExample/small_hydro plants (#517).
Previously these plants had no resource flag set, and so they did not contribute to the power balance.
As these plants are now useful, the objective in these cases is slightly lower.
Expand All @@ -54,6 +72,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix modeling of hydro reservoir with long duration storage (#572).
- Fix update of starting transmission capacity in multistage GenX
- Fix write_status with UCommit = WriteShadowPrices = 1 (#645)
- Fixed outputting capital recovery cost to 0 if the remaining number of years is 0 (#666)
- Updated the docstring for the initialize_cost_to_go function and adjusted the formula for the discount factor to reflect the code implementation (#672).
- Fix write_multi_stage_cost.jl: add discount with OPEX multipliers to cUnmetPolicyPenalty (#679)
- Fix DF calculation in DDP to make it more generic for variable length stages (#680)
- Fix write_power_balance.jl: add additional two columns ("VRE_Storage_Discharge" and "VRE_Storage_Charge") for VRE_STOR

### Changed
- Use add_to_expression! instead of the += and -= operators for memory performance improvements (#498).
Expand All @@ -73,14 +96,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
This mitigates but does not fully fix (#576).
- Expressions of virtual charging and discharging costs in storage_all.jl and vre_stor.jl
- The input file `Generators_data.csv` has been split into different files, one for each type of generator.
The new files are: `Thermal.csv`, `Hydro.csv`, `Vre.csv`, `Storage.csv`, `Flex_demand.csv`, `Must_run.csv`,
`Electrolyzer.csv`, and `Vre_stor.csv`. The examples have been updated, and new tests have been added to
The new files are: `Thermal.csv`, `Hydro.csv`, `Vre.csv`, `Storage.csv`, `Flex_demand.csv`, `Must_run.csv`,
`Electrolyzer.csv`, and `Vre_stor.csv`. The examples have been updated, and new tests have been added to
check the new data format (#612).
- The settings parameter `Reserves` has been renamed to `OperationalReserves`, `Reserves.csv` to
- The settings parameter `Reserves` has been renamed to `OperationalReserves`, `Reserves.csv` to
`Operational_reserves.csv`, and the `.jl` files contain the word `reserves` have been renamed to
`operational_reserves` (#641).
- New folder structure for a GenX case. The input files are now organized in the following folders: `settings`,
`policies`, `resources` and `system`. The examples and tests have been updated to reflect this change.
- New folder structure implemented for `example_system`. This folder now consists of nine separate folders each pertaining to a different case study example,
ranging from the ISONE three zones, with singlestage, multistage, electrolyzers, all the way to the 9 bus IEEE case for running DC-OPF.
- Pruned HiGHS solver settings to the necessary minimum (#668)
- Changed deploydoc URL to GenX.jl (#662)

### Deprecated
- The above `load` keys, which generally refer to electrical demand, are being deprecated.
Expand Down Expand Up @@ -135,7 +162,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- The settings key `OperationsWrapping`. Its functionality has now been folded into the
- The settings key `OperationsWrapping`. Its functionality has now been folded into the
`TimeDomainReduction` setting. Using the key now will print a gentle warning (#426).

## [0.3.4] - 2023-04-28
Expand Down
56 changes: 43 additions & 13 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,30 +1,60 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Bonaldo"
given-names: "Luca"
orcid: "https://orcid.org/0009-0000-0650-0266"
- family-names: "Chakrabarti"
given-names: "Sambuddha"
orcid: "https://orcid.org/0000-0002-8916-5076"
- family-names: "Cheng"
given-names: "Fangwei"
orcid: "https://orcid.org/0000-0001-6589-2749"
- family-names: "Ding"
given-names: "Yifu"
orcid: "https://orcid.org/0000-0001-7128-8847"
- family-names: "Jenkins"
given-names: "Jesse"
- family-names: "Sepulveda"
given-names: "Nestor"
orcid: "https://orcid.org/0000-0002-9670-7793"
- family-names: "Luo"
given-names: "Qian"
orcid: "https://orcid.org/0000-0003-3894-4093"
- family-names: "Macdonald"
given-names: "Ruaridh"
orcid: "https://orcid.org/0000-0001-9034-6635"
- family-names: "Mallapragada"
given-names: "Dharik"
orcid: "https://orcid.org/0000-0002-0330-0063"
- family-names: "Manocha"
given-names: "Aneesha"
orcid: "https://orcid.org/0000-0002-7190-4782"
- family-names: "Mantegna"
given-names: "Gabe"
orcid: "https://orcid.org/0000-0002-7707-0221"
- family-names: "Morris"
given-names: "Jack"
- family-names: "Patankar"
given-names: "Neha"
orcid: "https://orcid.org/0000-0001-7288-0391"
- family-names: "Pecci"
given-names: "Filippo"
orcid: "https://orcid.org/0000-0003-3200-0892"
- family-names: "Schwartz"
given-names: "Aaron"
- family-names: "Schwartz"
given-names: "Jacob"
orcid: "https://orcid.org/0000-0001-9636-8181"
- family-names: "Chakrabarti"
given-names: "Sambuddha"
orcid: "https://orcid.org/0000-0002-8916-5076"
- family-names: "Xu"
given-names: "Qingyu"
- family-names: "Morris"
given-names: "Jack"
- family-names: "Schivley"
given-names: "Greg"
orcid: "https://orcid.org/0000-0002-8947-694X"
- family-names: "Sepulveda"
given-names: "Nestor"
orcid: "https://orcid.org/0000-0003-2735-8769"
- family-names: "Xu"
given-names: "Qingyu"
orcid: "https://orcid.org/0000-0003-2692-5135"
title: "GenX"
version: 0.3.0
doi: 10.5281/zenodo.6229425
date-released: 2022-04-26
url: "https://github.com/GenXProject/GenX"
version: 0.4.0
doi: 10.5281/zenodo.10846070
date-released: 2024-04-26
url: "https://github.com/GenXProject/GenX.jl"
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GenX"
uuid = "5d317b1e-30ec-4ed6-a8ce-8d2d88d7cfac"
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"]
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", "Zhou, Justin"]
version = "0.4.0"

[deps]
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div align="center"> <img src="docs/src/assets/logo_readme.svg" height ="200"width="1000" alt="GenX.jl"></img></div>

[![CI](https://github.com/GenXProject/GenX/actions/workflows/ci.yml/badge.svg)](https://github.com/GenXProject/GenX/actions/workflows/ci.yml)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://genxproject.github.io/GenX.jl/dev)
[![DOI](https://zenodo.org/badge/368957308.svg)](https://zenodo.org/doi/10.5281/zenodo.10846069)
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
| **Documentation** | **DOI** |
|:-------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:|
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://genxproject.github.io/GenX.jl/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://genxproject.github.io/GenX.jl/dev) | [![DOI](https://zenodo.org/badge/368957308.svg)](https://zenodo.org/doi/10.5281/zenodo.10846069)

[![CI](https://github.com/GenXProject/GenX/actions/workflows/ci.yml/badge.svg)](https://github.com/GenXProject/GenX/actions/workflows/ci.yml) [![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle) [![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)

## Overview
GenX is a highly-configurable, [open source](https://github.com/GenXProject/GenX/blob/main/LICENSE) electricity resource capacity expansion model
Expand Down Expand Up @@ -51,7 +52,7 @@ It is currently setup to use one of the following open-source freely available s
- [Cbc](https://github.com/jump-dev/Cbc.jl) for mixed integer linear programming (MILP) problems
We also provide the option to use one of these two commercial solvers:
- [Gurobi](https://www.gurobi.com), or
- [CPLEX](https://www.ibm.com/analytics/cplex-optimizer).
- [CPLEX](https://www.ibm.com/docs/en/icos/22.1.1?topic=documentation-orientation-guide).
Note that using Gurobi and CPLEX requires a valid license on the host machine.
There are two ways to run GenX with either type of solver options (open-source free or, licensed commercial) as detailed in the section, `Getting Started`.

Expand Down
45 changes: 22 additions & 23 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using Documenter
using GenX
import DataStructures: OrderedDict

DocMeta.setdocmeta!(GenX, :DocTestSetup, :(using GenX); recursive=true)
DocMeta.setdocmeta!(GenX, :DocTestSetup, :(using GenX); recursive = true)

pages = OrderedDict(
"Welcome Page" => [
Expand All @@ -13,7 +13,7 @@ pages = OrderedDict(
],
"Getting Started" => [
"Running GenX" => "Getting_Started/examples_casestudies.md",
"Commertial solvers" => "Getting_Started/commercial_solvers.md",
"Commertial solvers" => "Getting_Started/commercial_solvers.md"
],
"Tutorials" => [
"Tutorials Overview" => "Tutorials/Tutorials_intro.md",
Expand All @@ -22,7 +22,9 @@ pages = OrderedDict(
"Tutorial 3: K-Means and Time Domain Reduction" => "Tutorials/Tutorial_3_K-means_time_domain_reduction.md",
"Tutorial 4: Model Generation" => "Tutorials/Tutorial_4_model_generation.md",
"Tutorial 5: Solving the Model" => "Tutorials/Tutorial_5_solve_model.md",
"Tutorial 6: Post Processing" => "Tutorials/Tutorial_6_solver_settings.md",
"Tutorial 6: Solver Settings" => "Tutorials/Tutorial_6_solver_settings.md",
"Tutorial 7: Policy Constraints" => "Tutorials/Tutorial_7_setup.md",
"Tutorial 8: Outputs" => "Tutorials/Tutorial_8_outputs.md"
],
"User Guide" => [
"Overall workflow" => "User_Guide/workflow.md",
Expand All @@ -36,13 +38,13 @@ pages = OrderedDict(
"Slack Variables for Policies" => "User_Guide/slack_variables_overview.md",
"Method of Morris Inputs" => "User_Guide/methodofmorris_input.md",
"Running the Model" => "User_Guide/running_model.md",
"Model Outputs" => "User_Guide/model_output.md",
"Model Outputs" => "User_Guide/model_output.md"
],
"Model Concept and Overview" => [
"Model Introduction" => "Model_Concept_Overview/model_introduction.md",
"Notation" => "Model_Concept_Overview/model_notation.md",
"Objective Function" => "Model_Concept_Overview/objective_function.md",
"Power Balance" => "Model_Concept_Overview/power_balance.md",
"Power Balance" => "Model_Concept_Overview/power_balance.md"
],
"Model Reference" => [
"Core" => "Model_Reference/core.md",
Expand Down Expand Up @@ -71,7 +73,6 @@ pages = OrderedDict(
"Thermal No Commit" => "Model_Reference/Resources/thermal_no_commit.md"
],
"Hydrogen Electrolyzers" => "Model_Reference/Resources/electrolyzers.md",
"Retrofit" => "Model_Reference/Resources/retrofit.md",
"Scheduled maintenance for various resources" => "Model_Reference/Resources/maintenance.md",
"Resource types" => "Model_Reference/Resources/resource.md"
],
Expand All @@ -91,43 +92,41 @@ pages = OrderedDict(
"Endogenous Retirement" => "Model_Reference/Multi_Stage/endogenous_retirement.md"
],
"Method of Morris" => "Model_Reference/methodofmorris.md",
"Utility Functions" => "Model_Reference/utility_functions.md",
"Utility Functions" => "Model_Reference/utility_functions.md"
],
"Public API Reference" => [
"Public API" => "Public_API/public_api.md",

],
"Public API" => "Public_API/public_api.md"],
"Third Party Extensions" => "additional_third_party_extensions.md",
"Developer Docs" => "developer_guide.md",
"Developer Docs" => "developer_guide.md"
)

# Build documentation.
# ====================

makedocs(;
modules=[GenX],
authors="Jesse Jenkins, Nestor Sepulveda, Dharik Mallapragada, Aaron Schwartz, Neha Patankar, Qingyu Xu, Jack Morris, Sambuddha Chakrabarti",
sitename="GenX.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://genxproject.github.io/GenX.jl/stable",
modules = [GenX],
authors = "Jesse Jenkins, Nestor Sepulveda, Dharik Mallapragada, Aaron Schwartz, Neha Patankar, Qingyu Xu, Jack Morris, Sambuddha Chakrabarti",
sitename = "GenX.jl",
format = Documenter.HTML(;
prettyurls = get(ENV, "CI", "false") == "true",
canonical = "https://genxproject.github.io/GenX.jl/stable",
assets = ["assets/genx_style.css"],
sidebar_sitename=false,
collapselevel=1
sidebar_sitename = false,
collapselevel = 1
),
pages=[p for p in pages]
pages = [p for p in pages]
)

# Deploy built documentation.
# ===========================

deploydocs(;
repo="github.com/GenXProject/GenX.jl.git",
repo = "github.com/GenXProject/GenX.jl.git",
target = "build",
branch = "gh-pages",
devbranch = "main",
devurl = "dev",
push_preview=true,
push_preview = true,
versions = ["stable" => "v^", "v#.#.#", "dev" => "dev"],
forcepush = false,
forcepush = false
)
Loading

0 comments on commit 62c0c0c

Please sign in to comment.