Skip to content

Restructure core bounds - #2086

Merged
lecfab merged 16 commits into
remindmodel:developfrom
lecfab:refactor
Aug 22, 2025
Merged

Restructure core bounds#2086
lecfab merged 16 commits into
remindmodel:developfrom
lecfab:refactor

Conversation

@lecfab

@lecfab lecfab commented Apr 11, 2025

Copy link
Copy Markdown
Contributor

Purpose of this PR

Tried to give more structure and consistency to bounds.gms.
Now it contains the following parts:

  • Conopt optimisation bounds
  • Assumptions onhistorical and near-term capacities
  • Assumptions on biomass
  • Assumptions on carbon capture and sequestration
  • Assumptions and historic values for nuclear energy
  • Assumptions for early retirement and phase-out of technologies
  • Assumptions for sectors and final energy
  • Other bounds

Type of change

Indicate the items relevant for your PR by replacing ◻️ with ☑️.
Do not delete any lines. This makes it easier to understand which areas are affected by your changes and which are not.

Parts concerned

  • ☑️ GAMS Code
  • ◻️ R-scripts
  • ☑️ Documentation (GAMS incode documentation, comments, tutorials)
  • ◻️ Input data / CES parameters
  • ◻️ Tests, CI/CD (continuous integration/deployment)
  • ◻️ Other (please give a description)

Impact

  • ◻️ Bug fix
  • ☑️ Refactoring
  • ◻️ New feature
  • ◻️ Change of parameter values or input data (including CES parameters)
  • ◻️ Minor change (default scenarios show only small differences)
  • ◻️ Fundamental change of results of default scenarios

Checklist

Do not delete any line. Leave unfinished elements unchecked so others know how far along you are.
In the end all checkboxes must be ticked before you can merge
.

  • I executed the automated model tests (make test) after my final commit and all tests pass (FAIL 0)
  • I adjusted the reporting in remind2 if and where it was needed
  • My code follows the coding etiquette
  • I explained my changes within the PR, particularly in hard-to-understand areas
  • I checked that the in-code documentation is up-to-date
  • I adjusted forbiddenColumnNames in readCheckScenarioConfig.R in case the PR leads to deprecated switches
  • I updated the CHANGELOG.md correctly (added, changed, fixed, removed, input data/calibration)

Further information (optional)

  • Runs with these changes are here: /p/tmp/fabricel/bounds-refactor/202508-refactor-remind
  • Comparison of results (what changes by this PR?): very small changes due to a correction of factor 3.66 to 3.6
    /p/tmp/fabricel/bounds-refactor/202508-refactor-remind/compScen-boundsSSP2-2025-08-15_14.09.37-H12.pdf

@LaviniaBaumstark

Copy link
Copy Markdown
Member

Why is this still a draft? Should it be merged for v3.5.1?

@lecfab

lecfab commented May 27, 2025

Copy link
Copy Markdown
Contributor Author

Never had time to properly test and merge it, so it should stay as a draft =(

@fschreyer fschreyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for that. I think that improves the structure quite a bit.

Did you test whether the results change? When reordering bounds, it can sometimes happen that one bound now overwrites another which was not intended before?

Comment thread core/bounds.gms Outdated
Comment thread core/bounds.gms Outdated
Comment thread core/bounds.gms Outdated
Comment thread core/bounds.gms Outdated
Comment thread core/bounds.gms Outdated
Comment thread core/sets.gms
biopyrchp "biomass pyrolysis to biochar plus heat and power (established industrial)"
biopyrliq "biomass pyrolysis to biochar plus liquids (combined with Fischer-Tropsch plant, advanced industrial)"
/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this added?

@lecfab lecfab Aug 21, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i added this set to replace long conditions in the bounds like
loop(te $ (sameas(te, biopyrchp) or sameas(te, biopyrliq) or sameas(te .....

@lecfab

lecfab commented Aug 21, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for looking through it, I integrated your suggestions and increased the similarity with declarations.gms.

Did you test whether the results change? When reordering bounds, it can sometimes happen that one bound now overwrites another which was not intended before?

Good point: i checked that the bounds are not changed by the re-ordering.
Minor changes happen in the scenarios due to changing a wrong factor 3.66 in to 3.6 (using sm_EJ_2_TWa instead of hard-coded 3.66 * 1e3 / 8760).

@lecfab
lecfab requested a review from fschreyer August 21, 2025 13:35

@fschreyer fschreyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

Comment thread core/declarations.gms
*** 2. Emissions
*** 3. Energy System
*** 4. Other (Not fitting into the above categories or generic declarations used everywhere in the model)
*** 1. Macro-Economy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! :)

@lecfab
lecfab merged commit c47c6d4 into remindmodel:develop Aug 22, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants