Skip to content

Commit 62c0c0c

Browse files
authored
Merge pull request #675 from GenXProject/release/0.4.0
Merge Release/0.4.0 to main for version release
2 parents 5100d17 + 61b5abd commit 62c0c0c

File tree

278 files changed

+16963
-8856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+16963
-8856
lines changed

.JuliaFormatter.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
style = "sciml"

.git-blame-ignore-revs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# .git-blame-ignore-revs
2+
# Standardize code formatting across project (#673)
3+
ee3f08756584ba16a57bb701492270a7bf129b4d
4+
# Update code formatting
5+
730f91df23447e94177c3a9c3d4e553cb502e2bf
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Format suggestions
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
code-style:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: julia-actions/julia-format@v2
10+
continue-on-error: true
11+
- name: Check on failures
12+
if: steps.julia-format.outcome != 'success'
13+
run: echo "There are formatting errors. Please check the logs above."
14+
shell: bash

.zenodo.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
},
5353
{
5454
"name": "Morris, Jack",
55-
"affiliation": "MITRE"
55+
"affiliation": "MITRE",
56+
"orcid": "0000-0002-1471-9708"
5657
},
5758
{
5859
"name": "Patankar, Neha",
@@ -87,6 +88,10 @@
8788
"name": "Xu, Qingyu",
8889
"affiliation": "Tsinghua University",
8990
"orcid": "0000-0003-2692-5135"
91+
},
92+
{
93+
"name": "Zhou, Justin",
94+
"affiliation": "Massachusetts Institute of Technology"
9095
}
9196
]
9297
}

CHANGELOG.md

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Added
11+
- Add objective scaler for addressing problem ill-conditioning (#667)
12+
1013
## [0.4.0] - 2024-03-18
1114

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

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

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

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

136163
### Removed
137164

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

141168
## [0.3.4] - 2023-04-28

CITATION.cff

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,60 @@
11
cff-version: 1.2.0
22
message: "If you use this software, please cite it as below."
33
authors:
4+
- family-names: "Bonaldo"
5+
given-names: "Luca"
6+
orcid: "https://orcid.org/0009-0000-0650-0266"
7+
- family-names: "Chakrabarti"
8+
given-names: "Sambuddha"
9+
orcid: "https://orcid.org/0000-0002-8916-5076"
10+
- family-names: "Cheng"
11+
given-names: "Fangwei"
12+
orcid: "https://orcid.org/0000-0001-6589-2749"
13+
- family-names: "Ding"
14+
given-names: "Yifu"
15+
orcid: "https://orcid.org/0000-0001-7128-8847"
416
- family-names: "Jenkins"
517
given-names: "Jesse"
6-
- family-names: "Sepulveda"
7-
given-names: "Nestor"
18+
orcid: "https://orcid.org/0000-0002-9670-7793"
19+
- family-names: "Luo"
20+
given-names: "Qian"
21+
orcid: "https://orcid.org/0000-0003-3894-4093"
22+
- family-names: "Macdonald"
23+
given-names: "Ruaridh"
24+
orcid: "https://orcid.org/0000-0001-9034-6635"
825
- family-names: "Mallapragada"
926
given-names: "Dharik"
27+
orcid: "https://orcid.org/0000-0002-0330-0063"
28+
- family-names: "Manocha"
29+
given-names: "Aneesha"
30+
orcid: "https://orcid.org/0000-0002-7190-4782"
31+
- family-names: "Mantegna"
32+
given-names: "Gabe"
33+
orcid: "https://orcid.org/0000-0002-7707-0221"
34+
- family-names: "Morris"
35+
given-names: "Jack"
1036
- family-names: "Patankar"
1137
given-names: "Neha"
38+
orcid: "https://orcid.org/0000-0001-7288-0391"
39+
- family-names: "Pecci"
40+
given-names: "Filippo"
41+
orcid: "https://orcid.org/0000-0003-3200-0892"
1242
- family-names: "Schwartz"
1343
given-names: "Aaron"
1444
- family-names: "Schwartz"
1545
given-names: "Jacob"
1646
orcid: "https://orcid.org/0000-0001-9636-8181"
17-
- family-names: "Chakrabarti"
18-
given-names: "Sambuddha"
19-
orcid: "https://orcid.org/0000-0002-8916-5076"
20-
- family-names: "Xu"
21-
given-names: "Qingyu"
22-
- family-names: "Morris"
23-
given-names: "Jack"
47+
- family-names: "Schivley"
48+
given-names: "Greg"
49+
orcid: "https://orcid.org/0000-0002-8947-694X"
2450
- family-names: "Sepulveda"
2551
given-names: "Nestor"
52+
orcid: "https://orcid.org/0000-0003-2735-8769"
53+
- family-names: "Xu"
54+
given-names: "Qingyu"
55+
orcid: "https://orcid.org/0000-0003-2692-5135"
2656
title: "GenX"
27-
version: 0.3.0
28-
doi: 10.5281/zenodo.6229425
29-
date-released: 2022-04-26
30-
url: "https://github.com/GenXProject/GenX"
57+
version: 0.4.0
58+
doi: 10.5281/zenodo.10846070
59+
date-released: 2024-04-26
60+
url: "https://github.com/GenXProject/GenX.jl"

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "GenX"
22
uuid = "5d317b1e-30ec-4ed6-a8ce-8d2d88d7cfac"
3-
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"]
3+
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"]
44
version = "0.4.0"
55

66
[deps]

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<div align="center"> <img src="docs/src/assets/logo_readme.svg" height ="200"width="1000" alt="GenX.jl"></img></div>
22

3-
[![CI](https://github.com/GenXProject/GenX/actions/workflows/ci.yml/badge.svg)](https://github.com/GenXProject/GenX/actions/workflows/ci.yml)
4-
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://genxproject.github.io/GenX.jl/dev)
5-
[![DOI](https://zenodo.org/badge/368957308.svg)](https://zenodo.org/doi/10.5281/zenodo.10846069)
6-
[![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)
3+
| **Documentation** | **DOI** |
4+
|:-------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:|
5+
[![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)
6+
7+
[![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)
78

89
## Overview
910
GenX is a highly-configurable, [open source](https://github.com/GenXProject/GenX/blob/main/LICENSE) electricity resource capacity expansion model
@@ -51,7 +52,7 @@ It is currently setup to use one of the following open-source freely available s
5152
- [Cbc](https://github.com/jump-dev/Cbc.jl) for mixed integer linear programming (MILP) problems
5253
We also provide the option to use one of these two commercial solvers:
5354
- [Gurobi](https://www.gurobi.com), or
54-
- [CPLEX](https://www.ibm.com/analytics/cplex-optimizer).
55+
- [CPLEX](https://www.ibm.com/docs/en/icos/22.1.1?topic=documentation-orientation-guide).
5556
Note that using Gurobi and CPLEX requires a valid license on the host machine.
5657
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`.
5758

docs/make.jl

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using Documenter
22
using GenX
33
import DataStructures: OrderedDict
44

5-
DocMeta.setdocmeta!(GenX, :DocTestSetup, :(using GenX); recursive=true)
5+
DocMeta.setdocmeta!(GenX, :DocTestSetup, :(using GenX); recursive = true)
66

77
pages = OrderedDict(
88
"Welcome Page" => [
@@ -13,7 +13,7 @@ pages = OrderedDict(
1313
],
1414
"Getting Started" => [
1515
"Running GenX" => "Getting_Started/examples_casestudies.md",
16-
"Commertial solvers" => "Getting_Started/commercial_solvers.md",
16+
"Commertial solvers" => "Getting_Started/commercial_solvers.md"
1717
],
1818
"Tutorials" => [
1919
"Tutorials Overview" => "Tutorials/Tutorials_intro.md",
@@ -22,7 +22,9 @@ pages = OrderedDict(
2222
"Tutorial 3: K-Means and Time Domain Reduction" => "Tutorials/Tutorial_3_K-means_time_domain_reduction.md",
2323
"Tutorial 4: Model Generation" => "Tutorials/Tutorial_4_model_generation.md",
2424
"Tutorial 5: Solving the Model" => "Tutorials/Tutorial_5_solve_model.md",
25-
"Tutorial 6: Post Processing" => "Tutorials/Tutorial_6_solver_settings.md",
25+
"Tutorial 6: Solver Settings" => "Tutorials/Tutorial_6_solver_settings.md",
26+
"Tutorial 7: Policy Constraints" => "Tutorials/Tutorial_7_setup.md",
27+
"Tutorial 8: Outputs" => "Tutorials/Tutorial_8_outputs.md"
2628
],
2729
"User Guide" => [
2830
"Overall workflow" => "User_Guide/workflow.md",
@@ -36,13 +38,13 @@ pages = OrderedDict(
3638
"Slack Variables for Policies" => "User_Guide/slack_variables_overview.md",
3739
"Method of Morris Inputs" => "User_Guide/methodofmorris_input.md",
3840
"Running the Model" => "User_Guide/running_model.md",
39-
"Model Outputs" => "User_Guide/model_output.md",
41+
"Model Outputs" => "User_Guide/model_output.md"
4042
],
4143
"Model Concept and Overview" => [
4244
"Model Introduction" => "Model_Concept_Overview/model_introduction.md",
4345
"Notation" => "Model_Concept_Overview/model_notation.md",
4446
"Objective Function" => "Model_Concept_Overview/objective_function.md",
45-
"Power Balance" => "Model_Concept_Overview/power_balance.md",
47+
"Power Balance" => "Model_Concept_Overview/power_balance.md"
4648
],
4749
"Model Reference" => [
4850
"Core" => "Model_Reference/core.md",
@@ -71,7 +73,6 @@ pages = OrderedDict(
7173
"Thermal No Commit" => "Model_Reference/Resources/thermal_no_commit.md"
7274
],
7375
"Hydrogen Electrolyzers" => "Model_Reference/Resources/electrolyzers.md",
74-
"Retrofit" => "Model_Reference/Resources/retrofit.md",
7576
"Scheduled maintenance for various resources" => "Model_Reference/Resources/maintenance.md",
7677
"Resource types" => "Model_Reference/Resources/resource.md"
7778
],
@@ -91,43 +92,41 @@ pages = OrderedDict(
9192
"Endogenous Retirement" => "Model_Reference/Multi_Stage/endogenous_retirement.md"
9293
],
9394
"Method of Morris" => "Model_Reference/methodofmorris.md",
94-
"Utility Functions" => "Model_Reference/utility_functions.md",
95+
"Utility Functions" => "Model_Reference/utility_functions.md"
9596
],
9697
"Public API Reference" => [
97-
"Public API" => "Public_API/public_api.md",
98-
99-
],
98+
"Public API" => "Public_API/public_api.md"],
10099
"Third Party Extensions" => "additional_third_party_extensions.md",
101-
"Developer Docs" => "developer_guide.md",
100+
"Developer Docs" => "developer_guide.md"
102101
)
103102

104103
# Build documentation.
105104
# ====================
106105

107106
makedocs(;
108-
modules=[GenX],
109-
authors="Jesse Jenkins, Nestor Sepulveda, Dharik Mallapragada, Aaron Schwartz, Neha Patankar, Qingyu Xu, Jack Morris, Sambuddha Chakrabarti",
110-
sitename="GenX.jl",
111-
format=Documenter.HTML(;
112-
prettyurls=get(ENV, "CI", "false") == "true",
113-
canonical="https://genxproject.github.io/GenX.jl/stable",
107+
modules = [GenX],
108+
authors = "Jesse Jenkins, Nestor Sepulveda, Dharik Mallapragada, Aaron Schwartz, Neha Patankar, Qingyu Xu, Jack Morris, Sambuddha Chakrabarti",
109+
sitename = "GenX.jl",
110+
format = Documenter.HTML(;
111+
prettyurls = get(ENV, "CI", "false") == "true",
112+
canonical = "https://genxproject.github.io/GenX.jl/stable",
114113
assets = ["assets/genx_style.css"],
115-
sidebar_sitename=false,
116-
collapselevel=1
114+
sidebar_sitename = false,
115+
collapselevel = 1
117116
),
118-
pages=[p for p in pages]
117+
pages = [p for p in pages]
119118
)
120119

121120
# Deploy built documentation.
122121
# ===========================
123122

124123
deploydocs(;
125-
repo="github.com/GenXProject/GenX.jl.git",
124+
repo = "github.com/GenXProject/GenX.jl.git",
126125
target = "build",
127126
branch = "gh-pages",
128127
devbranch = "main",
129128
devurl = "dev",
130-
push_preview=true,
129+
push_preview = true,
131130
versions = ["stable" => "v^", "v#.#.#", "dev" => "dev"],
132-
forcepush = false,
131+
forcepush = false
133132
)

0 commit comments

Comments
 (0)